HttpLambdaIntegration
- class aws_cdk.aws_apigatewayv2_integrations.HttpLambdaIntegration(id, handler, *, parameter_mapping=None, payload_format_version=None)
Bases:
HttpRouteIntegration
(experimental) The Lambda Proxy integration resource for HTTP API.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_apigatewayv2_integrations import HttpLambdaIntegration # books_default_fn: lambda.Function books_integration = HttpLambdaIntegration("BooksIntegration", books_default_fn) http_api = apigwv2.HttpApi(self, "HttpApi") http_api.add_routes( path="/books", methods=[apigwv2.HttpMethod.GET], integration=books_integration )
- Parameters:
id (
str
) – id of the underlying integration construct.handler (
IFunction
) – the Lambda handler to integrate with.parameter_mapping (
Optional
[ParameterMapping
]) – (experimental) Specifies how to transform HTTP requests before sending them to the backend. Default: undefined requests are sent to the backend unmodifiedpayload_format_version (
Optional
[PayloadFormatVersion
]) – (experimental) Version of the payload sent to the lambda handler. Default: PayloadFormatVersion.VERSION_2_0
- Stability:
experimental
Methods
- bind(*, route, scope)
(experimental) Bind this integration to the route.
- Parameters:
route (
IHttpRoute
) – (experimental) The route to which this is being bound.scope (
Construct
) – (experimental) The current scope in which the bind is occurring. If theHttpRouteIntegration
being bound creates additional constructs, this will be used as their parent scope.
- Stability:
experimental
- Return type: