public static final class OriginOptions.Builder
extends java.lang.Object
OriginOptions
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
OriginOptions |
build()
Builds the configured instance.
|
OriginOptions.Builder |
connectionAttempts(java.lang.Number connectionAttempts)
Sets the value of
OriginOptions.getConnectionAttempts() |
OriginOptions.Builder |
connectionTimeout(Duration connectionTimeout)
Sets the value of
OriginOptions.getConnectionTimeout() |
OriginOptions.Builder |
customHeaders(java.util.Map<java.lang.String,java.lang.String> customHeaders)
Sets the value of
OriginOptions.getCustomHeaders() |
OriginOptions.Builder |
originShieldRegion(java.lang.String originShieldRegion)
Sets the value of
OriginOptions.getOriginShieldRegion() |
public OriginOptions.Builder connectionAttempts(java.lang.Number connectionAttempts)
OriginOptions.getConnectionAttempts()
connectionAttempts
- The number of times that CloudFront attempts to connect to the origin;.
valid values are 1, 2, or 3 attempts.this
public OriginOptions.Builder connectionTimeout(Duration connectionTimeout)
OriginOptions.getConnectionTimeout()
connectionTimeout
- The number of seconds that CloudFront waits when trying to establish a connection to the origin.
Valid values are 1-10 seconds, inclusive.this
public OriginOptions.Builder customHeaders(java.util.Map<java.lang.String,java.lang.String> customHeaders)
OriginOptions.getCustomHeaders()
customHeaders
- A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.this
public OriginOptions.Builder originShieldRegion(java.lang.String originShieldRegion)
OriginOptions.getOriginShieldRegion()
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
public OriginOptions build()
OriginOptions
java.lang.NullPointerException
- if any required attribute was not provided