HttpRouteIntegration

class aws_cdk.aws_apigatewayv2.HttpRouteIntegration(id)

Bases: object

(experimental) The interface that various route integration classes will inherit.

Stability:

experimental

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")
    )
)

(experimental) Initialize an integration for a route on http api.

Parameters:

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

Stability:

experimental

Methods

abstract 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 the HttpRouteIntegration being bound creates additional constructs, this will be used as their parent scope.

Stability:

experimental

Return type:

HttpRouteIntegrationConfig