AddressFamily

class aws_cdk.aws_ec2_alpha.AddressFamily(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

(experimental) Represents the address family for IP addresses in an IPAM pool.

IP_V4 - Represents the IPv4 address family. IP_V6 - Represents the IPv6 address family.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-addressfamily

Stability:

experimental

ExampleMetadata:

infused

Example:

stack = Stack()
ipam = Ipam(self, "Ipam",
    operating_region=["us-west-1"]
)
ipam_public_pool = ipam.public_scope.add_pool("PublicPoolA",
    address_family=AddressFamily.IP_V6,
    aws_service=AwsServiceName.EC2,
    locale="us-west-1",
    public_ip_source=IpamPoolPublicIpSource.AMAZON
)
ipam_public_pool.provision_cidr("PublicPoolACidrA", netmask_length=52)

ipam_private_pool = ipam.private_scope.add_pool("PrivatePoolA",
    address_family=AddressFamily.IP_V4
)
ipam_private_pool.provision_cidr("PrivatePoolACidrA", netmask_length=8)

VpcV2(self, "Vpc",
    primary_address_block=IpAddresses.ipv4("10.0.0.0/24"),
    secondary_address_blocks=[
        IpAddresses.amazon_provided_ipv6(cidr_block_name="AmazonIpv6"),
        IpAddresses.ipv6_ipam(
            ipam_pool=ipam_public_pool,
            netmask_length=52,
            cidr_block_name="ipv6Ipam"
        ),
        IpAddresses.ipv4_ipam(
            ipam_pool=ipam_private_pool,
            netmask_length=8,
            cidr_block_name="ipv4Ipam"
        )
    ]
)

Attributes

IP_V4

(experimental) Represents the IPv4 address family.

Allowed under public and private pool.

Stability:

experimental

IP_V6

(experimental) Represents the IPv6 address family.

Only allowed under public pool.

Stability:

experimental