Queries the tags that are added to resource groups or the members in a resource directory.
Operation description
This topic provides an example on how to call the API operation to query the tags that are added to the resource group with an ID of rg-aekz6bre2uq****. The response shows that only the k1:v1 tag is added to the resource group.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| NextToken | string | No | The token that is used to start the next query. | caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults | integer | No | The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. | 10 |
| Tag | array<object> | No | The tag key and value. | |
| object | No | The tag key and value. | ||
| Key | string | No | A tag key. | k1 |
| Value | string | No | A tag value. | v1 |
| ResourceId | array | No | The resource ID. | |
| string | No | The ID of a resource group or member. This parameter specifies a filter condition for the query. Note
If you want to query the tags that are added to the members in a resource directory, you must configure both the ResourceId.N and ResourceType parameters and set the ResourceType parameter to Account in your request.
| rg-aekz6bre2uq**** | |
| ResourceType | string | No | The type of the objects whose tags you want to query. This parameter specifies a filter condition for the query. Valid values:
| ResourceGroup |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSONformat
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "8054B059-6B36-53BF-AA45-B8C9A0ED05AB",
"TagResources": [
{
"TagValue": "k1",
"ResourceId": "rg-aekz6bre2uq****",
"TagKey": "k1",
"ResourceType": "resourcegroup"
}
]
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
