I am looking a way to get stage info via aws cli for apigatewayv2, for restapi I can use the following command and it works fine
aws apigateway get-stages --rest-api-id $APIID --profile int --query 'item[?stageName==`current`]' --output json
since the stackresource is of "AWS::ApiGateway::RestApi" type, I am trying to get same command running for Httpapi which is in apigateway version 2 "AWS::ApiGatewayV2::Api" and it does not work as it gives the error
An error occurred (NotFoundException) when calling the GetStages operation: Invalid API identifier specified
since this is not restapi and is of v2 I think I need to change something on --rest-api-id $APIID but could not find any doc, wondering if aws supports v2 in cli?
CodePudding user response:
Try using aws apigatewayv2 get-stages --api-id <> --profile <>