ApiGatewayWebSocketRoute
The ApiGatewayWebSocketRoute component is internally used by the ApiGatewayWebSocket
component to add routes to your API Gateway WebSocket API.
You’ll find this component returned by the route method of the ApiGatewayWebSocket component.
Constructor
new ApiGatewayWebSocketRoute(name, args, opts?)Parameters
-
namestring -
argsArgs -
opts?ComponentResourceOptions
Properties
nodes
Type Object
The underlying resources this component creates.
nodes.integration
Type Integration
The API Gateway HTTP API integration.
nodes.permission
Type Permission
The Lambda permission.
nodes.route
Type Output<Route>
The API Gateway HTTP API route.
nodes.function
Type Output<Function>
The Lambda function.
Args
api
Type Input<Object>
The API Gateway to use for the service.
api.executionArn
Type Input<string>
The execution ARN of the API Gateway.
api.id
Type Input<string>
The ID of the API Gateway.
api.name
Type Input<string>
The name of the API Gateway.
auth?
Type Input<false | Object>
Enable auth for your WebSocket API. By default, auth is disabled.
Auth only applies to the $connect route: API Gateway checks it once, when a client
connects. Other routes ignore it.
{ auth: { iam: true }}auth.iam?
Type Input<boolean>
Enable IAM authorization for a given API route. When IAM auth is enabled, clients need to use Signature Version 4 to sign their requests with their AWS credentials.
auth.lambda?
Type Input<string>
Enable custom Lambda authorization for a given API route. Pass in the authorizer ID.
{ auth: { lambda: myAuthorizer.id }}Where myAuthorizer is created by calling the addAuthorizer method.
handler
Type Input<string | FunctionArgs | “arn:aws:lambda:${string}”>
The function that’ll be invoked.
name?
Type string
The name of the route.
By default, SST generates a unique suffix from the route path. Setting name gives
you a stable, human-readable name like MyApiRouteSendMessageHandler.
Must be unique across all routes.
{ name: "SendMessage"}route
Type Input<string>
The path for the route.
transform?
Type Object
Transform how this component creates its underlying resources.
transform.integration?
Type IntegrationArgs | (args: IntegrationArgs, opts: ComponentResourceOptions, name: string) => void
Transform the API Gateway WebSocket API integration resource.
transform.route?
Type RouteArgs | (args: RouteArgs, opts: ComponentResourceOptions, name: string) => void
Transform the API Gateway WebSocket API route resource.