interface IpamOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.IpamOptions |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#IpamOptions |
Java | software.amazon.awscdk.services.ec2.alpha.IpamOptions |
Python | aws_cdk.aws_ec2_alpha.IpamOptions |
TypeScript (source) | @aws-cdk/aws-ec2-alpha » IpamOptions |
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}.
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 |
---|---|---|
cidr | string | Required to set Secondary cidr block resource name in order to generate unique logical id for the resource. |
ipam | IIpam | Ipv4 or an Ipv6 IPAM pool Only required when using AWS Ipam. |
netmask | number | CIDR Mask for Vpc Only required when using AWS Ipam. |
cidrBlockName
Type:
string
Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.
ipamPool?
Type:
IIpam
(optional, default: no pool attached to VPC secondary address)
Ipv4 or an Ipv6 IPAM pool Only required when using AWS Ipam.
netmaskLength?
Type:
number
(optional, default: no netmask length for IPAM attached to VPC secondary address)
CIDR Mask for Vpc Only required when using AWS Ipam.