Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You need to specify an appropriate tag based resource filter in JSON format (insert fragments from the inline Examples dialog to get started):

  1. Add an Amazon EC2 Instance task and select the Stop Instance(s) action.

  2. Select the desired AWS region and AWS security credentials as usual.

  3. Click on the Examples button and select the Tag (key only) example filter declaration.

  4. Replace the "Environment" sample filter value for the filter "tag-key" with "Name" so that the resulting filter declaration looks as follows:

    Code Block
    languagejs
    [
      {
        "Name": "tag-key",
        "Values": ["Name"]
      }
    ]
    1. (info) Alternatively, you can select the Tag (key and value) example filter declaration with a filter "tag:Name" and a wildcard value "*" as follows:

      Code Block
      languagejs
      [
        {
          "Name": "tag:Name",
          "Values": ["*"]
        }
      ]
  5. Save the task.

  6. Due to "Name" being a default tag available for every resource, when you run the task, it will target all EC2 instances in this region, no matter what their actual name is.

Tip
title

Prevent failing builds in regions without resources

You can also check Don't fail for empty filter result to prevent the task failing if no matching resources are found.

Filter by label (Content by label)
showLabelsfalse
max5
spacesUAAKB
sortmodified
showSpacefalse

...

reversetrue
typepage
cqllabel in ( "amazon-ebs" , "amazon-ec2" ) and type = "page" and space = "UAAKB"
labelsamazon-ec2 amazon-ebs
JIRA (
Page Properties
hiddentrue


server

Related issues

Jira Legacy

https://utoolity.atlassian.net

)columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolutionserverIdfac61c2e-db0a-39da-bb3c-e0dc0ef556f0key

/browse/UAA-93



[  {    "Name": "tag:Name",    "Values": ["*"]  }]