OriginGroupFailoverCriteriaProperty Struct
A complex data type that includes information about the failover criteria for an origin group, including the status codes for which CloudFront will failover from the primary origin to the second origin.
| Source | |
|---|---|
| Type last changed |
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';
const originGroupFailoverCriteriaProperty: cloudfront.CfnDistribution.OriginGroupFailoverCriteriaProperty = {
statusCodes: {
items: [123],
quantity: 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_group_failover_criteria_property = cloudfront.CfnDistribution.OriginGroupFailoverCriteriaProperty(
status_codes=cloudfront.CfnDistribution.StatusCodesProperty(
items=[123],
quantity=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.*;
OriginGroupFailoverCriteriaProperty originGroupFailoverCriteriaProperty = OriginGroupFailoverCriteriaProperty.builder()
.statusCodes(StatusCodesProperty.builder()
.items(List.of(123))
.quantity(123)
.build())
.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;
var originGroupFailoverCriteriaProperty = new OriginGroupFailoverCriteriaProperty {
StatusCodes = new StatusCodesProperty {
Items = new [] { 123 },
Quantity = 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"
originGroupFailoverCriteriaProperty := &OriginGroupFailoverCriteriaProperty{
StatusCodes: &StatusCodesProperty{
Items: []interface{}{
jsii.Number(123),
},
Quantity: jsii.Number(123),
},
}
Properties
statusCodesIResolvable | CfnDistribution.status_codestyping.Union[IResolvable, StatusCodesProperty]statusCodesIResolvableStatusCodesIResolvableStatusCodesinterface{} required #The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin.