@aws-cdk_aws-apigatewayv2-alpha.WebSocketRouteIntegration

class WebSocketRouteIntegration 🔹

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

Implemented by WebSocketLambdaIntegration, WebSocketMockIntegration

The interface that various route integration classes will inherit.

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 WebSocketRouteIntegration(id: string)

Parameters

  • id string — id of the underlying WebSocketIntegration construct.

Initialize an integration for a route on websocket api.

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.