Experimental
@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
PoolOptions Struct
Options for configuring an IPAM pool.
Example
const stack = new Stack();
const ipam = new Ipam(this, 'Ipam', {
operatingRegions: ['us-west-1']
});
const ipamPublicPool = ipam.publicScope.addPool('PublicPoolA', {
addressFamily: AddressFamily.IP_V6,
awsService: AwsServiceName.EC2,
locale: 'us-west-1',
publicIpSource: IpamPoolPublicIpSource.AMAZON,
});
ipamPublicPool.provisionCidr('PublicPoolACidrA', { netmaskLength: 52 } );
const ipamPrivatePool = ipam.privateScope.addPool('PrivatePoolA', {
addressFamily: AddressFamily.IP_V4,
});
ipamPrivatePool.provisionCidr('PrivatePoolACidrA', { netmaskLength: 8 } );
new VpcV2(this, 'Vpc', {
primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/24'),
secondaryAddressBlocks: [
IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonIpv6' }),
IpAddresses.ipv6Ipam({
ipamPool: ipamPublicPool,
netmaskLength: 52,
cidrBlockName: 'ipv6Ipam',
}),
IpAddresses.ipv4Ipam({
ipamPool: ipamPrivatePool,
netmaskLength: 8,
cidrBlockName: 'ipv4Ipam',
}),
],
});
Properties
addressFamilyAddressFamilyaddress_familyAddressFamilyaddressFamilyAddressFamilyAddressFamilyAddressFamilyAddressFamilyAddressFamilyrequired#awsServiceAwsServiceNameaws_serviceAwsServiceNameawsServiceAwsServiceNameAwsServiceAwsServiceNameAwsServiceAwsServiceName= required in case of an IPv6, thr…#"ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
default
Default: required in case of an IPv6, throws an error if not provided.
ipamPoolNamestringipam_pool_namestripamPoolNameStringIpamPoolNamestringIpamPoolName*string= autogenerated by CDK if not prov…#default
Default: autogenerated by CDK if not provided
ipv4ProvisionedCidrsstring[]ipv4_provisioned_cidrstyping.List[str]ipv4ProvisionedCidrsList<String>Ipv4ProvisionedCidrsstring[]Ipv4ProvisionedCidrs*[]*string= No CIDRs are provisioned#notes
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.
publicIpSourceIpamPoolPublicIpSourcepublic_ip_sourceIpamPoolPublicIpSourcepublicIpSourceIpamPoolPublicIpSourcePublicIpSourceIpamPoolPublicIpSourcePublicIpSourceIpamPoolPublicIpSource= amazon#Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon'