Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class AssociateVirtualInterfaceCommandProtected

Associates a virtual interface with a specified link aggregation group (LAG) or connection. Connectivity to Amazon Web Services 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.

Example

Use a bare-bones client and the command you need to make an API call.

import { DirectConnectClient, AssociateVirtualInterfaceCommand } from "@aws-sdk/client-direct-connect"; // ES Modules import
// const { DirectConnectClient, AssociateVirtualInterfaceCommand } = require("@aws-sdk/client-direct-connect"); // CommonJS import
const client = new DirectConnectClient(config);
const input = { // AssociateVirtualInterfaceRequest
virtualInterfaceId: "STRING_VALUE", // required
connectionId: "STRING_VALUE", // required
};
const command = new AssociateVirtualInterfaceCommand(input);
const response = await client.send(command);
// { // VirtualInterface
// ownerAccount: "STRING_VALUE",
// virtualInterfaceId: "STRING_VALUE",
// location: "STRING_VALUE",
// connectionId: "STRING_VALUE",
// virtualInterfaceType: "STRING_VALUE",
// virtualInterfaceName: "STRING_VALUE",
// vlan: Number("int"),
// asn: Number("int"),
// amazonSideAsn: Number("long"),
// authKey: "STRING_VALUE",
// amazonAddress: "STRING_VALUE",
// customerAddress: "STRING_VALUE",
// addressFamily: "ipv4" || "ipv6",
// virtualInterfaceState: "confirming" || "verifying" || "pending" || "available" || "down" || "deleting" || "deleted" || "rejected" || "unknown",
// customerRouterConfig: "STRING_VALUE",
// mtu: Number("int"),
// jumboFrameCapable: true || false,
// virtualGatewayId: "STRING_VALUE",
// directConnectGatewayId: "STRING_VALUE",
// routeFilterPrefixes: [ // RouteFilterPrefixList
// { // RouteFilterPrefix
// cidr: "STRING_VALUE",
// },
// ],
// bgpPeers: [ // BGPPeerList
// { // BGPPeer
// bgpPeerId: "STRING_VALUE",
// asn: Number("int"),
// authKey: "STRING_VALUE",
// addressFamily: "ipv4" || "ipv6",
// amazonAddress: "STRING_VALUE",
// customerAddress: "STRING_VALUE",
// bgpPeerState: "verifying" || "pending" || "available" || "deleting" || "deleted",
// bgpStatus: "up" || "down" || "unknown",
// awsDeviceV2: "STRING_VALUE",
// awsLogicalDeviceId: "STRING_VALUE",
// },
// ],
// region: "STRING_VALUE",
// awsDeviceV2: "STRING_VALUE",
// awsLogicalDeviceId: "STRING_VALUE",
// tags: [ // TagList
// { // Tag
// key: "STRING_VALUE", // required
// value: "STRING_VALUE",
// },
// ],
// siteLinkEnabled: true || false,
// };

Param

AssociateVirtualInterfaceCommandInput

Returns

AssociateVirtualInterfaceCommandOutput

See

Throws

DirectConnectClientException (client fault)

One or more parameters are not valid.

Throws

DirectConnectServerException (server fault)

A server-side error occurred.

Throws

DirectConnectServiceException

Base exception class for all service exceptions from DirectConnect service.

Hierarchy

Constructors

Properties

Methods