Class S3OriginConfig.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.S3OriginConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<S3OriginConfig>
- Enclosing interface:
- S3OriginConfig
@Stability(Stable)
public static final class S3OriginConfig.Builder
extends Object
implements software.amazon.jsii.Builder<S3OriginConfig>
A builder for
S3OriginConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.originAccessIdentity
(IOriginAccessIdentity originAccessIdentity) Sets the value ofS3OriginConfig.getOriginAccessIdentity()
originHeaders
(Map<String, String> originHeaders) Sets the value ofS3OriginConfig.getOriginHeaders()
originPath
(String originPath) Sets the value ofS3OriginConfig.getOriginPath()
originShieldRegion
(String originShieldRegion) Sets the value ofS3OriginConfig.getOriginShieldRegion()
s3BucketSource
(IBucket s3BucketSource) Sets the value ofS3OriginConfig.getS3BucketSource()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
s3BucketSource
Sets the value ofS3OriginConfig.getS3BucketSource()
- Parameters:
s3BucketSource
- The source bucket to serve content from. This parameter is required.- Returns:
this
-
originAccessIdentity
@Stability(Stable) public S3OriginConfig.Builder originAccessIdentity(IOriginAccessIdentity originAccessIdentity) Sets the value ofS3OriginConfig.getOriginAccessIdentity()
- Parameters:
originAccessIdentity
- The optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.- Returns:
this
-
originHeaders
Sets the value ofS3OriginConfig.getOriginHeaders()
- Parameters:
originHeaders
- Any additional headers to pass to the origin.- Returns:
this
-
originPath
Sets the value ofS3OriginConfig.getOriginPath()
- Parameters:
originPath
- The relative path to the origin root to use for sources.- Returns:
this
-
originShieldRegion
Sets the value ofS3OriginConfig.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:
build
in interfacesoftware.amazon.jsii.Builder<S3OriginConfig>
- Returns:
- a new instance of
S3OriginConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-