OriginGroupProps

class aws_cdk.aws_cloudfront_origins.OriginGroupProps(*, fallback_origin, fallback_status_codes=None, primary_origin)

Bases: object

Construction properties for {@link OriginGroup}.

Parameters
  • fallback_origin (IOrigin) – The fallback origin that should serve requests when the primary fails.

  • fallback_status_codes (Optional[Sequence[Union[int, 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

  • primary_origin (IOrigin) – The primary origin that should serve requests for this group.

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cloudfront as cloudfront
import aws_cdk.aws_cloudfront_origins as cloudfront_origins

# origin is of type IOrigin

origin_group_props = cloudfront_origins.OriginGroupProps(
    fallback_origin=origin,
    primary_origin=origin,

    # the properties below are optional
    fallback_status_codes=[123]
)

Attributes

fallback_origin

The fallback origin that should serve requests when the primary fails.

Return type

IOrigin

fallback_status_codes

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

Return type

Optional[List[Union[int, float]]]

primary_origin

The primary origin that should serve requests for this group.

Return type

IOrigin