@aws-cdk_aws-apigatewayv2-integrations-alpha.WebSocketLambdaIntegration

class WebSocketLambdaIntegration ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Integrations.Alpha.WebSocketLambdaIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha/v2#WebSocketLambdaIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.integrations.alpha.WebSocketLambdaIntegration
Pythonaws_cdk.aws_apigatewayv2_integrations_alpha.WebSocketLambdaIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-integrations-alpha ยป WebSocketLambdaIntegration

Extends WebSocketRouteIntegration

Lambda WebSocket Integration.

Example

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

const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi');
new apigwv2.WebSocketStage(this, 'mystage', {
  webSocketApi,
  stageName: 'dev',
  autoDeploy: true,
});

declare const messageHandler: lambda.Function;
webSocketApi.addRoute('sendmessage', {
  integration: new WebSocketLambdaIntegration('SendMessageIntegration', messageHandler),
});

Initializer

new WebSocketLambdaIntegration(id: string, handler: IFunction)

Parameters

  • id string โ€” id of the underlying integration construct.
  • handler IFunction โ€” the Lambda function handler.

Methods

NameDescription
bind(options)๐Ÿ”นBind this integration to the route.

bind(options)๐Ÿ”น

public bind(options: WebSocketRouteIntegrationBindOptions): WebSocketRouteIntegrationConfig

Parameters

  • options WebSocketRouteIntegrationBindOptions

Returns

  • WebSocketRouteIntegrationConfig

Bind this integration to the route.