Class CustomOriginConfig.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CustomOriginConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomOriginConfig>
- Enclosing interface:
CustomOriginConfig
@Stability(Stable)
public static final class CustomOriginConfig.Builder
extends Object
implements software.amazon.jsii.Builder<CustomOriginConfig>
A builder for
CustomOriginConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedOriginSslVersions(List<? extends OriginSslPolicy> allowedOriginSslVersions) Sets the value ofinvalid reference
CustomOriginConfig#getAllowedOriginSslVersionsbuild()Builds the configured instance.domainName(String domainName) Sets the value ofCustomOriginConfig.getDomainName()Sets the value ofCustomOriginConfig.getHttpPort()Sets the value ofCustomOriginConfig.getHttpsPort()originHeaders(Map<String, String> originHeaders) Sets the value ofCustomOriginConfig.getOriginHeaders()originKeepaliveTimeout(Duration originKeepaliveTimeout) Sets the value ofCustomOriginConfig.getOriginKeepaliveTimeout()originPath(String originPath) Sets the value ofCustomOriginConfig.getOriginPath()originProtocolPolicy(OriginProtocolPolicy originProtocolPolicy) Sets the value ofCustomOriginConfig.getOriginProtocolPolicy()originReadTimeout(Duration originReadTimeout) Sets the value ofCustomOriginConfig.getOriginReadTimeout()originShieldRegion(String originShieldRegion) Sets the value ofCustomOriginConfig.getOriginShieldRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
domainName
Sets the value ofCustomOriginConfig.getDomainName()- Parameters:
domainName- The domain name of the custom origin. This parameter is required. Should not include the path - that should be in the parent SourceConfiguration- Returns:
this
-
allowedOriginSslVersions
@Stability(Stable) public CustomOriginConfig.Builder allowedOriginSslVersions(List<? extends OriginSslPolicy> allowedOriginSslVersions) Sets the value ofinvalid reference
CustomOriginConfig#getAllowedOriginSslVersions- Parameters:
allowedOriginSslVersions- The SSL versions to use when interacting with the origin.- Returns:
this
-
httpPort
Sets the value ofCustomOriginConfig.getHttpPort()- Parameters:
httpPort- The origin HTTP port.- Returns:
this
-
httpsPort
Sets the value ofCustomOriginConfig.getHttpsPort()- Parameters:
httpsPort- The origin HTTPS port.- Returns:
this
-
originHeaders
@Stability(Stable) public CustomOriginConfig.Builder originHeaders(Map<String, String> originHeaders) Sets the value ofCustomOriginConfig.getOriginHeaders()- Parameters:
originHeaders- Any additional headers to pass to the origin.- Returns:
this
-
originKeepaliveTimeout
@Stability(Stable) public CustomOriginConfig.Builder originKeepaliveTimeout(Duration originKeepaliveTimeout) Sets the value ofCustomOriginConfig.getOriginKeepaliveTimeout()- Parameters:
originKeepaliveTimeout- The keep alive timeout when making calls in seconds.- Returns:
this
-
originPath
Sets the value ofCustomOriginConfig.getOriginPath()- Parameters:
originPath- The relative path to the origin root to use for sources.- Returns:
this
-
originProtocolPolicy
@Stability(Stable) public CustomOriginConfig.Builder originProtocolPolicy(OriginProtocolPolicy originProtocolPolicy) Sets the value ofCustomOriginConfig.getOriginProtocolPolicy()- Parameters:
originProtocolPolicy- The protocol (http or https) policy to use when interacting with the origin.- Returns:
this
-
originReadTimeout
Sets the value ofCustomOriginConfig.getOriginReadTimeout()- Parameters:
originReadTimeout- The read timeout when calling the origin in seconds.- Returns:
this
-
originShieldRegion
Sets the value ofCustomOriginConfig.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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CustomOriginConfig>- Returns:
- a new instance of
CustomOriginConfig - Throws:
NullPointerException- if any required attribute was not provided
-