CmdID / aws / aws apigatewayv2
aws apigatewayv2 get-routes
Gets the Routes for an API. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To retrieve a list of routes
The following get-routes example displays a list of all of an API's routes.
aws apigatewayv2 get-routes --api-id a1b2c3d4Identify--api-idThe API identifier.Its output
{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "72jz1wk",
"RouteKey": "ANY /admin",
"Target": "integrations/a1b2c3"
},
{
"ApiGatewayManaged": true,
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "go65gqi",
"RouteKey": "$default",
"Target": "integrations/a1b2c4"
}
]
}For more information, see Create routes for HTTP APIs in API Gateway in the Amazon API Gateway Developer Guide.
Options
--api-idThe API identifier.--max-resultsThe maximum number of elements to be returned for this resource.--next-tokenThe next page of elements from this collection.