Skip to content

RouteResource

Source: src/AWS/ApiGatewayV2/Route.ts

An API Gateway v2 Route — matches incoming requests (or WebSocket messages) and forwards them to an Integration.

Catch-all $default route

yield* ApiGatewayV2.Route("Default", {
api,
routeKey: "$default",
integration,
});

Method + path route

yield* ApiGatewayV2.Route("ListItems", {
api,
routeKey: "GET /items",
integration,
});
yield* ApiGatewayV2.Route("Connect", {
api,
routeKey: "$connect",
integration,
});
yield* ApiGatewayV2.Route("Secure", {
api,
routeKey: "GET /me",
integration,
authorizationType: "JWT",
authorizerId: authorizer.authorizerId,
});