- class aws_cdk.aws_cloudfront_origins.OriginGroup(*, fallback_origin, primary_origin, fallback_status_codes=None)
An Origin that represents a group.
Consists of a primary Origin, and a fallback Origin called when the primary returns one of the provided HTTP status codes.
my_bucket = s3.Bucket(self, "myBucket") cloudfront.Distribution(self, "myDist", default_behavior=cloudfront.BehaviorOptions( origin=origins.OriginGroup( primary_origin=origins.S3Origin(my_bucket), fallback_origin=origins.HttpOrigin("www.example.com"), # optional, defaults to: 500, 502, 503 and 504 fallback_status_codes= ) ) )
IOrigin) – The fallback origin that should serve requests when the primary fails.
IOrigin) – The primary origin that should serve requests for this group.
float]]]) – The list of HTTP status codes that, when returned from the primary origin, would cause querying the fallback origin. Default: - 500, 502, 503 and 504
- bind(scope, *, origin_id)
The method called when a given Origin is added (for the first time) to a Distribution.
str) – The identifier of this Origin, as assigned by the Distribution this Origin has been used added to.
- Return type: