Class CloudFrontToApiGatewayProps.Builder
java.lang.Object
software.amazon.awsconstructs.services.cloudfrontapigateway.CloudFrontToApiGatewayProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFrontToApiGatewayProps>
- Enclosing interface:
CloudFrontToApiGatewayProps
public static final class CloudFrontToApiGatewayProps.Builder
extends Object
implements software.amazon.jsii.Builder<CloudFrontToApiGatewayProps>
A builder for
CloudFrontToApiGatewayProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cloudFrontDistributionProps(Object cloudFrontDistributionProps) Sets the value ofCloudFrontToApiGatewayProps.getCloudFrontDistributionProps()cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps) Sets the value ofCloudFrontToApiGatewayProps.getCloudFrontLoggingBucketProps()existingApiGatewayObj(software.amazon.awscdk.services.apigateway.RestApi existingApiGatewayObj) Sets the value ofCloudFrontToApiGatewayProps.getExistingApiGatewayObj()insertHttpSecurityHeaders(Boolean insertHttpSecurityHeaders) Sets the value ofCloudFrontToApiGatewayProps.getInsertHttpSecurityHeaders()responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Sets the value ofCloudFrontToApiGatewayProps.getResponseHeadersPolicyProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
existingApiGatewayObj
public CloudFrontToApiGatewayProps.Builder existingApiGatewayObj(software.amazon.awscdk.services.apigateway.RestApi existingApiGatewayObj) Sets the value ofCloudFrontToApiGatewayProps.getExistingApiGatewayObj()- Parameters:
existingApiGatewayObj- Existing instance of api.RestApi object. This parameter is required.- Returns:
this
-
cloudFrontDistributionProps
public CloudFrontToApiGatewayProps.Builder cloudFrontDistributionProps(Object cloudFrontDistributionProps) Sets the value ofCloudFrontToApiGatewayProps.getCloudFrontDistributionProps()- Parameters:
cloudFrontDistributionProps- Optional user provided props to override the default props.- Returns:
this
-
cloudFrontLoggingBucketProps
public CloudFrontToApiGatewayProps.Builder cloudFrontLoggingBucketProps(software.amazon.awscdk.services.s3.BucketProps cloudFrontLoggingBucketProps) Sets the value ofCloudFrontToApiGatewayProps.getCloudFrontLoggingBucketProps()- Parameters:
cloudFrontLoggingBucketProps- Optional user provided props to override the default props for the CloudFront Logging Bucket.- Returns:
this
-
insertHttpSecurityHeaders
public CloudFrontToApiGatewayProps.Builder insertHttpSecurityHeaders(Boolean insertHttpSecurityHeaders) Sets the value ofCloudFrontToApiGatewayProps.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
-
responseHeadersPolicyProps
public CloudFrontToApiGatewayProps.Builder responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Sets the value ofCloudFrontToApiGatewayProps.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<CloudFrontToApiGatewayProps>- Returns:
- a new instance of
CloudFrontToApiGatewayProps - Throws:
NullPointerException- if any required attribute was not provided
-