disassociateLink method

Future<DisassociateLinkResponse> disassociateLink({
  1. required String deviceId,
  2. required String globalNetworkId,
  3. required String linkId,
})

Disassociates an existing device from a link. You must first disassociate any customer gateways that are associated with the link.

May throw ValidationException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ConflictException. May throw ThrottlingException. May throw InternalServerException.

Parameter deviceId : The ID of the device.

Parameter globalNetworkId : The ID of the global network.

Parameter linkId : The ID of the link.

Implementation

Future<DisassociateLinkResponse> disassociateLink({
  required String deviceId,
  required String globalNetworkId,
  required String linkId,
}) async {
  ArgumentError.checkNotNull(deviceId, 'deviceId');
  ArgumentError.checkNotNull(globalNetworkId, 'globalNetworkId');
  ArgumentError.checkNotNull(linkId, 'linkId');
  final $query = <String, List<String>>{
    'deviceId': [deviceId],
    'linkId': [linkId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/global-networks/${Uri.encodeComponent(globalNetworkId)}/link-associations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DisassociateLinkResponse.fromJson(response);
}