Interface CfnVPCCidrBlockProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnVPCCidrBlockProps.Jsii$Proxy
CfnVPCCidrBlock.
Example:
import software.amazon.awscdk.cdk.lambdalayer.kubectl.v34.KubectlV34Layer;
Vpc vpc;
public void associateSubnetWithV6Cidr(Vpc vpc, Number count, ISubnet subnet) {
CfnSubnet cfnSubnet = (CfnSubnet)subnet.getNode().getDefaultChild();
cfnSubnet.getIpv6CidrBlock() = Fn.select(count, Fn.cidr(Fn.select(0, vpc.getVpcIpv6CidrBlocks()), 256, (128 - 64).toString()));
cfnSubnet.getAssignIpv6AddressOnCreation() = true;
}
// make an ipv6 cidr
CfnVPCCidrBlock ipv6cidr = CfnVPCCidrBlock.Builder.create(this, "CIDR6")
.vpcId(vpc.getVpcId())
.amazonProvidedIpv6CidrBlock(true)
.build();
// connect the ipv6 cidr to all vpc subnets
Number subnetcount = 0;
ISubnet[] subnets = vpc.publicSubnets.concat(vpc.getPrivateSubnets());
for (Object subnet : subnets) {
// Wait for the ipv6 cidr to complete
subnet.node.addDependency(ipv6cidr);
associateSubnetWithV6Cidr(vpc, subnetcount, subnet);
subnetcount = subnetcount + 1;
}
Cluster cluster = Cluster.Builder.create(this, "hello-eks")
.version(KubernetesVersion.V1_34)
.vpc(vpc)
.ipFamily(IpFamily.IP_V6)
.vpcSubnets(List.of(SubnetSelection.builder().subnets(vpc.getPublicSubnets()).build()))
.kubectlLayer(new KubectlV34Layer(this, "kubectl"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnVPCCidrBlockPropsstatic final classAn implementation forCfnVPCCidrBlockProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnVPCCidrBlockProps.Builderbuilder()default ObjectRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.default StringAn IPv4 CIDR block to associate with the VPC.default StringAssociate a CIDR allocated from an IPv4 IPAM pool to a VPC.default NumberThe netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.default StringAn IPv6 CIDR block from the IPv6 address pool.default StringThe name of the location from which we advertise the IPV6 CIDR block.default StringAssociates a CIDR allocated from an IPv6 IPAM pool to a VPC.default NumberThe netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.default StringThe ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.getVpcId()The ID of the VPC.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpcId
- See Also:
-
getAmazonProvidedIpv6CidrBlock
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.You cannot specify the range of IPv6 addresses or the size of the CIDR block.
Returns union: either
BooleanorIResolvable- See Also:
-
getCidrBlock
An IPv4 CIDR block to associate with the VPC.- See Also:
-
getIpv4IpamPoolId
Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
- See Also:
-
getIpv4NetmaskLength
The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
- See Also:
-
getIpv6CidrBlock
An IPv6 CIDR block from the IPv6 address pool. You must also specifyIpv6Poolin the request.To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
- See Also:
-
getIpv6CidrBlockNetworkBorderGroup
The name of the location from which we advertise the IPV6 CIDR block.Use this parameter to limit the CIDR block to this location.
You must set
AmazonProvidedIpv6CidrBlocktotrueto use this parameter.You can have one IPv6 CIDR block association per network border group.
- See Also:
-
getIpv6IpamPoolId
Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
- See Also:
-
getIpv6NetmaskLength
The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
- See Also:
-
getIpv6Pool
The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.- See Also:
-
builder
- Returns:
- a
CfnVPCCidrBlockProps.BuilderofCfnVPCCidrBlockProps
-