如何在aws中获取v2的网关阶段信息



我正在寻找一种通过apigatewayv2的aws cli获取舞台信息的方法,对于restapi,我可以使用以下命令,它工作良好

aws apigateway get-stages --rest-api-id $APIID  --profile int  --query  'item[?stageName==`current`]'  --output json

,因为stackresource是"AWS:: apiggateway:: restapi";类型,我正在尝试为apigateway版本2中的httpi运行相同的命令;AWS::ApiGatewayV2::Api"它不起作用,因为它给出了错误

An error occurred (NotFoundException) when calling the GetStages operation: Invalid API identifier specified

因为这不是restapi,是v2,我想我需要改变一些东西——rest-api-id $APIID,但找不到任何文档,想知道aws是否支持v2在cli?

尝试使用aws apigatewayv2 get-stages --api-id <> --profile <>

最新更新