Queries tags added to resource groups or resource directory members.
Operation description
The following example queries tags on resource group rg-aekz6bre2uq****. The response shows that only the k1:v1 tag is added.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
resourcemanager:ListTagResources |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The pagination token for the next query. |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The number of entries per 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. Note
To query tags on resource directory members, specify both |
rg-aekz6bre2uq**** |
|
| ResourceType |
string |
No |
The resource type to query. Valid values:
|
ResourceGroup |
This operation also uses Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token.
|
caeba0bbb2be03f84eb48b699f0a**** |
| RequestId |
string |
The request ID. |
8054B059-6B36-53BF-AA45-B8C9A0ED05AB |
| TagResources |
array<object> |
The tags. |
|
|
object |
|||
| ResourceId |
string |
The ID of the resource group or member. |
rg-aekz6bre2uq**** |
| ResourceType |
string |
The resource type. Valid values:
|
resourcegroup |
| TagKey |
string |
The tag key. |
k1 |
| TagValue |
string |
The tag value. |
k1 |
Examples
Success response
JSON format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "8054B059-6B36-53BF-AA45-B8C9A0ED05AB",
"TagResources": [
{
"ResourceId": "rg-aekz6bre2uq****",
"ResourceType": "resourcegroup",
"TagKey": "k1",
"TagValue": "k1"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.