updateSite method
Updates the information for an existing site. To remove information for any of the parameters, specify an empty string.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter globalNetworkId :
The ID of the global network.
Parameter siteId :
The ID of your site.
Parameter description :
A description of your site.
Constraints: Maximum length of 256 characters.
Parameter location :
The site location:
-
Address: The physical address of the site. -
Latitude: The latitude of the site. -
Longitude: The longitude of the site.
Implementation
Future<UpdateSiteResponse> updateSite({
required String globalNetworkId,
required String siteId,
String? description,
Location? location,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (location != null) 'Location': location,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/global-networks/${Uri.encodeComponent(globalNetworkId)}/sites/${Uri.encodeComponent(siteId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateSiteResponse.fromJson(response);
}