@aws-cdk_aws-apigatewayv2-alpha.HttpRouteIntegration

class HttpRouteIntegration ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.HttpRouteIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#HttpRouteIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.HttpRouteIntegration
Pythonaws_cdk.aws_apigatewayv2_alpha.HttpRouteIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป HttpRouteIntegration

Implemented by HttpAlbIntegration, HttpLambdaIntegration, HttpNlbIntegration, HttpServiceDiscoveryIntegration, HttpUrlIntegration

The interface that various route integration classes will inherit.

Example

import { HttpAlbIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

declare const lb: elbv2.ApplicationLoadBalancer;
const listener = lb.addListener('listener', { port: 80 });
listener.addTargets('target', {
  port: 80,
});

const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
  defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
    parameterMapping: new apigwv2.ParameterMapping().custom('myKey', 'myValue'),
  }),
});

Initializer

new HttpRouteIntegration(id: string)

Parameters

  • id string โ€” id of the underlying HttpIntegration construct.

Initialize an integration for a route on http api.

Methods

NameDescription
bind(options)๐Ÿ”นBind this integration to the route.
protected completeBind(_options)๐Ÿ”นComplete the binding of the integration to the route.

bind(options)๐Ÿ”น

public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig

Parameters

  • options HttpRouteIntegrationBindOptions

Returns

  • HttpRouteIntegrationConfig

Bind this integration to the route.


protected completeBind(_options)๐Ÿ”น

protected completeBind(_options: HttpRouteIntegrationBindOptions): void

Parameters

  • _options HttpRouteIntegrationBindOptions

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.