Class S3OriginProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.origins.S3OriginProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<S3OriginProps>
- Enclosing interface:
- S3OriginProps
@Stability(Stable)
public static final class S3OriginProps.Builder
extends Object
implements software.amazon.jsii.Builder<S3OriginProps>
A builder for
S3OriginProps-
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()originAccessIdentity(IOriginAccessIdentity originAccessIdentity) Sets the value ofS3OriginProps.getOriginAccessIdentity()originPath(String originPath) Sets the value ofOriginProps.getOriginPath()originShieldRegion(String originShieldRegion) Sets the value ofOriginOptions.getOriginShieldRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
originAccessIdentity
@Stability(Stable) public S3OriginProps.Builder originAccessIdentity(IOriginAccessIdentity originAccessIdentity) Sets the value ofS3OriginProps.getOriginAccessIdentity()- Parameters:
originAccessIdentity- An optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.- 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
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
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
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
-
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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<S3OriginProps>- Returns:
- a new instance of
S3OriginProps - Throws:
NullPointerException- if any required attribute was not provided
-