enum AddressFamily
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.AddressFamily |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#AddressFamily |
Java | software.amazon.awscdk.services.ec2.alpha.AddressFamily |
Python | aws_cdk.aws_ec2_alpha.AddressFamily |
TypeScript (source) | @aws-cdk/aws-ec2-alpha » AddressFamily |
Represents the address family for IP addresses in an IPAM pool.
IP_V4 - Represents the IPv4 address family. IP_V6 - Represents the IPv6 address family.
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',
}),
],
});
Members
Name | Description |
---|---|
IP_V4 | Represents the IPv4 address family. |
IP_V6 | Represents the IPv6 address family. |
IP_V4
Represents the IPv4 address family.
Allowed under public and private pool.
IP_V6
Represents the IPv6 address family.
Only allowed under public pool.