Enum OriginIpAddressType

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

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-13T16:10:00.603Z") @Stability(Stable) public enum OriginIpAddressType extends Enum<OriginIpAddressType>
The IP address type for the origin.

Determines whether CloudFront uses IPv4, IPv6, or both when connecting to the origin.

Example:

 HttpOrigin origin = HttpOrigin.Builder.create("www.example.com")
         .ipAddressType(OriginIpAddressType.IPV6)
         .build();
 Distribution.Builder.create(this, "Distribution")
         .defaultBehavior(BehaviorOptions.builder().origin(origin).build())
         .build();
 
  • Enum Constant Details

    • IPV4

      @Stability(Stable) public static final OriginIpAddressType IPV4
      Use only IPv4 addresses.
    • IPV6

      @Stability(Stable) public static final OriginIpAddressType IPV6
      Use only IPv6 addresses.
    • DUALSTACK

      @Stability(Stable) public static final OriginIpAddressType DUALSTACK
      Use both IPv4 and IPv6 addresses.
  • Method Details

    • values

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