AWS Resources Tagging

Get resources by tags

Get all resources with the tags specified in the filters. If the filter list is empty, the response includes all resources that are currently tagged or have ever had a tag.

Inputs

Expand All

Field

Type

Description

region [required]

enum

default: us-east-1

resourceTypes [required]

[string]

The list of resource types to be included in the response. For the list of services whose resources can be used in this parameter, see Services that support the Resource Groups Tagging API.

filters [required]

[object]

List of tag filters (keys and values) to restrict the output to only those resources that have tags with the specified keys and, if included, the specified values. The tags filters can be one of the following:

  • {key:keyA, values:[value1]}: return resources tagged with keyA=value1
  • {key:keyB, values:[value1, value2]}: return resources tagged with keyB=value1 OR keyB=value2
  • {key:keyC, values:[]}: return resources tagged with the keyC and with any or no value.

key [required]

string

values [required]

[string]

Outputs

Expand All

Field

Type

Description

resources [required]

[object]

resourceArn

string

tags [required]

object

amzRequestId [required]

string