Class CloudFrontToOaiToS3.Builder

java.lang.Object
software.amazon.awsconstructs.services.cloudfrontoais3.CloudFrontToOaiToS3.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFrontToOaiToS3>
Enclosing class:
CloudFrontToOaiToS3

public static final class CloudFrontToOaiToS3.Builder extends Object implements software.amazon.jsii.Builder<CloudFrontToOaiToS3>
A fluent builder for CloudFrontToOaiToS3.
  • Method Details

    • create

      public static CloudFrontToOaiToS3.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope -
      • represents the scope for all the resources.
      This parameter is required.
      id -
      • this is a a scope-unique id.
      This parameter is required.
      Returns:
      a new instance of CloudFrontToOaiToS3.Builder.
    • bucketProps

      public CloudFrontToOaiToS3.Builder bucketProps(software.amazon.awscdk.services.s3.BucketProps bucketProps)
      Optional user provided props to override the default props for the S3 Content Bucket.

      Default: - Default props are used

      Parameters:
      bucketProps - Optional user provided props to override the default props for the S3 Content Bucket. This parameter is required.
      Returns:
      this
    • cloudFrontDistributionProps

      public CloudFrontToOaiToS3.Builder cloudFrontDistributionProps(Object cloudFrontDistributionProps)
      Optional user provided props to override the default props.

      Default: - Default props are used

      Parameters:
      cloudFrontDistributionProps - Optional user provided props to override the default props. This parameter is required.
      Returns:
      this
    • cloudFrontLoggingBucketAccessLogBucketProps

      public CloudFrontToOaiToS3.Builder cloudFrontLoggingBucketAccessLogBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketAccessLogBucketProps)
      Optional user provided props to override the default props for the CloudFront Log Bucket Access Log bucket.

      Providing both this and existingcloudFrontLoggingBucketAccessLogBucket will cause an error

      Default: - Default props are used

      Parameters:
      cloudFrontLoggingBucketAccessLogBucketProps - Optional user provided props to override the default props for the CloudFront Log Bucket Access Log bucket. This parameter is required.
      Returns:
      this
    • cloudFrontLoggingBucketProps

      public CloudFrontToOaiToS3.Builder cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps)
      Optional user provided props to override the default props for the CloudFront Log Bucket.

      Default: - Default props are used

      Parameters:
      cloudFrontLoggingBucketProps - Optional user provided props to override the default props for the CloudFront Log Bucket. This parameter is required.
      Returns:
      this
    • existingBucketObj

      public CloudFrontToOaiToS3.Builder existingBucketObj(software.amazon.awscdk.services.s3.IBucket existingBucketObj)
      Existing instance of S3 Content Bucket object, providing both this and bucketProps will cause an error.

      Default: - None

      Parameters:
      existingBucketObj - Existing instance of S3 Content Bucket object, providing both this and bucketProps will cause an error. This parameter is required.
      Returns:
      this
    • insertHttpSecurityHeaders

      public CloudFrontToOaiToS3.Builder insertHttpSecurityHeaders(Boolean 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.

      Default: - true

      Parameters:
      insertHttpSecurityHeaders - Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from cloudfront. This parameter is required.
      Returns:
      this
    • logCloudFrontAccessLog

      public CloudFrontToOaiToS3.Builder logCloudFrontAccessLog(Boolean 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.

      Default: - true

      Parameters:
      logCloudFrontAccessLog - Optional - Whether to maintain access logs for the CloudFront Logging bucket. This parameter is required.
      Returns:
      this
    • loggingBucketProps

      public CloudFrontToOaiToS3.Builder loggingBucketProps(software.amazon.awscdk.services.s3.BucketProps loggingBucketProps)
      Optional user provided props to override the default props for the S3 Content Bucket Access Log Bucket.

      Default: - Default props are used

      Parameters:
      loggingBucketProps - Optional user provided props to override the default props for the S3 Content Bucket Access Log Bucket. This parameter is required.
      Returns:
      this
    • logS3AccessLogs

      public CloudFrontToOaiToS3.Builder logS3AccessLogs(Boolean logS3AccessLogs)
      Optional - Whether to maintain access logs for the S3 Content bucket.

      Default: - true

      Parameters:
      logS3AccessLogs - Optional - Whether to maintain access logs for the S3 Content bucket. This parameter is required.
      Returns:
      this
    • originPath

      public CloudFrontToOaiToS3.Builder originPath(String 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.

      Default: = '/'

      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. This parameter is required.
      Returns:
      this
    • responseHeadersPolicyProps

      public CloudFrontToOaiToS3.Builder responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps 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 insertHttpSecurityHeaders prop. Will throw an error if both insertHttpSecurityHeaders is set to true and ResponseSecurityHeadersBehavior is passed.

      Default: - undefined

      Parameters:
      responseHeadersPolicyProps - Optional user provided configuration that cloudfront applies to all http responses. This parameter is required.
      Returns:
      this
    • build

      public CloudFrontToOaiToS3 build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CloudFrontToOaiToS3>
      Returns:
      a newly built instance of CloudFrontToOaiToS3.