Reputation: 14112
Using boto3
, almost every AWS resource has a different method for tagging [for examples, see 1].
Is there library that offer an unified programmatic interface for tagging any (or almost any) type of AWS resource?
[1] Examples:
EC2
uses create_tags()
, delete_tags()
, describe_tags()
S3
uses delete_bucket_tagging()
, get_bucket_tagging()
, put_bucket_tagging()
...
... different functions for all resources ...
Upvotes: 2
Views: 7864
Reputation: 4077
In boto3 you can use ResourceGroupsTaggingAPI method tag_resources(). Which is used to apply one or more tags to the specified list of resources. Consider that not all resources can have tags and is limited to a specific region. In the same way there is also a method to untag a list of resources: untag_resources()
Official documentation:
Upvotes: 4