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

AssociateVpcCidrBlock

Associates a CIDR block with your VPC. You can only associate a single Amazon-provided IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.

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.

AmazonProvidedIpv6CidrBlock

Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

Type: Boolean

Required: No

VpcId

The ID of the VPC.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

ipv6CidrBlockAssociation

Information about the IPv6 CIDR block association.

Type: VpcIpv6CidrBlockAssociation object

requestId

The ID of the request.

Type: String

vpcId

The ID of the VPC.

Type: String

Errors

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

Example

Example

This example associates an IPv6 CIDR block with VPC vpc-1a2b3c4d.

Sample Request

Copy
https://ec2.amazonaws.com/?Action=AssociateVpcCidrBlock &VpcId=vpc-1a2b3c4d &AmazonProvidedIpv6CidrBlock=true &AUTHPARAMS

Sample Response

Copy
<AssociateVpcCidrBlock xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <ipv6CidrBlockAssociation> <ipv6CidrBlockState> <state>associating</state> </ipv6CidrBlockState> <associationId>vpc-cidr-assoc-e2a5408b</associationId> </ipv6CidrBlockAssociation> <vpcId>vpc-1a2b3c4d</vpcId> </AssociateVpcCidrBlock>

See Also

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