Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

CreateTransitGatewayVpcAttachment

Attaches the specified VPC to the specified transit gateway.

If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.

To send VPC traffic to an attached transit gateway, add a route to the VPC route table using CreateRoute.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

Options

The VPC attachment options.

Type: CreateTransitGatewayVpcAttachmentRequestOptions object

Required: No

SubnetIds.N

The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.

Type: Array of strings

Required: Yes

TagSpecifications.N

The tags to apply to the VPC attachment.

Type: Array of TagSpecification objects

Required: No

TransitGatewayId

The ID of the transit gateway.

Type: String

Required: Yes

VpcId

The ID of the VPC.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

requestId

The ID of the request.

Type: String

transitGatewayVpcAttachment

Information about the VPC attachment.

Type: TransitGatewayVpcAttachment object

Errors

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

See Also

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