Class CfnVPCCidrBlockProps
Properties for defining a CfnVPCCidrBlock
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnVPCCidrBlockProps : Object, ICfnVPCCidrBlockProps
Syntax (vb)
Public Class CfnVPCCidrBlockProps
Inherits Object
Implements ICfnVPCCidrBlockProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html
ExampleMetadata: infused
Examples
Vpc vpc;
public void AssociateSubnetWithV6Cidr(Vpc vpc, int count, ISubnet subnet)
{
var cfnSubnet = (CfnSubnet)subnet.Node.DefaultChild;
cfnSubnet.Ipv6CidrBlock = Fn.Select(count, Fn.Cidr(Fn.Select(0, vpc.VpcIpv6CidrBlocks), 256, (128 - 64).ToString()));
cfnSubnet.AssignIpv6AddressOnCreation = true;
}
// make an ipv6 cidr
var ipv6cidr = new CfnVPCCidrBlock(this, "CIDR6", new CfnVPCCidrBlockProps {
VpcId = vpc.VpcId,
AmazonProvidedIpv6CidrBlock = true
});
// connect the ipv6 cidr to all vpc subnets
var subnetcount = 0;
var subnets = vpc.PublicSubnets.Concat(vpc.PrivateSubnets);
for (var subnet in subnets)
{
// Wait for the ipv6 cidr to complete
subnet.Node.AddDependency(ipv6cidr);
AssociateSubnetWithV6Cidr(vpc, subnetcount, subnet);
subnetcount = subnetcount + 1;
}
var cluster = new Cluster(this, "hello-eks", new ClusterProps {
Version = KubernetesVersion.V1_29,
Vpc = vpc,
IpFamily = IpFamily.IP_V6,
VpcSubnets = new [] { new SubnetSelection { Subnets = vpc.PublicSubnets } }
});
Synopsis
Constructors
CfnVPCCidrBlockProps() |
Properties
AmazonProvidedIpv6CidrBlock | Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. |
CidrBlock | An IPv4 CIDR block to associate with the VPC. |
Ipv4IpamPoolId | Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. |
Ipv4NetmaskLength | The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. |
Ipv6CidrBlock | An IPv6 CIDR block from the IPv6 address pool. You must also specify |
Ipv6IpamPoolId | Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. |
Ipv6NetmaskLength | The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. |
Ipv6Pool | The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block. |
VpcId | The ID of the VPC. |
Constructors
CfnVPCCidrBlockProps()
public CfnVPCCidrBlockProps()
Properties
AmazonProvidedIpv6CidrBlock
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
public object AmazonProvidedIpv6CidrBlock { get; set; }
Property Value
System.Object
Remarks
You cannot specify the range of IPv6 addresses or the size of the CIDR block.
CidrBlock
An IPv4 CIDR block to associate with the VPC.
public string CidrBlock { get; set; }
Property Value
System.String
Remarks
Ipv4IpamPoolId
Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.
public string Ipv4IpamPoolId { get; set; }
Property Value
System.String
Remarks
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
Ipv4NetmaskLength
The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
public Nullable<double> Ipv4NetmaskLength { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
Ipv6CidrBlock
An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool
in the request.
public string Ipv6CidrBlock { get; set; }
Property Value
System.String
Remarks
To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
Ipv6IpamPoolId
Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.
public string Ipv6IpamPoolId { get; set; }
Property Value
System.String
Remarks
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
Ipv6NetmaskLength
The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
public Nullable<double> Ipv6NetmaskLength { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
Ipv6Pool
The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
public string Ipv6Pool { get; set; }
Property Value
System.String
Remarks
VpcId
The ID of the VPC.
public string VpcId { get; set; }
Property Value
System.String