interface OriginGroupProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudFront.CfnDistribution.OriginGroupProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnDistribution_OriginGroupProperty |
Java | software.amazon.awscdk.services.cloudfront.CfnDistribution.OriginGroupProperty |
Python | aws_cdk.aws_cloudfront.CfnDistribution.OriginGroupProperty |
TypeScript | aws-cdk-lib » aws_cloudfront » CfnDistribution » OriginGroupProperty |
An origin group includes two origins (a primary origin and a secondary origin to failover to) and a failover criteria that you specify.
You create an origin group to support origin failover in CloudFront. When you create or update a distribution, you can specify the origin group instead of a single origin, and CloudFront will failover from the primary origin to the secondary origin under the failover conditions that you've chosen.
Optionally, you can choose selection criteria for your origin group to specify how your origins are selected when your distribution routes viewer requests.
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';
const originGroupProperty: cloudfront.CfnDistribution.OriginGroupProperty = {
failoverCriteria: {
statusCodes: {
items: [123],
quantity: 123,
},
},
id: 'id',
members: {
items: [{
originId: 'originId',
}],
quantity: 123,
},
// the properties below are optional
selectionCriteria: 'selectionCriteria',
};
Properties
Name | Type | Description |
---|---|---|
failover | IResolvable | Origin | A complex type that contains information about the failover criteria for an origin group. |
id | string | The origin group's ID. |
members | IResolvable | Origin | A complex type that contains information about the origins in an origin group. |
selection | string | The selection criteria for the origin group. |
failoverCriteria
Type:
IResolvable
|
Origin
A complex type that contains information about the failover criteria for an origin group.
id
Type:
string
The origin group's ID.
members
Type:
IResolvable
|
Origin
A complex type that contains information about the origins in an origin group.
selectionCriteria?
Type:
string
(optional)
The selection criteria for the origin group.
For more information, see Create an origin group in the Amazon CloudFront Developer Guide .