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

AssociateVirtualInterface

Associates a virtual interface with a specified link aggregation group (LAG) or connection. Connectivity to AWS is temporarily interrupted as the virtual interface is being migrated. If the target connection or LAG has an associated virtual interface with a conflicting VLAN number or a conflicting IP address, the operation fails.

Virtual interfaces associated with a hosted connection cannot be associated with a LAG; hosted connections must be migrated along with their virtual interfaces using AssociateHostedConnection.

To reassociate a virtual interface to a new connection or LAG, the requester must own either the virtual interface itself or the connection to which the virtual interface is currently associated. Additionally, the requester must own the connection or LAG for the association.

Request Syntax

{ "connectionId": "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.

connectionId

The ID of the LAG or connection.

Type: String

Required: Yes

virtualInterfaceId

The ID of the virtual interface.

Type: String

Required: Yes

Response Syntax

{ "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.

addressFamily

The address family for the BGP peer.

Type: String

Valid Values: ipv4 | ipv6

amazonAddress

The IP address assigned to the Amazon interface.

Type: String

amazonSideAsn

The autonomous system number (ASN) for the Amazon side of the connection.

Type: Long

asn

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

Type: Integer

authKey

The authentication key for BGP configuration.

Type: String

awsDeviceV2

The Direct Connect endpoint on which the virtual interface terminates.

Type: String

bgpPeers

The BGP peers configured on this virtual interface.

Type: Array of BGPPeer objects

connectionId

The ID of the connection.

Type: String

customerAddress

The IP address assigned to the customer interface.

Type: String

customerRouterConfig

The customer router configuration.

Type: String

directConnectGatewayId

The ID of the Direct Connect gateway.

Type: String

location

The location of the connection.

Type: String

ownerAccount

The ID of the AWS account that owns the virtual interface.

Type: String

region

The AWS Region where the virtual interface is located.

Type: String

routeFilterPrefixes

The routes to be advertised to the AWS network in this Region. Applies to public virtual interfaces.

Type: Array of RouteFilterPrefix objects

virtualGatewayId

The ID of the virtual private gateway. Applies only to private virtual interfaces.

Type: String

virtualInterfaceId

The ID of the virtual interface.

Type: String

virtualInterfaceName

The name of the virtual interface assigned by the customer network.

Type: String

virtualInterfaceState

The state of the virtual interface. The following are the possible values:

  • confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.

  • verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.

  • pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.

  • available: A virtual interface that is able to forward traffic.

  • down: A virtual interface that is BGP down.

  • deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.

  • deleted: A virtual interface that cannot forward traffic.

  • rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.

Type: String

Valid Values: confirming | verifying | pending | available | down | deleting | deleted | rejected

virtualInterfaceType

The type of virtual interface. The possible values are private and public.

Type: String

vlan

The ID of the VLAN.

Type: Integer

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: