PoolOptions
- class aws_cdk.aws_ec2_alpha.PoolOptions(*, address_family, aws_service=None, ipv4_provisioned_cidrs=None, locale=None, public_ip_source=None)
Bases:
object
(experimental) Options for configuring an IPAM pool.
- Parameters:
address_family (
AddressFamily
) – (experimental) addressFamily - The address family of the pool (ipv4 or ipv6).aws_service (
Optional
[AwsServiceName
]) – (experimental) Limits which service in AWS that the pool can be used in. “ec2”, for example, allows users to use space for Elastic IP addresses and VPCs. Default: - required in case of an IPv6, throws an error if not provided.ipv4_provisioned_cidrs (
Optional
[Sequence
[str
]]) – (experimental) Information about the CIDRs provisioned to the pool. Default: - No CIDRs are provisionedlocale (
Optional
[str
]) – (experimental) The locale (AWS Region) of the pool. Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you’ll get an error. Default: - Current operating region of IPAMpublic_ip_source (
Optional
[IpamPoolPublicIpSource
]) – (experimental) The IP address source for pools in the public scope. Only used for IPv6 address Only allowed values to this are ‘byoip’ or ‘amazon’ Default: amazon
- See:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.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
- address_family
(experimental) addressFamily - The address family of the pool (ipv4 or ipv6).
- Stability:
experimental
- aws_service
(experimental) Limits which service in AWS that the pool can be used in.
“ec2”, for example, allows users to use space for Elastic IP addresses and VPCs.
- Default:
required in case of an IPv6, throws an error if not provided.
- See:
- Stability:
experimental
- ipv4_provisioned_cidrs
(experimental) Information about the CIDRs provisioned to the pool.
- Default:
No CIDRs are provisioned
- Stability:
experimental
- locale
(experimental) The locale (AWS Region) of the pool.
Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you’ll get an error.
- Default:
Current operating region of IPAM
- See:
- Stability:
experimental
- public_ip_source
(experimental) The IP address source for pools in the public scope.
Only used for IPv6 address Only allowed values to this are ‘byoip’ or ‘amazon’
- Default:
amazon
- Stability:
experimental