Enum FailoverStatusCode

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:34.934Z") @Stability(Stable) public enum FailoverStatusCode extends Enum<FailoverStatusCode>
HTTP status code to failover to second origin.

Example:

 // Configuring origin fallback options for the CloudFrontWebDistribution
 // Configuring origin fallback options for the CloudFrontWebDistribution
 CloudFrontWebDistribution.Builder.create(this, "ADistribution")
         .originConfigs(List.of(SourceConfiguration.builder()
                 .s3OriginSource(S3OriginConfig.builder()
                         .s3BucketSource(Bucket.fromBucketName(this, "aBucket", "myoriginbucket"))
                         .originPath("/")
                         .originHeaders(Map.of(
                                 "myHeader", "42"))
                         .originShieldRegion("us-west-2")
                         .build())
                 .failoverS3OriginSource(S3OriginConfig.builder()
                         .s3BucketSource(Bucket.fromBucketName(this, "aBucketFallback", "myoriginbucketfallback"))
                         .originPath("/somewhere")
                         .originHeaders(Map.of(
                                 "myHeader2", "21"))
                         .originShieldRegion("us-east-1")
                         .build())
                 .failoverCriteriaStatusCodes(List.of(FailoverStatusCode.INTERNAL_SERVER_ERROR))
                 .behaviors(List.of(Behavior.builder()
                         .isDefaultBehavior(true)
                         .build()))
                 .build()))
         .build();
 
  • Enum Constant Details

    • FORBIDDEN

      @Stability(Stable) public static final FailoverStatusCode FORBIDDEN
      Forbidden (403).
    • NOT_FOUND

      @Stability(Stable) public static final FailoverStatusCode NOT_FOUND
      Not found (404).
    • INTERNAL_SERVER_ERROR

      @Stability(Stable) public static final FailoverStatusCode INTERNAL_SERVER_ERROR
      Internal Server Error (500).
    • BAD_GATEWAY

      @Stability(Stable) public static final FailoverStatusCode BAD_GATEWAY
      Bad Gateway (502).
    • SERVICE_UNAVAILABLE

      @Stability(Stable) public static final FailoverStatusCode SERVICE_UNAVAILABLE
      Service Unavailable (503).
    • GATEWAY_TIMEOUT

      @Stability(Stable) public static final FailoverStatusCode GATEWAY_TIMEOUT
      Gateway Timeout (504).
  • Method Details

    • values

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