OriginFailoverConfig

class aws_cdk.aws_cloudfront.OriginFailoverConfig(*, failover_origin, status_codes=None)

Bases: object

The failover configuration used for Origin Groups, returned in {@link OriginBindConfig.failoverConfig}.

Parameters:
  • failover_origin (IOrigin) – The origin to use as the fallback origin.

  • status_codes (Optional[Sequence[Union[int, float]]]) – The HTTP status codes of the response that trigger querying the failover Origin. Default: - 500, 502, 503 and 504

ExampleMetadata:

fixture=_generated

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

# origin: cloudfront.IOrigin

origin_failover_config = cloudfront.OriginFailoverConfig(
    failover_origin=origin,

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

Attributes

failover_origin

The origin to use as the fallback origin.

status_codes

The HTTP status codes of the response that trigger querying the failover Origin.

Default:
  • 500, 502, 503 and 504