When I try to use boto3 to update a tag value on an api gateway endpoint, I get the following error:
BadRequestException: An error occurred (BadRequestException) when calling the TagResource operation: Invalid ARN specified in the request
Here is the ARN I am passing to the script:
arn:aws:execute-api:us-east-1:111111111111:5yojn7poz0/*/GET/test
Can you help me spot the problem?
CodePudding user response:
Not all resources types support tagging. For a list of allowed resources, see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-tagging-supported-resources.html.
If you intended to tag the api as a whole, the arn structure is arn:<partition>:apigateway:<region>::/restapis/<api-id>
. For a complete list see https://docs.aws.amazon.com/apigateway/latest/developerguide/arn-format-reference.html.