Jump to Content

Class AllocatePublicVirtualInterfaceCommandProtected

Provisions a public virtual interface to be owned by the specified Amazon Web Services account.

The owner of a connection calls this function to provision a public virtual interface to be owned by the specified Amazon Web Services account.

Virtual interfaces created using this function must be confirmed by the owner using ConfirmPublicVirtualInterface. Until this step has been completed, the virtual interface is in the confirming state and is not available to handle traffic.

When creating an IPv6 public virtual interface, 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.

Example

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

import { DirectConnectClient, AllocatePublicVirtualInterfaceCommand } from "@aws-sdk/client-direct-connect"; // ES Modules import
// const { DirectConnectClient, AllocatePublicVirtualInterfaceCommand } = require("@aws-sdk/client-direct-connect"); // CommonJS import
const client = new DirectConnectClient(config);
const input = {
connectionId: "STRING_VALUE", // required
ownerAccount: "STRING_VALUE", // required
newPublicVirtualInterfaceAllocation: {
virtualInterfaceName: "STRING_VALUE", // required
vlan: Number("int"), // required
asn: Number("int"), // required
authKey: "STRING_VALUE",
amazonAddress: "STRING_VALUE",
customerAddress: "STRING_VALUE",
addressFamily: "ipv4" || "ipv6",
routeFilterPrefixes: [
{
cidr: "STRING_VALUE",
},
],
tags: [
{
key: "STRING_VALUE", // required
value: "STRING_VALUE",
},
],
},
};
const command = new AllocatePublicVirtualInterfaceCommand(input);
const response = await client.send(command);

Param

AllocatePublicVirtualInterfaceCommandInput

Returns

AllocatePublicVirtualInterfaceCommandOutput

See

Throws

DirectConnectClientException (client fault)

One or more parameters are not valid.

Throws

DirectConnectServerException (server fault)

A server-side error occurred.

Throws

DuplicateTagKeysException (client fault)

A tag key was specified more than once.

Throws

TooManyTagsException (client fault)

You have reached the limit on the number of tags that can be assigned.

Hierarchy

Constructors

Properties

Methods