LoadBalancerV2OriginProps

class aws_cdk.aws_cloudfront_origins.LoadBalancerV2OriginProps(*, connection_attempts=None, connection_timeout=None, custom_headers=None, origin_path=None, origin_shield_region=None, http_port=None, https_port=None, keepalive_timeout=None, origin_ssl_protocols=None, protocol_policy=None, read_timeout=None)

Bases: aws_cdk.aws_cloudfront_origins.HttpOriginProps

Properties for an Origin backed by a v2 load balancer.

Parameters
  • connection_attempts (Union[int, float, None]) – The number of times that CloudFront attempts to connect to the origin; valid values are 1, 2, or 3 attempts. Default: 3

  • connection_timeout (Optional[Duration]) – The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive. Default: Duration.seconds(10)

  • custom_headers (Optional[Mapping[str, str]]) – A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. Default: {}

  • origin_path (Optional[str]) – An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. Must begin, but not end, with ‘/’ (e.g., ‘/production/images’). Default: ‘/’

  • origin_shield_region (Optional[str]) – When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. Default: - origin shield not enabled

  • http_port (Union[int, float, None]) – The HTTP port that CloudFront uses to connect to the origin. Default: 80

  • https_port (Union[int, float, None]) – The HTTPS port that CloudFront uses to connect to the origin. Default: 443

  • keepalive_timeout (Optional[Duration]) – Specifies how long, in seconds, CloudFront persists its connection to the origin. The valid range is from 1 to 60 seconds, inclusive. Default: Duration.seconds(5)

  • origin_ssl_protocols (Optional[Sequence[OriginSslPolicy]]) – The SSL versions to use when interacting with the origin. Default: OriginSslPolicy.TLS_V1_2

  • protocol_policy (Optional[OriginProtocolPolicy]) – Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. Default: OriginProtocolPolicy.HTTPS_ONLY

  • read_timeout (Optional[Duration]) – Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout. The valid range is from 1 to 60 seconds, inclusive. Default: Duration.seconds(30)

Attributes

connection_attempts

The number of times that CloudFront attempts to connect to the origin;

valid values are 1, 2, or 3 attempts.

Default

3

Return type

Union[int, float, None]

connection_timeout

The number of seconds that CloudFront waits when trying to establish a connection to the origin.

Valid values are 1-10 seconds, inclusive.

Default

Duration.seconds(10)

Return type

Optional[Duration]

custom_headers

A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.

Default

{}

Return type

Optional[Mapping[str, str]]

http_port

The HTTP port that CloudFront uses to connect to the origin.

Default

80

Return type

Union[int, float, None]

https_port

The HTTPS port that CloudFront uses to connect to the origin.

Default

443

Return type

Union[int, float, None]

keepalive_timeout

Specifies how long, in seconds, CloudFront persists its connection to the origin.

The valid range is from 1 to 60 seconds, inclusive.

Default

Duration.seconds(5)

Return type

Optional[Duration]

origin_path

An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.

Must begin, but not end, with ‘/’ (e.g., ‘/production/images’).

Default

‘/’

Return type

Optional[str]

origin_shield_region

When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.

Default
  • origin shield not enabled

See

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html

Return type

Optional[str]

origin_ssl_protocols

The SSL versions to use when interacting with the origin.

Default

OriginSslPolicy.TLS_V1_2

Return type

Optional[List[OriginSslPolicy]]

protocol_policy

Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin.

Default

OriginProtocolPolicy.HTTPS_ONLY

Return type

Optional[OriginProtocolPolicy]

read_timeout

Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout.

The valid range is from 1 to 60 seconds, inclusive.

Default

Duration.seconds(30)

Return type

Optional[Duration]