IpamPoolCidrProvisioningOptions

class aws_cdk.aws_ec2_alpha.IpamPoolCidrProvisioningOptions(*, cidr=None, netmask_length=None)

Bases: object

(experimental) Options to provision CIDRs to an IPAM pool.

Used to create a new IpamPoolCidr

Parameters:
  • cidr (Optional[str]) – (experimental) Ipv6 CIDR block for the IPAM pool. Default: - pool provisioned without netmask length, need netmask length in this case

  • netmask_length (Union[int, float, None]) – (experimental) Ipv6 Netmask length for the CIDR. Default: - pool provisioned without netmask length, need cidr range in this case

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampoolcidr.html

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

cidr

(experimental) Ipv6 CIDR block for the IPAM pool.

Default:
  • pool provisioned without netmask length, need netmask length in this case

Stability:

experimental

netmask_length

(experimental) Ipv6 Netmask length for the CIDR.

Default:
  • pool provisioned without netmask length, need cidr range in this case

Stability:

experimental