AssociateSubnetCidrBlock - Amazon Elastic Compute Cloud


Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.

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.


The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.

Type: String

Required: Yes


The ID of your subnet.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.


Information about the IPv6 association.

Type: SubnetIpv6CidrBlockAssociation object


The ID of the request.

Type: String


The ID of the subnet.

Type: String


For information about the errors that are common to all actions, see Common client error codes.



This example associates IPv6 CIDR block 2001:db8:1234:1a00::/64 with subnet subnet-1a2b3c4d.

Sample Request &SubnetId=subnet-1a2b3c4d &Ipv6CidrBlock=2001:db8:1234:1a00::/64 &AUTHPARAMS

Sample Response

<AssociateSubnetCidrBlock xmlns=""> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <subnetId>vpc-1a2b3c4d</subnetId> <ipv6CidrBlockAssociation> <ipv6CidrBlock>2001:db8:1234:1a00::/64</ipv6CidrBlock> <ipv6CidrBlockState> <state>associating</state> </ipv6CidrBlockState> <associationId>subnet-cidr-assoc-3aa54053</associationId> </ipv6CidrBlockAssociation> </AssociateSubnetCidrBlock>

See Also

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