Show / Hide Table of Contents

Enum FailoverStatusCode

HTTP status code to failover to second origin.

Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum FailoverStatusCode
Syntax (vb)
Public Enum FailoverStatusCode
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).

Fields

Name Description
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).

Back to top Generated by DocFX