interface WebSocketRouteProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGatewayv2.WebSocketRouteProps |
Java | software.amazon.awscdk.services.apigatewayv2.WebSocketRouteProps |
Python | aws_cdk.aws_apigatewayv2.WebSocketRouteProps |
TypeScript (source) | @aws-cdk/aws-apigatewayv2 » WebSocketRouteProps |
Properties to initialize a new Route.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apigatewayv2 from '@aws-cdk/aws-apigatewayv2';
declare const webSocketApi: apigatewayv2.WebSocketApi;
declare const webSocketRouteAuthorizer: apigatewayv2.IWebSocketRouteAuthorizer;
declare const webSocketRouteIntegration: apigatewayv2.WebSocketRouteIntegration;
const webSocketRouteProps: apigatewayv2.WebSocketRouteProps = {
integration: webSocketRouteIntegration,
routeKey: 'routeKey',
webSocketApi: webSocketApi,
// the properties below are optional
apiKeyRequired: false,
authorizer: webSocketRouteAuthorizer,
};
Properties
Name | Type | Description |
---|---|---|
integration | Web | The integration to be configured on this route. |
route | string | The key to this route. |
web | IWeb | The API the route is associated with. |
api | boolean | Whether the route requires an API Key to be provided. |
authorizer? | IWeb | The authorize to this route. |
integration
Type:
Web
The integration to be configured on this route.
routeKey
Type:
string
The key to this route.
webSocketApi
Type:
IWeb
The API the route is associated with.
apiKeyRequired?
Type:
boolean
(optional, default: false)
Whether the route requires an API Key to be provided.
authorizer?
Type:
IWeb
(optional, default: No Authorizer)
The authorize to this route.
You can only set authorizer to a $connect route.