AWS::EC2::SubnetCidrBlock - AWS CloudFormation

AWS::EC2::SubnetCidrBlock

Associates a CIDR block with your subnet. You can associate a single IPv6 CIDR block with your subnet.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::SubnetCidrBlock", "Properties" : { "Ipv6CidrBlock" : String, "Ipv6IpamPoolId" : String, "Ipv6NetmaskLength" : Integer, "SubnetId" : String } }

YAML

Type: AWS::EC2::SubnetCidrBlock Properties: Ipv6CidrBlock: String Ipv6IpamPoolId: String Ipv6NetmaskLength: Integer SubnetId: String

Properties

Ipv6CidrBlock

The IPv6 network range for the subnet, in CIDR notation.

Required: Conditional

Type: String

Maximum: 42

Update requires: Replacement

Ipv6IpamPoolId

An IPv6 IPAM pool ID for the subnet.

Required: No

Type: String

Update requires: Replacement

Ipv6NetmaskLength

An IPv6 netmask length for the subnet.

Required: No

Type: Integer

Minimum: 0

Maximum: 128

Update requires: Replacement

SubnetId

The ID of the subnet.

Required: Yes

Type: String

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the association ID for the subnet’s IPv6 CIDR block.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Id

The ID of the association.

IpSource

The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

Ipv6AddressAttribute

Public IPv6 addresses are those advertised on the internet from AWS. Private IP addresses are not and cannot be advertised on the internet from AWS.