class WebSocketRouteIntegration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.WebSocketRouteIntegration |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#WebSocketRouteIntegration |
Java | software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration |
Python | aws_cdk.aws_apigatewayv2.WebSocketRouteIntegration |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » WebSocketRouteIntegration |
Implemented by
Web, Web, Web
The interface that various route integration classes will inherit.
Example
import { WebSocketLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
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 underlyingWebSocketIntegrationconstruct.
Initialize an integration for a route on websocket api.
Methods
| Name | Description |
|---|---|
| bind(options) | Bind this integration to the route. |
bind(options)
public bind(options: WebSocketRouteIntegrationBindOptions): WebSocketRouteIntegrationConfig
Parameters
Returns
Bind this integration to the route.

.NET
Go
Java
Python
TypeScript (