deleteDirectConnectGatewayAssociation method

Future<DeleteDirectConnectGatewayAssociationResult> deleteDirectConnectGatewayAssociation({
  1. String? associationId,
  2. String? directConnectGatewayId,
  3. String? virtualGatewayId,
})

Deletes the association between the specified Direct Connect gateway and virtual private gateway.

We recommend that you specify the associationID to delete the association. Alternatively, if you own virtual gateway and a Direct Connect gateway association, you can specify the virtualGatewayId and directConnectGatewayId to delete an association.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter associationId : The ID of the Direct Connect gateway association.

Parameter directConnectGatewayId : The ID of the Direct Connect gateway.

Parameter virtualGatewayId : The ID of the virtual private gateway.

Implementation

Future<DeleteDirectConnectGatewayAssociationResult>
    deleteDirectConnectGatewayAssociation({
  String? associationId,
  String? directConnectGatewayId,
  String? virtualGatewayId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DeleteDirectConnectGatewayAssociation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (associationId != null) 'associationId': associationId,
      if (directConnectGatewayId != null)
        'directConnectGatewayId': directConnectGatewayId,
      if (virtualGatewayId != null) 'virtualGatewayId': virtualGatewayId,
    },
  );

  return DeleteDirectConnectGatewayAssociationResult.fromJson(
      jsonResponse.body);
}