OriginProps
- class aws_cdk.aws_cloudfront.OriginProps(*, connection_attempts=None, connection_timeout=None, custom_headers=None, origin_shield_region=None, origin_path=None)
Bases:
OriginOptions
Properties to define an Origin.
- 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: 3connection_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_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 enabledorigin_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: ‘/’
- 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 import aws_cdk.core as cdk origin_props = cloudfront.OriginProps( connection_attempts=123, connection_timeout=cdk.Duration.minutes(30), custom_headers={ "custom_headers_key": "customHeaders" }, origin_path="originPath", origin_shield_region="originShieldRegion" )
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
- 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)
- custom_headers
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
- Default:
{}
- 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:
‘/’
- 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: