Enum IpProtocol

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:06.187Z") @Stability(Stable) public enum IpProtocol extends Enum<IpProtocol>
The types of IP addresses provisioned in the VPC.

Example:

 Vpc vpc = Vpc.Builder.create(this, "TheVPC")
         .ipProtocol(IpProtocol.DUAL_STACK)
         .subnetConfiguration(List.of(SubnetConfiguration.builder()
                 // general properties
                 .name("Public")
                 .subnetType(SubnetType.PUBLIC)
                 .reserved(false)
                 // IPv4 specific properties
                 .mapPublicIpOnLaunch(true)
                 .cidrMask(24)
                 // new IPv6 specific property
                 .ipv6AssignAddressOnCreation(true)
                 .build()))
         .build();
 
  • Enum Constant Details

    • IPV4_ONLY

      @Stability(Stable) public static final IpProtocol IPV4_ONLY
      The vpc will be configured with only IPv4 addresses.

      This is the default protocol if unset.

    • DUAL_STACK

      @Stability(Stable) public static final IpProtocol DUAL_STACK
      The vpc will have both IPv4 and IPv6 addresses.

      Unless specified, public IPv4 addresses will not be auto assigned, an egress only internet gateway (EIGW) will be created and configured, and NATs and internet gateways (IGW) will be configured with IPv6 addresses.

  • Method Details

    • values

      public static IpProtocol[] 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 IpProtocol 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