Use TaggingService for S3 Objects
This commit is contained in:
parent
6dd6686afc
commit
f7ad4cbc09
5 changed files with 71 additions and 33 deletions
|
|
@ -35,6 +35,12 @@ class TaggingService:
|
|||
else:
|
||||
self.tags[arn][t[self.keyName]] = None
|
||||
|
||||
def copy_tags(self, from_arn, to_arn):
|
||||
if self.has_tags(from_arn):
|
||||
self.tag_resource(
|
||||
to_arn, self.list_tags_for_resource(from_arn)[self.tagName]
|
||||
)
|
||||
|
||||
def untag_resource_using_names(self, arn, tag_names):
|
||||
for name in tag_names:
|
||||
if name in self.tags.get(arn, {}):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue