Enum FailoverStatusCode
- All Implemented Interfaces:
Serializable
,Comparable<FailoverStatusCode>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.681Z")
@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();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBad Gateway (502).Forbidden (403).Gateway Timeout (504).Internal Server Error (500).Not found (404).Service Unavailable (503). -
Method Summary
Modifier and TypeMethodDescriptionstatic FailoverStatusCode
Returns the enum constant of this type with the specified name.static FailoverStatusCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FORBIDDEN
Forbidden (403). -
NOT_FOUND
Not found (404). -
INTERNAL_SERVER_ERROR
Internal Server Error (500). -
BAD_GATEWAY
Bad Gateway (502). -
SERVICE_UNAVAILABLE
Service Unavailable (503). -
GATEWAY_TIMEOUT
Gateway Timeout (504).
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-