disassociateCustomerGateway method

Future<DisassociateCustomerGatewayResponse> disassociateCustomerGateway({
  1. required String customerGatewayArn,
  2. required String globalNetworkId,
})

Disassociates a customer gateway from a device and a link.

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

Parameter customerGatewayArn : The Amazon Resource Name (ARN) of the customer gateway. For more information, see Resources Defined by Amazon EC2.

Parameter globalNetworkId : The ID of the global network.

Implementation

Future<DisassociateCustomerGatewayResponse> disassociateCustomerGateway({
  required String customerGatewayArn,
  required String globalNetworkId,
}) async {
  ArgumentError.checkNotNull(customerGatewayArn, 'customerGatewayArn');
  ArgumentError.checkNotNull(globalNetworkId, 'globalNetworkId');
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/global-networks/${Uri.encodeComponent(globalNetworkId)}/customer-gateway-associations/${Uri.encodeComponent(customerGatewayArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return DisassociateCustomerGatewayResponse.fromJson(response);
}