Interface OriginOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
FunctionUrlOriginBaseProps,FunctionUrlOriginProps,FunctionUrlOriginWithOACProps,HttpOriginProps,LoadBalancerV2OriginProps,OriginProps,RestApiOriginProps,S3BucketOriginBaseProps,S3BucketOriginWithOACProps,S3BucketOriginWithOAIProps,S3OriginProps,S3StaticWebsiteOriginProps,VpcOriginProps,VpcOriginWithEndpointProps
- All Known Implementing Classes:
FunctionUrlOriginBaseProps.Jsii$Proxy,FunctionUrlOriginProps.Jsii$Proxy,FunctionUrlOriginWithOACProps.Jsii$Proxy,HttpOriginProps.Jsii$Proxy,LoadBalancerV2OriginProps.Jsii$Proxy,OriginOptions.Jsii$Proxy,OriginProps.Jsii$Proxy,RestApiOriginProps.Jsii$Proxy,S3BucketOriginBaseProps.Jsii$Proxy,S3BucketOriginWithOACProps.Jsii$Proxy,S3BucketOriginWithOAIProps.Jsii$Proxy,S3OriginProps.Jsii$Proxy,S3StaticWebsiteOriginProps.Jsii$Proxy,VpcOriginProps.Jsii$Proxy,VpcOriginWithEndpointProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:34.372Z")
@Stability(Stable)
public interface OriginOptions
extends software.amazon.jsii.JsiiSerializable
Options to define an Origin.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.cloudfront.*;
OriginOptions originOptions = OriginOptions.builder()
.connectionAttempts(123)
.connectionTimeout(Duration.minutes(30))
.customHeaders(Map.of(
"customHeadersKey", "customHeaders"))
.originAccessControlId("originAccessControlId")
.originId("originId")
.originShieldEnabled(false)
.originShieldRegion("originShieldRegion")
.responseCompletionTimeout(Duration.minutes(30))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forOriginOptionsstatic final classAn implementation forOriginOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic OriginOptions.Builderbuilder()default NumberThe number of times that CloudFront attempts to connect to the origin;default DurationThe number of seconds that CloudFront waits when trying to establish a connection to the origin.A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.default StringThe unique identifier of an origin access control for this origin.default StringA unique identifier for the origin.default BooleanOrigin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.default StringWhen you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.default DurationThe time that a request from CloudFront to the origin can stay open and wait for a response.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getConnectionAttempts
The number of times that CloudFront attempts to connect to the origin;valid values are 1, 2, or 3 attempts.
Default: 3
-
getConnectionTimeout
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)
-
getCustomHeaders
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.Default: {}
-
getOriginAccessControlId
The unique identifier of an origin access control for this origin.Default: - no origin access control
-
getOriginId
A unique identifier for the origin.This value must be unique within the distribution.
Default: - an originid will be generated for you
-
getOriginShieldEnabled
Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.Default: - true
-
getOriginShieldRegion
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 Also:
-
getResponseCompletionTimeout
The time that a request from CloudFront to the origin can stay open and wait for a response.If the complete response isn't received from the origin by this time, CloudFront ends the connection.
Valid values are 1-3600 seconds, inclusive.
Default: undefined - AWS CloudFront default is not enforcing a maximum value
- See Also:
-
builder
- Returns:
- a
OriginOptions.BuilderofOriginOptions
-