aws-cdk-lib.aws_cloudfront.OriginFailoverConfig

interface OriginFailoverConfig

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.OriginFailoverConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#OriginFailoverConfig
Javasoftware.amazon.awscdk.services.cloudfront.OriginFailoverConfig
Pythonaws_cdk.aws_cloudfront.OriginFailoverConfig
TypeScript (source)aws-cdk-lib » aws_cloudfront » OriginFailoverConfig

The failover configuration used for Origin Groups, returned in OriginBindConfig.failoverConfig.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';

declare const origin: cloudfront.IOrigin;
const originFailoverConfig: cloudfront.OriginFailoverConfig = {
  failoverOrigin: origin,

  // the properties below are optional
  statusCodes: [123],
};

Properties

NameTypeDescription
failoverOriginIOriginThe origin to use as the fallback origin.
statusCodes?number[]The HTTP status codes of the response that trigger querying the failover Origin.

failoverOrigin

Type: IOrigin

The origin to use as the fallback origin.


statusCodes?

Type: number[] (optional, default: 500, 502, 503 and 504)

The HTTP status codes of the response that trigger querying the failover Origin.