Class HttpLambdaIntegration.Builder
java.lang.Object
software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpLambdaIntegration>
- Enclosing class:
HttpLambdaIntegration
@Stability(Stable)
public static final class HttpLambdaIntegration.Builder
extends Object
implements software.amazon.jsii.Builder<HttpLambdaIntegration>
A fluent builder for
HttpLambdaIntegration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()parameterMapping(ParameterMapping parameterMapping) Specifies how to transform HTTP requests before sending them to the backend.payloadFormatVersion(PayloadFormatVersion payloadFormatVersion) Version of the payload sent to the lambda handler.scopePermissionToRoute(Boolean scopePermissionToRoute) Scope the permission for invoking the AWS Lambda down to the specific route associated with this integration.The maximum amount of time an integration will run before it returns without a response.
-
Method Details
-
create
- Parameters:
id- id of the underlying integration construct. This parameter is required.handler- the Lambda handler to integrate with. This parameter is required.- Returns:
- a new instance of
HttpLambdaIntegration.Builder.
-
parameterMapping
@Stability(Stable) public HttpLambdaIntegration.Builder parameterMapping(ParameterMapping parameterMapping) Specifies how to transform HTTP requests before sending them to the backend.Default: undefined requests are sent to the backend unmodified
- Parameters:
parameterMapping- Specifies how to transform HTTP requests before sending them to the backend. This parameter is required.- Returns:
this- See Also:
-
payloadFormatVersion
@Stability(Stable) public HttpLambdaIntegration.Builder payloadFormatVersion(PayloadFormatVersion payloadFormatVersion) Version of the payload sent to the lambda handler.Default: PayloadFormatVersion.VERSION_2_0
- Parameters:
payloadFormatVersion- Version of the payload sent to the lambda handler. This parameter is required.- Returns:
this- See Also:
-
scopePermissionToRoute
@Stability(Stable) public HttpLambdaIntegration.Builder scopePermissionToRoute(Boolean scopePermissionToRoute) Scope the permission for invoking the AWS Lambda down to the specific route associated with this integration.If this is set to
false, the permission will allow invoking the AWS Lambda from any route. This is useful for reducing the AWS Lambda policy size for cases where the same AWS Lambda function is reused for many integrations.Default: true
- Parameters:
scopePermissionToRoute- Scope the permission for invoking the AWS Lambda down to the specific route associated with this integration. This parameter is required.- Returns:
this
-
timeout
The maximum amount of time an integration will run before it returns without a response.Must be between 50 milliseconds and 29 seconds.
Default: Duration.seconds(29)
- Parameters:
timeout- The maximum amount of time an integration will run before it returns without a response. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HttpLambdaIntegration>- Returns:
- a newly built instance of
HttpLambdaIntegration.
-