Class CloudFrontToOaiToS3Props.Builder
java.lang.Object
software.amazon.awsconstructs.services.cloudfrontoais3.CloudFrontToOaiToS3Props.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFrontToOaiToS3Props>
- Enclosing interface:
CloudFrontToOaiToS3Props
public static final class CloudFrontToOaiToS3Props.Builder
extends Object
implements software.amazon.jsii.Builder<CloudFrontToOaiToS3Props>
A builder for
CloudFrontToOaiToS3Props-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbucketProps(software.amazon.awscdk.services.s3.BucketProps bucketProps) Sets the value ofCloudFrontToOaiToS3Props.getBucketProps()build()Builds the configured instance.cloudFrontDistributionProps(Object cloudFrontDistributionProps) Sets the value ofCloudFrontToOaiToS3Props.getCloudFrontDistributionProps()cloudFrontLoggingBucketAccessLogBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketAccessLogBucketProps) cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps) Sets the value ofCloudFrontToOaiToS3Props.getCloudFrontLoggingBucketProps()existingBucketObj(software.amazon.awscdk.services.s3.IBucket existingBucketObj) Sets the value ofCloudFrontToOaiToS3Props.getExistingBucketObj()insertHttpSecurityHeaders(Boolean insertHttpSecurityHeaders) Sets the value ofCloudFrontToOaiToS3Props.getInsertHttpSecurityHeaders()logCloudFrontAccessLog(Boolean logCloudFrontAccessLog) Sets the value ofCloudFrontToOaiToS3Props.getLogCloudFrontAccessLog()loggingBucketProps(software.amazon.awscdk.services.s3.BucketProps loggingBucketProps) Sets the value ofCloudFrontToOaiToS3Props.getLoggingBucketProps()logS3AccessLogs(Boolean logS3AccessLogs) Sets the value ofCloudFrontToOaiToS3Props.getLogS3AccessLogs()originPath(String originPath) Sets the value ofCloudFrontToOaiToS3Props.getOriginPath()responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Sets the value ofCloudFrontToOaiToS3Props.getResponseHeadersPolicyProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucketProps
public CloudFrontToOaiToS3Props.Builder bucketProps(software.amazon.awscdk.services.s3.BucketProps bucketProps) Sets the value ofCloudFrontToOaiToS3Props.getBucketProps()- Parameters:
bucketProps- Optional user provided props to override the default props for the S3 Content Bucket.- Returns:
this
-
cloudFrontDistributionProps
public CloudFrontToOaiToS3Props.Builder cloudFrontDistributionProps(Object cloudFrontDistributionProps) Sets the value ofCloudFrontToOaiToS3Props.getCloudFrontDistributionProps()- Parameters:
cloudFrontDistributionProps- Optional user provided props to override the default props.- Returns:
this
-
cloudFrontLoggingBucketAccessLogBucketProps
public CloudFrontToOaiToS3Props.Builder cloudFrontLoggingBucketAccessLogBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketAccessLogBucketProps) - Parameters:
cloudFrontLoggingBucketAccessLogBucketProps- Optional user provided props to override the default props for the CloudFront Log Bucket Access Log bucket. Providing both this andexistingcloudFrontLoggingBucketAccessLogBucketwill cause an error- Returns:
this
-
cloudFrontLoggingBucketProps
public CloudFrontToOaiToS3Props.Builder cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps) Sets the value ofCloudFrontToOaiToS3Props.getCloudFrontLoggingBucketProps()- Parameters:
cloudFrontLoggingBucketProps- Optional user provided props to override the default props for the CloudFront Log Bucket.- Returns:
this
-
existingBucketObj
public CloudFrontToOaiToS3Props.Builder existingBucketObj(software.amazon.awscdk.services.s3.IBucket existingBucketObj) Sets the value ofCloudFrontToOaiToS3Props.getExistingBucketObj()- Parameters:
existingBucketObj- Existing instance of S3 Content Bucket object, providing both this andbucketPropswill cause an error.- Returns:
this
-
insertHttpSecurityHeaders
public CloudFrontToOaiToS3Props.Builder insertHttpSecurityHeaders(Boolean insertHttpSecurityHeaders) Sets the value ofCloudFrontToOaiToS3Props.getInsertHttpSecurityHeaders()- Parameters:
insertHttpSecurityHeaders- Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from cloudfront. Turning this on will inject default headers and is mutually exclusive with passing custom security headers via the responseHeadersPolicyProps parameter.- Returns:
this
-
logCloudFrontAccessLog
Sets the value ofCloudFrontToOaiToS3Props.getLogCloudFrontAccessLog()- Parameters:
logCloudFrontAccessLog- Optional - Whether to maintain access logs for the CloudFront Logging bucket. Specifying false for this while providing info about the log bucket will cause an error.- Returns:
this
-
loggingBucketProps
public CloudFrontToOaiToS3Props.Builder loggingBucketProps(software.amazon.awscdk.services.s3.BucketProps loggingBucketProps) Sets the value ofCloudFrontToOaiToS3Props.getLoggingBucketProps()- Parameters:
loggingBucketProps- Optional user provided props to override the default props for the S3 Content Bucket Access Log Bucket.- Returns:
this
-
logS3AccessLogs
Sets the value ofCloudFrontToOaiToS3Props.getLogS3AccessLogs()- Parameters:
logS3AccessLogs- Optional - Whether to maintain access logs for the S3 Content bucket.- Returns:
this
-
originPath
Sets the value ofCloudFrontToOaiToS3Props.getOriginPath()- Parameters:
originPath- Optional user provided props to provide an originPath that CloudFront appends to the origin domain name when CloudFront requests content from the origin. The string should start with a/, for example/production.- Returns:
this
-
responseHeadersPolicyProps
public CloudFrontToOaiToS3Props.Builder responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Sets the value ofCloudFrontToOaiToS3Props.getResponseHeadersPolicyProps()- Parameters:
responseHeadersPolicyProps- Optional user provided configuration that cloudfront applies to all http responses. Can be used to pass a custom ResponseSecurityHeadersBehavior, ResponseCustomHeadersBehavior or ResponseHeadersCorsBehavior to the cloudfront distribution.Passing a custom ResponseSecurityHeadersBehavior is mutually exclusive with turning on the default security headers via
insertHttpSecurityHeadersprop. Will throw an error if bothinsertHttpSecurityHeadersis set totrueand ResponseSecurityHeadersBehavior is passed.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CloudFrontToOaiToS3Props>- Returns:
- a new instance of
CloudFrontToOaiToS3Props - Throws:
NullPointerException- if any required attribute was not provided
-