@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.143Z") @Stability(value=Stable) public interface OriginOptions extends software.amazon.jsii.JsiiSerializable
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"))
.originShieldRegion("originShieldRegion")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
OriginOptions.Builder
A builder for
OriginOptions |
static class |
OriginOptions.Jsii$Proxy
An implementation for
OriginOptions |
| Modifier and Type | Method and Description |
|---|---|
static OriginOptions.Builder |
builder() |
default Number |
getConnectionAttempts()
The number of times that CloudFront attempts to connect to the origin;
|
default Duration |
getConnectionTimeout()
The number of seconds that CloudFront waits when trying to establish a connection to the origin.
|
default Map<String,String> |
getCustomHeaders()
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
|
default String |
getOriginShieldRegion()
When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
|
@Stability(value=Stable) @Nullable default Number getConnectionAttempts()
valid values are 1, 2, or 3 attempts.
Default: 3
@Stability(value=Stable) @Nullable default Duration getConnectionTimeout()
Valid values are 1-10 seconds, inclusive.
Default: Duration.seconds(10)
@Stability(value=Stable) @Nullable default Map<String,String> getCustomHeaders()
Default: {}
@Stability(value=Stable) @Nullable default String getOriginShieldRegion()
Default: - origin shield not enabled
@Stability(value=Stable) static OriginOptions.Builder builder()
OriginOptions.Builder of OriginOptionsCopyright © 2022. All rights reserved.