AWS Direct Connect
API Reference (API Version 2012-10-25)

CreateBGPPeer

Creates a BGP peer on the specified virtual interface.

The BGP peer cannot be in the same address family (IPv4/IPv6) of an existing BGP peer on the virtual interface.

You must create a BGP peer for the corresponding address family in order to access AWS resources that also use that address family.

When creating a IPv6 BGP peer, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.

For a public virtual interface, the Autonomous System Number (ASN) must be private or already whitelisted for the virtual interface.

Request Syntax

{ "newBGPPeer": { "addressFamily": "string", "amazonAddress": "string", "asn": number, "authKey": "string", "customerAddress": "string" }, "virtualInterfaceId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

newBGPPeer

Information about the BGP peer.

Type: NewBGPPeer object

Required: No

virtualInterfaceId

The ID of the virtual interface.

Type: String

Required: No

Response Syntax

{ "virtualInterface": { "addressFamily": "string", "amazonAddress": "string", "amazonSideAsn": number, "asn": number, "authKey": "string", "awsDeviceV2": "string", "bgpPeers": [ { "addressFamily": "string", "amazonAddress": "string", "asn": number, "authKey": "string", "awsDeviceV2": "string", "bgpPeerState": "string", "bgpStatus": "string", "customerAddress": "string" } ], "connectionId": "string", "customerAddress": "string", "customerRouterConfig": "string", "directConnectGatewayId": "string", "location": "string", "ownerAccount": "string", "region": "string", "routeFilterPrefixes": [ { "cidr": "string" } ], "virtualGatewayId": "string", "virtualInterfaceId": "string", "virtualInterfaceName": "string", "virtualInterfaceState": "string", "virtualInterfaceType": "string", "vlan": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

virtualInterface

The virtual interface.

Type: VirtualInterface object

Errors

For information about the errors that are common to all actions, see Common Errors.

DirectConnectClientException

One or more parameters are not valid.

HTTP Status Code: 400

DirectConnectServerException

A server-side error occurred.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: