Enum OriginProtocolPolicy

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-04T00:39:29.073Z") @Stability(Stable) public enum OriginProtocolPolicy extends Enum<OriginProtocolPolicy>
Defines what protocols CloudFront will use to connect to an origin.

Example:

 import software.amazon.awscdk.services.elasticloadbalancingv2.*;
 ApplicationLoadBalancer loadBalancer;
 LoadBalancerV2Origin origin = LoadBalancerV2Origin.Builder.create(loadBalancer)
         .connectionAttempts(3)
         .connectionTimeout(Duration.seconds(5))
         .readTimeout(Duration.seconds(45))
         .keepaliveTimeout(Duration.seconds(45))
         .protocolPolicy(OriginProtocolPolicy.MATCH_VIEWER)
         .build();
 
  • Enum Constant Details

    • HTTP_ONLY

      @Stability(Stable) public static final OriginProtocolPolicy HTTP_ONLY
      Connect on HTTP only.
    • MATCH_VIEWER

      @Stability(Stable) public static final OriginProtocolPolicy MATCH_VIEWER
      Connect with the same protocol as the viewer.
    • HTTPS_ONLY

      @Stability(Stable) public static final OriginProtocolPolicy HTTPS_ONLY
      Connect on HTTPS only.
  • Method Details

    • values

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