Class S3StaticWebsiteOrigin.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<S3StaticWebsiteOrigin>
- Enclosing class:
S3StaticWebsiteOrigin
S3StaticWebsiteOrigin
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
connectionAttempts
(Number connectionAttempts) The number of times that CloudFront attempts to connect to the origin;connectionTimeout
(Duration connectionTimeout) The number of seconds that CloudFront waits when trying to establish a connection to the origin.customHeaders
(Map<String, String> customHeaders) A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.The HTTP port that CloudFront uses to connect to the origin.The HTTPS port that CloudFront uses to connect to the origin.keepaliveTimeout
(Duration keepaliveTimeout) Specifies how long, in seconds, CloudFront persists its connection to the origin.originAccessControlId
(String originAccessControlId) The unique identifier of an origin access control for this origin.A unique identifier for the origin.originPath
(String originPath) An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.originShieldEnabled
(Boolean originShieldEnabled) 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.originShieldRegion
(String originShieldRegion) When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.originSslProtocols
(List<? extends OriginSslPolicy> originSslProtocols) The SSL versions to use when interacting with the origin.protocolPolicy
(OriginProtocolPolicy protocolPolicy) Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin.readTimeout
(Duration readTimeout) Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout.
-
Method Details
-
create
- Parameters:
bucket
- This parameter is required.- Returns:
- a new instance of
S3StaticWebsiteOrigin.Builder
.
-
connectionAttempts
@Stability(Stable) public S3StaticWebsiteOrigin.Builder connectionAttempts(Number connectionAttempts) The number of times that CloudFront attempts to connect to the origin;valid values are 1, 2, or 3 attempts.
Default: 3
- Parameters:
connectionAttempts
- The number of times that CloudFront attempts to connect to the origin;. This parameter is required.- Returns:
this
-
connectionTimeout
@Stability(Stable) public S3StaticWebsiteOrigin.Builder connectionTimeout(Duration connectionTimeout) 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)
- Parameters:
connectionTimeout
- The number of seconds that CloudFront waits when trying to establish a connection to the origin. This parameter is required.- Returns:
this
-
customHeaders
@Stability(Stable) public S3StaticWebsiteOrigin.Builder customHeaders(Map<String, String> customHeaders) A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.Default: {}
- Parameters:
customHeaders
- A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. This parameter is required.- Returns:
this
-
originAccessControlId
@Stability(Stable) public S3StaticWebsiteOrigin.Builder originAccessControlId(String originAccessControlId) The unique identifier of an origin access control for this origin.Default: - no origin access control
- Parameters:
originAccessControlId
- The unique identifier of an origin access control for this origin. This parameter is required.- Returns:
this
-
originId
A unique identifier for the origin.This value must be unique within the distribution.
Default: - an originid will be generated for you
- Parameters:
originId
- A unique identifier for the origin. This parameter is required.- Returns:
this
-
originShieldEnabled
@Stability(Stable) public S3StaticWebsiteOrigin.Builder originShieldEnabled(Boolean originShieldEnabled) 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
- Parameters:
originShieldEnabled
- 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. This parameter is required.- Returns:
this
-
originShieldRegion
@Stability(Stable) public S3StaticWebsiteOrigin.Builder originShieldRegion(String originShieldRegion) 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
- Parameters:
originShieldRegion
- When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. This parameter is required.- Returns:
this
- See Also:
-
originPath
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: '/'
- Parameters:
originPath
- An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. This parameter is required.- Returns:
this
-
httpPort
The HTTP port that CloudFront uses to connect to the origin.Default: 80
- Parameters:
httpPort
- The HTTP port that CloudFront uses to connect to the origin. This parameter is required.- Returns:
this
-
httpsPort
The HTTPS port that CloudFront uses to connect to the origin.Default: 443
- Parameters:
httpsPort
- The HTTPS port that CloudFront uses to connect to the origin. This parameter is required.- Returns:
this
-
keepaliveTimeout
Specifies how long, in seconds, CloudFront persists its connection to the origin.The valid range is from 1 to 180 seconds, inclusive.
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
Default: Duration.seconds(5)
- Parameters:
keepaliveTimeout
- Specifies how long, in seconds, CloudFront persists its connection to the origin. This parameter is required.- Returns:
this
-
originSslProtocols
@Stability(Stable) public S3StaticWebsiteOrigin.Builder originSslProtocols(List<? extends OriginSslPolicy> originSslProtocols) The SSL versions to use when interacting with the origin.Default: OriginSslPolicy.TLS_V1_2
- Parameters:
originSslProtocols
- The SSL versions to use when interacting with the origin. This parameter is required.- Returns:
this
-
protocolPolicy
@Stability(Stable) public S3StaticWebsiteOrigin.Builder protocolPolicy(OriginProtocolPolicy protocolPolicy) Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin.Default: OriginProtocolPolicy.HTTPS_ONLY
- Parameters:
protocolPolicy
- Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. This parameter is required.- Returns:
this
-
readTimeout
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 180 seconds, inclusive.
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
Default: Duration.seconds(30)
- Parameters:
readTimeout
- Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<S3StaticWebsiteOrigin>
- Returns:
- a newly built instance of
S3StaticWebsiteOrigin
.
-