deleteDevice method
Deletes an existing device. You must first disassociate the device from any links and customer gateways.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter deviceId :
The ID of the device.
Parameter globalNetworkId :
The ID of the global network.
Implementation
Future<DeleteDeviceResponse> deleteDevice({
required String deviceId,
required String globalNetworkId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/global-networks/${Uri.encodeComponent(globalNetworkId)}/devices/${Uri.encodeComponent(deviceId)}',
exceptionFnMap: _exceptionFns,
);
return DeleteDeviceResponse.fromJson(response);
}