OriginFailoverConfig Struct
The failover configuration used for Origin Groups, returned in OriginBindConfig.failoverConfig.
| Source | aws-cloudfront/lib/origin.ts |
|---|
Example
ts
// 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],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudfront as cloudfront
# origin: cloudfront.IOrigin
origin_failover_config = cloudfront.OriginFailoverConfig(
failover_origin=origin,
# the properties below are optional
status_codes=[123]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
IOrigin origin;
OriginFailoverConfig originFailoverConfig = OriginFailoverConfig.builder()
.failoverOrigin(origin)
// the properties below are optional
.statusCodes(List.of(123))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
IOrigin origin;
var originFailoverConfig = new OriginFailoverConfig {
FailoverOrigin = origin,
// the properties below are optional
StatusCodes = new [] { 123 }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var origin IOrigin
originFailoverConfig := &OriginFailoverConfig{
FailoverOrigin: origin,
// the properties below are optional
StatusCodes: []*f64{
jsii.Number(123),
},
}
Properties
failoverOriginIOriginfailover_originIOriginfailoverOriginIOriginFailoverOriginIOriginFailoverOriginIOrigin required #The origin to use as the fallback origin.
statusCodesoptionalnumber[]status_codesoptionaltyping.List[int | float]statusCodesoptionalList<Number>StatusCodesoptionaldouble[]StatusCodesoptional*[]*float64 #The HTTP status codes of the response that trigger querying the failover Origin.
Default: 500, 502, 503 and 504