IpamOptions

class aws_cdk.aws_ec2_alpha.IpamOptions(*, cidr_block_name, ipam_pool=None, netmask_length=None)

Bases: object

(experimental) Options for configuring an IP Address Manager (IPAM).

For more information, see the {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html}.

Parameters:
  • cidr_block_name (str) – (experimental) Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.

  • ipam_pool (Optional[IIpamPool]) – (experimental) Ipv4 or an Ipv6 IPAM pool Only required when using AWS Ipam. Default: - no pool attached to VPC secondary address

  • netmask_length (Union[int, float, None]) – (experimental) CIDR Mask for Vpc Only required when using AWS Ipam. Default: - no netmask length for IPAM attached to VPC secondary address

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_block_name

(experimental) Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.

Stability:

experimental

ipam_pool

(experimental) Ipv4 or an Ipv6 IPAM pool Only required when using AWS Ipam.

Default:
  • no pool attached to VPC secondary address

Stability:

experimental

netmask_length

(experimental) CIDR Mask for Vpc Only required when using AWS Ipam.

Default:
  • no netmask length for IPAM attached to VPC secondary address

Stability:

experimental