interface WebSocketRouteOptions
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.Apigatewayv2.WebSocketRouteOptions | 
  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#WebSocketRouteOptions | 
  Java | software.amazon.awscdk.services.apigatewayv2.WebSocketRouteOptions | 
  Python | aws_cdk.aws_apigatewayv2.WebSocketRouteOptions | 
  TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » WebSocketRouteOptions | 
Options used to add route to the API.
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),
});
Properties
| Name | Type | Description | 
|---|---|---|
| integration | Web | The integration to be configured on this route. | 
| authorizer? | IWeb | The authorize to this route. | 
| return | boolean | Should the route send a response to the client. | 
integration
Type:
Web
The integration to be configured on this route.
authorizer?
Type:
IWeb
(optional, default: No Authorizer)
The authorize to this route.
You can only set authorizer to a $connect route.
returnResponse?
Type:
boolean
(optional, default: false)
Should the route send a response to the client.

 .NET
 Go
 Java
 Python
 TypeScript (