HttpNlbIntegration

class aws_cdk.aws_apigatewayv2_integrations.HttpNlbIntegration(id, listener, *, method=None, parameter_mapping=None, secure_server_name=None, vpc_link=None)

Bases: HttpRouteIntegration

The Network Load Balancer integration resource for HTTP API.

ExampleMetadata:

infused

Example:

from aws_cdk.aws_apigatewayv2_integrations import HttpNlbIntegration


vpc = ec2.Vpc(self, "VPC")
lb = elbv2.NetworkLoadBalancer(self, "lb", vpc=vpc)
listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
    port=80
)

http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
    default_integration=HttpNlbIntegration("DefaultIntegration", listener)
)
Parameters:
  • id (str) – id of the underlying integration construct.

  • listener (INetworkListener) – the ELB network listener.

  • method (Optional[HttpMethod]) – The HTTP method that must be used to invoke the underlying HTTP proxy. Default: HttpMethod.ANY

  • parameter_mapping (Optional[ParameterMapping]) – Specifies how to transform HTTP requests before sending them to the backend. Default: undefined requests are sent to the backend unmodified

  • secure_server_name (Optional[str]) – Specifies the server name to verified by HTTPS when calling the backend integration. Default: undefined private integration traffic will use HTTP protocol

  • vpc_link (Optional[IVpcLink]) – The vpc link to be used for the private integration. Default: - a new VpcLink is created

Methods

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