GetResources#

Description#

Request to receive the list of resources for which tags exist.

Request Parameters#

  • PaginationTokenPaginationToken returned by a previous call (see Response Elements).

    • Type: String

    • Required: No

  • ResourceARNList — The list of Amazon Resource Names (ARNs) of resources.

    • Required: No

    • Type: Array of strings

    • Length constraints: Up to 100 items

    • Constraints: Cannot be used with the ResourceTypeFilters option

    • Valid values: See ResourceARNList

  • ResourceTypeFilters — The list of filters to select resources by service and/or resource type.

    • Required: No

    • Type: Array of strings

    • Length constraints: Up to 100 items

    • Constraints: Cannot be used with the ResourceARNList option

    • Pattern: <service_name> | <service_name>:<resource_type>

    • Valid values: See :ref: ResourceTypeFiltersValues

  • ResourcesPerPage — The limit on the number of returned resources.

    • Type: Integer

    • Required: No

    • Default value: 20

    • Minimal value: 1

    • Maximum value: 100

  • TagFilters — The list of filters to select resources by tag key/value.

    • Required: No

    • Type: List of TagFilter objects

    • Length constraints: Up to 50 items

    Note

    TagFilters determines which resources will be included in the response: it will contain only those resources that have at least one tag that matches the filters. For each resource included in the response, all its tags will be returned.

Response Elements#

  • PaginationToken — The token is returned only when the response cannot contain all tagged resources. To retrieve further data, the returned value must be passed as a PaginationToken parameter in the same request.

    • Type: String

  • ResourceTagMappingList — List of tagged resources.

Examples#

c2-rgt GetResources
c2-rgt GetResources ResourceARNList.1 "arn:c2:ec2::<login>:subnet/<resource-id>"
c2-rgt GetResources ResourceTypeFilters.1 "efs" ResourceTypeFilters.2 "ec2:vpc"
c2-rgt GetResources TagFilters.1.Key "tag_key" TagFilters.1.Values.1 "tag_value_1" TagFilters.1.Values.2 "tag_value_2"
c2-rgt GetResources ResourcesPerPage 50 PaginationToken <pagination_token>