Class CloudFrontToApiGatewayToLambda.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFrontToApiGatewayToLambda>
- Enclosing class:
CloudFrontToApiGatewayToLambda
CloudFrontToApiGatewayToLambda.-
Method Summary
Modifier and TypeMethodDescriptionapiGatewayProps(Object apiGatewayProps) User provided props to override the default props for the API Gateway.build()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.existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.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.lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) Optional user provided props to override the default props for the Lambda function.logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Optional user provided props to override the default props for the CloudWatchLogs LogGroup.responseHeadersPolicyProps(software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps responseHeadersPolicyProps) Optional user provided configuration that cloudfront applies to all http responses.
-
Method Details
-
create
public static CloudFrontToApiGatewayToLambda.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- Returns:
- a new instance of
CloudFrontToApiGatewayToLambda.Builder.
-
apiGatewayProps
User provided props to override the default props for the API Gateway.As of release 2.48.0, clients must include this property with defaultMethodOptions: { authorizationType: string } specified. See Issue1043 in the github repo https://github.com/awslabs/aws-solutions-constructs/issues/1043
Default: - defaultMethodOptions/authorizationType is required, for other, unspecified values the default props are used
- Parameters:
apiGatewayProps- User provided props to override the default props for the API Gateway. This parameter is required.- Returns:
this
-
cloudFrontDistributionProps
public CloudFrontToApiGatewayToLambda.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 CloudFrontToApiGatewayToLambda.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
-
existingLambdaObj
public CloudFrontToApiGatewayToLambda.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.Default: - None
- Parameters:
existingLambdaObj- Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error. This parameter is required.- Returns:
this
-
insertHttpSecurityHeaders
public CloudFrontToApiGatewayToLambda.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
-
lambdaFunctionProps
public CloudFrontToApiGatewayToLambda.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) Optional user provided props to override the default props for the Lambda function.Default: - Default props are used
- Parameters:
lambdaFunctionProps- Optional user provided props to override the default props for the Lambda function. This parameter is required.- Returns:
this
-
logGroupProps
public CloudFrontToApiGatewayToLambda.Builder logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Optional user provided props to override the default props for the CloudWatchLogs LogGroup.Default: - Default props are used
- Parameters:
logGroupProps- Optional user provided props to override the default props for the CloudWatchLogs LogGroup. This parameter is required.- Returns:
this
-
responseHeadersPolicyProps
public CloudFrontToApiGatewayToLambda.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<CloudFrontToApiGatewayToLambda>- Returns:
- a newly built instance of
CloudFrontToApiGatewayToLambda.
-