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 Summary
Modifier and TypeMethodDescriptionbuild()cloudFrontDistributionProps(Object cloudFrontDistributionProps) Optional user provided props to override the default props.cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps) Optional user provided props to override the default props for the CloudFront Logging Bucket.existingApiGatewayObj(software.amazon.awscdk.services.apigateway.RestApi existingApiGatewayObj) Existing instance of api.RestApi object.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.responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Optional user provided configuration that cloudfront applies to all http responses.
-
Method Details
-
create
- Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- 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
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
insertHttpSecurityHeadersprop. Will throw an error if bothinsertHttpSecurityHeadersis set totrueand 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
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CloudFrontToApiGateway>- Returns:
- a newly built instance of
CloudFrontToApiGateway.
-