You want to select all existing resources at once with a tag based filter, for example to stop all EC2 instances nightly with the Amazon EC2 Instance task.
You need to specify an appropriate tag based resource filter in JSON format (insert fragments from the inline Examples dialog to get started):
Click on the Examples button and select the Tag (key only) example filter declaration.
Replace the "Environment" sample filter value for the filter "tag-key" with "Name" so that the resulting filter declaration looks as follows:
[ { "Name": "tag-key", "Values": ["Name"] } ] |
Alternatively, you can select the Tag (key and value) example filter declaration with a filter "tag:Name" and a wildcard value "*" as follows:
[ { "Name": "tag:Name", "Values": ["*"] } ] |
Save the task.
You can also check Don't fail for empty filter result to prevent the task failing if no matching resources are found. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|
[ { "Name": "tag:Name", "Values": ["*"] }]