deleteBGPPeer method

Future<DeleteBGPPeerResponse> deleteBGPPeer({
  1. int? asn,
  2. String? bgpPeerId,
  3. String? customerAddress,
  4. String? virtualInterfaceId,
})

Deletes the specified BGP peer on the specified virtual interface with the specified customer address and ASN.

You cannot delete the last BGP peer from a virtual interface.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter asn : The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Parameter bgpPeerId : The ID of the BGP peer.

Parameter customerAddress : The IP address assigned to the customer interface.

Parameter virtualInterfaceId : The ID of the virtual interface.

Implementation

Future<DeleteBGPPeerResponse> deleteBGPPeer({
  int? asn,
  String? bgpPeerId,
  String? customerAddress,
  String? virtualInterfaceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DeleteBGPPeer'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (asn != null) 'asn': asn,
      if (bgpPeerId != null) 'bgpPeerId': bgpPeerId,
      if (customerAddress != null) 'customerAddress': customerAddress,
      if (virtualInterfaceId != null)
        'virtualInterfaceId': virtualInterfaceId,
    },
  );

  return DeleteBGPPeerResponse.fromJson(jsonResponse.body);
}