Class VpcOriginWithEndpointProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.origins.VpcOriginWithEndpointProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VpcOriginWithEndpointProps>
- Enclosing interface:
VpcOriginWithEndpointProps
@Stability(Stable)
public static final class VpcOriginWithEndpointProps.Builder
extends Object
implements software.amazon.jsii.Builder<VpcOriginWithEndpointProps>
A builder for
VpcOriginWithEndpointProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.connectionAttempts(Number connectionAttempts) Sets the value ofOriginOptions.getConnectionAttempts()connectionTimeout(Duration connectionTimeout) Sets the value ofOriginOptions.getConnectionTimeout()customHeaders(Map<String, String> customHeaders) Sets the value ofOriginOptions.getCustomHeaders()domainName(String domainName) Sets the value ofVpcOriginProps.getDomainName()Sets the value ofVpcOriginOptions.getHttpPort()Sets the value ofVpcOriginOptions.getHttpsPort()keepaliveTimeout(Duration keepaliveTimeout) Sets the value ofVpcOriginProps.getKeepaliveTimeout()originAccessControlId(String originAccessControlId) Sets the value ofOriginOptions.getOriginAccessControlId()Sets the value ofOriginOptions.getOriginId()originPath(String originPath) Sets the value ofOriginProps.getOriginPath()originShieldEnabled(Boolean originShieldEnabled) Sets the value ofOriginOptions.getOriginShieldEnabled()originShieldRegion(String originShieldRegion) Sets the value ofOriginOptions.getOriginShieldRegion()originSslProtocols(List<? extends OriginSslPolicy> originSslProtocols) Sets the value ofVpcOriginOptions.getOriginSslProtocols()protocolPolicy(OriginProtocolPolicy protocolPolicy) Sets the value ofVpcOriginOptions.getProtocolPolicy()readTimeout(Duration readTimeout) Sets the value ofVpcOriginProps.getReadTimeout()responseCompletionTimeout(Duration responseCompletionTimeout) Sets the value ofOriginOptions.getResponseCompletionTimeout()vpcOriginName(String vpcOriginName) Sets the value ofVpcOriginOptions.getVpcOriginName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
domainName
Sets the value ofVpcOriginProps.getDomainName()- Parameters:
domainName- The domain name associated with your VPC origin.- Returns:
this
-
keepaliveTimeout
@Stability(Stable) public VpcOriginWithEndpointProps.Builder keepaliveTimeout(Duration keepaliveTimeout) Sets the value ofVpcOriginProps.getKeepaliveTimeout()- Parameters:
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.
- Returns:
this
-
readTimeout
Sets the value ofVpcOriginProps.getReadTimeout()- Parameters:
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.
- Returns:
this
-
originPath
Sets the value ofOriginProps.getOriginPath()- Parameters:
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').- Returns:
this
-
connectionAttempts
@Stability(Stable) public VpcOriginWithEndpointProps.Builder connectionAttempts(Number connectionAttempts) Sets the value ofOriginOptions.getConnectionAttempts()- Parameters:
connectionAttempts- The number of times that CloudFront attempts to connect to the origin;. valid values are 1, 2, or 3 attempts.- Returns:
this
-
connectionTimeout
@Stability(Stable) public VpcOriginWithEndpointProps.Builder connectionTimeout(Duration connectionTimeout) Sets the value ofOriginOptions.getConnectionTimeout()- Parameters:
connectionTimeout- The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive.- Returns:
this
-
customHeaders
@Stability(Stable) public VpcOriginWithEndpointProps.Builder customHeaders(Map<String, String> customHeaders) Sets the value ofOriginOptions.getCustomHeaders()- Parameters:
customHeaders- A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.- Returns:
this
-
originAccessControlId
@Stability(Stable) public VpcOriginWithEndpointProps.Builder originAccessControlId(String originAccessControlId) Sets the value ofOriginOptions.getOriginAccessControlId()- Parameters:
originAccessControlId- The unique identifier of an origin access control for this origin.- Returns:
this
-
originId
Sets the value ofOriginOptions.getOriginId()- Parameters:
originId- A unique identifier for the origin. This value must be unique within the distribution.- Returns:
this
-
originShieldEnabled
@Stability(Stable) public VpcOriginWithEndpointProps.Builder originShieldEnabled(Boolean originShieldEnabled) Sets the value ofOriginOptions.getOriginShieldEnabled()- 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.- Returns:
this
-
originShieldRegion
@Stability(Stable) public VpcOriginWithEndpointProps.Builder originShieldRegion(String originShieldRegion) Sets the value ofOriginOptions.getOriginShieldRegion()- 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.- Returns:
this
-
responseCompletionTimeout
@Stability(Stable) public VpcOriginWithEndpointProps.Builder responseCompletionTimeout(Duration responseCompletionTimeout) Sets the value ofOriginOptions.getResponseCompletionTimeout()- Parameters:
responseCompletionTimeout- 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.
- Returns:
this
-
httpPort
Sets the value ofVpcOriginOptions.getHttpPort()- Parameters:
httpPort- The HTTP port for the CloudFront VPC origin endpoint configuration.- Returns:
this
-
httpsPort
Sets the value ofVpcOriginOptions.getHttpsPort()- Parameters:
httpsPort- The HTTPS port of the CloudFront VPC origin endpoint configuration.- Returns:
this
-
originSslProtocols
@Stability(Stable) public VpcOriginWithEndpointProps.Builder originSslProtocols(List<? extends OriginSslPolicy> originSslProtocols) Sets the value ofVpcOriginOptions.getOriginSslProtocols()- Parameters:
originSslProtocols- A list that contains allowed SSL/TLS protocols for this distribution.- Returns:
this
-
protocolPolicy
@Stability(Stable) public VpcOriginWithEndpointProps.Builder protocolPolicy(OriginProtocolPolicy protocolPolicy) Sets the value ofVpcOriginOptions.getProtocolPolicy()- Parameters:
protocolPolicy- The origin protocol policy for the CloudFront VPC origin endpoint configuration.- Returns:
this
-
vpcOriginName
Sets the value ofVpcOriginOptions.getVpcOriginName()- Parameters:
vpcOriginName- The name of the CloudFront VPC origin endpoint configuration.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<VpcOriginWithEndpointProps>- Returns:
- a new instance of
VpcOriginWithEndpointProps - Throws:
NullPointerException- if any required attribute was not provided
-