HttpRouteIntegration

class aws_cdk.aws_apigatewayv2.HttpRouteIntegration(id)

Bases: object

The interface that various route integration classes will inherit.

ExampleMetadata:

infused

Example:

from aws_cdk.aws_apigatewayv2_integrations import HttpAlbIntegration

# lb: elbv2.ApplicationLoadBalancer

listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
    port=80
)

http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
    default_integration=HttpAlbIntegration("DefaultIntegration", listener,
        parameter_mapping=apigwv2.ParameterMapping().custom("myKey", "myValue")
    )
)

Initialize an integration for a route on http api.

Parameters:

id (str) – id of the underlying HttpIntegration construct.

Methods

abstract bind(*, route, scope)

Bind this integration to the route.

Parameters:
  • route (IHttpRoute) – The route to which this is being bound.

  • scope (Construct) – The current scope in which the bind is occurring. If the HttpRouteIntegration being bound creates additional constructs, this will be used as their parent scope.

Return type:

HttpRouteIntegrationConfig