Class CloudFrontToApiGateway.Builder

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

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

    • create

      public static CloudFrontToApiGateway.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 CloudFrontToApiGateway.Builder.
    • existingApiGatewayObj

      public CloudFrontToApiGateway.Builder existingApiGatewayObj(software.amazon.awscdk.services.apigateway.RestApi existingApiGatewayObj)
      Existing instance of api.RestApi object.

      Default: - None

      Parameters:
      existingApiGatewayObj - Existing instance of api.RestApi object. This parameter is required.
      Returns:
      this
    • cloudFrontDistributionProps

      public CloudFrontToApiGateway.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
    • cloudFrontLoggingBucketProps

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

      Default: - Default props are used

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

      public CloudFrontToApiGateway.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
    • responseHeadersPolicyProps

      public CloudFrontToApiGateway.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 CloudFrontToApiGateway build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CloudFrontToApiGateway>
      Returns:
      a newly built instance of CloudFrontToApiGateway.