Enum IpFamily

java.lang.Object
java.lang.Enum<IpFamily>
software.amazon.awscdk.services.eks.IpFamily
All Implemented Interfaces:
Serializable, Comparable<IpFamily>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:01.709Z") @Stability(Stable) public enum IpFamily extends Enum<IpFamily>
EKS cluster IP family.

Example:

 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_30)
         .vpc(vpc)
         .ipFamily(IpFamily.IP_V6)
         .vpcSubnets(List.of(SubnetSelection.builder().subnets(vpc.getPublicSubnets()).build()))
         .build();
 
  • Enum Constant Details

    • IP_V4

      @Stability(Stable) public static final IpFamily IP_V4
      Use IPv4 for pods and services in your cluster.
    • IP_V6

      @Stability(Stable) public static final IpFamily IP_V6
      Use IPv6 for pods and services in your cluster.
  • Method Details

    • values

      public static IpFamily[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static IpFamily valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null