Add codepipeline.untag_resource

This commit is contained in:
gruebel 2019-12-23 19:50:16 +01:00
commit 8331d480ba
4 changed files with 71 additions and 4 deletions

View file

@ -192,6 +192,20 @@ class CodePipelineBackend(BaseBackend):
for tag in tags:
pipeline.tags.update({tag["key"]: tag["value"]})
def untag_resource(self, arn, tag_keys):
name = arn.split(":")[-1]
pipeline = self.pipelines.get(name)
if not pipeline:
raise ResourceNotFoundException(
"The account with id '{0}' does not include a pipeline with the name '{1}'".format(
ACCOUNT_ID, name
)
)
for key in tag_keys:
pipeline.tags.pop(key, None)
codepipeline_backends = {}
for region in Session().get_available_regions("codepipeline"):