Class FailoverStatusCode
HTTP status code to failover to second origin.
Inheritance
System.Object
FailoverStatusCode
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class FailoverStatusCode : Enum
Syntax (vb)
Public NotInheritable Class FailoverStatusCode
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
// Configuring origin fallback options for the CloudFrontWebDistribution
// Configuring origin fallback options for the CloudFrontWebDistribution
new CloudFrontWebDistribution(this, "ADistribution", new CloudFrontWebDistributionProps {
OriginConfigs = new [] { new SourceConfiguration {
S3OriginSource = new S3OriginConfig {
S3BucketSource = Bucket.FromBucketName(this, "aBucket", "amzn-s3-demo-bucket"),
OriginPath = "/",
OriginHeaders = new Dictionary<string, string> {
{ "myHeader", "42" }
},
OriginShieldRegion = "us-west-2"
},
FailoverS3OriginSource = new S3OriginConfig {
S3BucketSource = Bucket.FromBucketName(this, "aBucketFallback", "amzn-s3-demo-bucket1"),
OriginPath = "/somewhere",
OriginHeaders = new Dictionary<string, string> {
{ "myHeader2", "21" }
},
OriginShieldRegion = "us-east-1"
},
FailoverCriteriaStatusCodes = new [] { FailoverStatusCode.INTERNAL_SERVER_ERROR },
Behaviors = new [] { new Behavior {
IsDefaultBehavior = true
} }
} }
});
Synopsis
Fields
BAD_GATEWAY | Bad Gateway (502). |
FORBIDDEN | Forbidden (403). |
GATEWAY_TIMEOUT | Gateway Timeout (504). |
INTERNAL_SERVER_ERROR | Internal Server Error (500). |
NOT_FOUND | Not found (404). |
SERVICE_UNAVAILABLE | Service Unavailable (503). |
value__ |
Fields
BAD_GATEWAY
Bad Gateway (502).
public const FailoverStatusCode BAD_GATEWAY
Field Value
Type | Description |
---|---|
FailoverStatusCode |
FORBIDDEN
Forbidden (403).
public const FailoverStatusCode FORBIDDEN
Field Value
Type | Description |
---|---|
FailoverStatusCode |
GATEWAY_TIMEOUT
Gateway Timeout (504).
public const FailoverStatusCode GATEWAY_TIMEOUT
Field Value
Type | Description |
---|---|
FailoverStatusCode |
INTERNAL_SERVER_ERROR
Internal Server Error (500).
public const FailoverStatusCode INTERNAL_SERVER_ERROR
Field Value
Type | Description |
---|---|
FailoverStatusCode |
NOT_FOUND
Not found (404).
public const FailoverStatusCode NOT_FOUND
Field Value
Type | Description |
---|---|
FailoverStatusCode |
SERVICE_UNAVAILABLE
Service Unavailable (503).
public const FailoverStatusCode SERVICE_UNAVAILABLE
Field Value
Type | Description |
---|---|
FailoverStatusCode |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |