Skip to main content

Route

Manages an Api Gateway V2 Route.

Sample code#

provider.ApiGatewayV2.makeRoute({
properties: ({ config }) => ({
ApiKeyRequired: false,
AuthorizationType: "NONE",
RouteKey: "ANY /my-function",
}),
dependencies: ({ resources }) => ({
api: resources.ApiGatewayV2.Api.myApi,
integration: resources.ApiGatewayV2.Integration.integrationMyApiMyFunction,
}),
});

Properties#

Dependencies#

Full Examples#

List#

The Routes can be filtered with the ApiGatewayV2::Route type:

gc l -t ApiGatewayV2::Route
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 7/7
┌────────────────────────────────────────────────────────────────────────────────────┐
│ 1 ApiGatewayV2::Route from aws │
├────────────────────────────────────────────────────────────────────────────────────┤
│ name: route::my-api::ANY /my-function │
│ managedByUs: Yes │
│ live: │
│ ApiKeyRequired: false │
│ AuthorizationType: NONE │
│ RouteId: ytbyc2l │
│ RouteKey: ANY /my-function │
│ Target: integrations/tcymupe │
│ ApiId: 7a38wlw431 │
│ ApiName: my-api │
│ Tags: │
│ gc-managed-by: grucloud │
│ gc-project-name: @grucloud/example-aws-api-gateway-lambda │
│ gc-stage: dev │
│ gc-created-by-provider: aws │
│ Name: my-api │
│ │
└────────────────────────────────────────────────────────────────────────────────────┘
List Summary:
Provider: aws
┌───────────────────────────────────────────────────────────────────────────────────┐
│ aws │
├─────────────────────┬─────────────────────────────────────────────────────────────┤
│ ApiGatewayV2::Route │ route::my-api::ANY /my-function │
└─────────────────────┴─────────────────────────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc l -t ApiGatewayV2::Route" executed in 11s