action ECS

untag_resource

Removes the given tags from the provided resource

Run it now
View details
Typeaction
Modulechaosaws.ecs.actions
Nameuntag_resource
ReturnNone

Usage

JSON

{
  "name": "untag-resource",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ecs.actions",
    "func": "untag_resource",
    "arguments": {
      "tag_keys": [],
      "resource_arn": ""
    }
  }
}

YAML

name: untag-resource
provider:
  arguments:
    resource_arn: ""
    tag_keys: []
  func: untag_resource
  module: chaosaws.ecs.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
tagslistYesTagsList of tags to remove from the resource
resource_arnstringYesARNResource ARN to which to unset tags from
  • tag_keys: A list of tag keys to remove
  • resource_arn: The ARN of the resource to tag. Valid resources: capacity providers, tasks, services, task definitions, clusters, and container instances

For ECS resources, the long-form ARN must be used. See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-arn-timeline

Example

{
  "tag_keys": ["MyTagKey", "MyOtherTagKey"],
  "resource_arn": "arn:aws:ecs:...:service/cluster-name/service-name"
}

Signature

def untag_resource(tag_keys: List[str],
                   resource_arn: str,
                   configuration: Dict[str, Dict[str, str]] = None,
                   secrets: Dict[str, Dict[str, str]] = None):
    pass