interface PoolOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.PoolOptions |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#PoolOptions |
Java | software.amazon.awscdk.services.ec2.alpha.PoolOptions |
Python | aws_cdk.aws_ec2_alpha.PoolOptions |
TypeScript (source) | @aws-cdk/aws-ec2-alpha ยป PoolOptions |
Options for configuring an IPAM pool.
Example
const stack = new Stack();
const ipam = new Ipam(this, 'Ipam', {
operatingRegion: ['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
Name | Type | Description |
---|---|---|
address | Address | addressFamily - The address family of the pool (ipv4 or ipv6). |
aws | Aws | Limits which service in AWS that the pool can be used in. |
ipv4 | string[] | Information about the CIDRs provisioned to the pool. |
locale? | string | The locale (AWS Region) of the pool. |
public | Ipam | The IP address source for pools in the public scope. |
addressFamily
Type:
Address
addressFamily - The address family of the pool (ipv4 or ipv6).
awsService?
Type:
Aws
(optional, default: required in case of an IPv6, throws an error if not provided.)
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.
ipv4ProvisionedCidrs?
Type:
string[]
(optional, default: No CIDRs are provisioned)
Information about the CIDRs provisioned to the pool.
locale?
Type:
string
(optional, default: Current operating region of IPAM)
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.
publicIpSource?
Type:
Ipam
(optional, default: amazon)
The IP address source for pools in the public scope.
Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon'