An error occurred BadRequestException when calling the UpdateRestApi operation Invalid patch path tags keytest

0 votes

Hi Guys,

I am new to the AWS API gateway service. I am trying to add a tag to an existing restApi with AWS CLI. I have tried with the below command.

$ aws apigateway update-rest-api --rest-api-id ${rest_api_id} --patch-operations op=add,path=/tags/keytest,value='testvalue'

But it is showing me the below error.

An error occurred (BadRequestException) when calling the UpdateRestApi operation: Invalid patch path /tags/keytest
Dec 8, 2020 in AWS by akhtar
• 38,260 points
2,289 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to use the tag-resource method instead of update-rest-api in your command.

$ aws apigateway tag-resource --resource-arn your-api-gateway-arn --tags tag-name=tag-value
answered Dec 8, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP