Cannot untag AWS resources

478 views Asked by At

I am trying to untag deleted AWS resources with the resourcegroupstaggingapi.

I am listing my resources with the following command :

aws resourcegroupstaggingapi get-resources --tag-filters Key=special_project --tags-per-page 100

Then, I am trying to untag resources with :

aws resourcegroupstaggingapi untag-resources --resource-arn-list arn:aws:mediaconnect:ap-northeast-1:XXXXXXXXXXX:flow:1-XXXXXXXXXXX-XXXXXXXX:flow-created-by-mr_ --tag-keys special_project

I always got the following error:

{
"FailedResourcesMap": {
    "arn:aws:mediaconnect:ap-northeast-1:XXXXXXXXXXX:flow:1-XXXXXXXXXXX-XXXXXXXX:flow-created-by-mr_": {
        "StatusCode": 400,
        "ErrorCode": "InvalidParameterException",
        "ErrorMessage": "Unrecognized service for tagging"
    }
}}

Here is the example from the AWS doc :

aws resourcegroupstaggingapi untag-resources \
--resource-arn-list arn:aws:s3:::awsexamplebucket \
--tag-keys Environment,CostCenter

I don't understand what I'm doing wrong. Any help would be highly appreciated.

Additional information :

Tagging AWS MediaConnect resources work with the MediaConnect API, but doesn't work with the resourcegroupstaggingapi. On the other hand the resourcegroupstaggingapi can list AWS MediaConnect resources.

0

There are 0 answers