deleteSite method
Deletes an existing site. The site cannot be associated with any device or link.
May throw ValidationException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ConflictException. May throw ThrottlingException. May throw InternalServerException.
Parameter globalNetworkId
:
The ID of the global network.
Parameter siteId
:
The ID of the site.
Implementation
Future<DeleteSiteResponse> deleteSite({
required String globalNetworkId,
required String siteId,
}) async {
ArgumentError.checkNotNull(globalNetworkId, 'globalNetworkId');
ArgumentError.checkNotNull(siteId, 'siteId');
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/global-networks/${Uri.encodeComponent(globalNetworkId)}/sites/${Uri.encodeComponent(siteId)}',
exceptionFnMap: _exceptionFns,
);
return DeleteSiteResponse.fromJson(response);
}