class WebSocketRouteIntegration
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGatewayv2.WebSocketRouteIntegration |
Java | software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration |
Python | aws_cdk.aws_apigatewayv2.WebSocketRouteIntegration |
TypeScript (source) | @aws-cdk/aws-apigatewayv2 » WebSocketRouteIntegration |
Implemented by
Web
, Web
The interface that various route integration classes will inherit.
Example
import { WebSocketLambdaIntegration } from '@aws-cdk/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 underlyingWebSocketIntegration
construct.
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.