Route class that creates the Route for API Gateway WebSocket API.
import { WebSocketRoute } from 'aws-cdk-lib/aws-apigatewayv2';Or use the module namespace:
import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.WebSocketRouteConfiguration passed to the constructor as WebSocketRouteProps.
routeKeyRequiredstringThe key to this route.
webSocketApiRequiredIWebSocketApiThe API the route is associated with.
apiKeyRequiredOptionalbooleanWhether the route requires an API Key to be provided.
Default: false
WebSocketRouteOptionsintegrationRequiredinherited from WebSocketRouteOptionsWebSocketRouteIntegrationThe integration to be configured on this route.
authorizerOptionalinherited from WebSocketRouteOptionsIWebSocketRouteAuthorizerThe authorize to this route. You can only set authorizer to a $connect route.
Default: - No Authorizer
returnResponseOptionalinherited from WebSocketRouteOptionsbooleanShould the route send a response to the client.
Default: false
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-apigatewayv2