Class HttpLambdaIntegration

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.HttpRouteIntegration
software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegration
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:33.375Z") @Stability(Stable) public class HttpLambdaIntegration extends HttpRouteIntegration
The Lambda Proxy integration resource for HTTP API.

Example:

 import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegration;
 Function booksDefaultFn;
 HttpLambdaIntegration booksIntegration = new HttpLambdaIntegration("BooksIntegration", booksDefaultFn);
 HttpApi httpApi = new HttpApi(this, "HttpApi");
 httpApi.addRoutes(AddRoutesOptions.builder()
         .path("/books")
         .methods(List.of(HttpMethod.GET))
         .integration(booksIntegration)
         .build());
 
  • Constructor Details

    • HttpLambdaIntegration

      protected HttpLambdaIntegration(software.amazon.jsii.JsiiObjectRef objRef)
    • HttpLambdaIntegration

      protected HttpLambdaIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • HttpLambdaIntegration

      @Stability(Stable) public HttpLambdaIntegration(@NotNull String id, @NotNull IFunction handler, @Nullable HttpLambdaIntegrationProps props)
      Parameters:
      id - id of the underlying integration construct. This parameter is required.
      handler - the Lambda handler to integrate with. This parameter is required.
      props - properties to configure the integration.
    • HttpLambdaIntegration

      @Stability(Stable) public HttpLambdaIntegration(@NotNull String id, @NotNull IFunction handler)
      Parameters:
      id - id of the underlying integration construct. This parameter is required.
      handler - the Lambda handler to integrate with. This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public HttpRouteIntegrationConfig bind(@NotNull HttpRouteIntegrationBindOptions _options)
      Bind this integration to the route.

      Specified by:
      bind in class HttpRouteIntegration
      Parameters:
      _options - This parameter is required.
    • completeBind

      @Stability(Stable) protected void completeBind(@NotNull HttpRouteIntegrationBindOptions options)
      Complete the binding of the integration to the route.

      In some cases, there is some additional work to do, such as adding permissions for the API to access the target. This work is necessary whether the integration has just been created for this route or it is an existing one, previously created for other routes. In most cases, however, concrete implementations do not need to override this method.

      Overrides:
      completeBind in class HttpRouteIntegration
      Parameters:
      options - This parameter is required.