ListTagResources
Retrieves the relationships between all instances and tags.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:ListTagResource |
none |
*All Resource
|
None | None |
Request syntax
GET /openapi/tags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
Page
deprecated
|
integer |
No |
The page number of the resource relationship list. This parameter is deprecated. |
1 |
Size
deprecated
|
integer |
No |
The number of entries per page for paged query. This is a deprecated field. Settings for paging are no longer supported. |
10 |
| ResourceType |
string |
Yes |
The resource type definition. |
INSTANCE |
| NextToken |
string |
No |
The token for the next query. |
1d2db86sca4384811e0b5e8707e****** |
| ResourceIds |
string |
No |
The list of instance IDs to query. The value is in JSON array format and supports up to 20 items. |
["es-cn-aaa","es-cn-bbb"] |
| Tags |
string |
No |
The list of tags to query. The value is in JSON string format and contains up to 20 items. |
[{"key":"env", "value":"dev"},{"key":"dev", "value":"IT"}] |
You must specify at least one of the ResourceIds and Tags parameters. Otherwise, an error is returned.
- You can query only visible system tags. You cannot query invisible tags.
Note
System tags are tags that cloud services add to user instances. System tags are classified into visible tags and invisible tags.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| PageSize |
integer |
The page number. |
1 |
| RequestId |
string |
The request ID. |
F99407AB-2FA9-489E-A259-40CF6D****** |
| Headers |
object |
The response header information. This parameter is empty and is for reference only. Do not create a dependency on this parameter in your program. Note
This parameter is not included in the response example. |
|
| X-Total-Count |
integer |
The resource count of TagResource entries found. |
10 |
| TagResources |
object |
The tag resource group. |
|
| TagResource |
array<object> |
The tag resource. |
|
|
object |
|||
| TagValue |
string |
The tag value. |
dev |
| ResourceType |
string |
The resource type. The value is fixed as |
ALIYUN::ELASTICSEARCH::INSTANCE |
| ResourceId |
string |
The resource ID. |
es-cn-oew1q8bev0002**** |
| TagKey |
string |
The tag key. |
env |
Examples
Success response
JSON format
{
"PageSize": 1,
"RequestId": "F99407AB-2FA9-489E-A259-40CF6D******\t",
"Headers": {
"X-Total-Count": 10
},
"TagResources": {
"TagResource": [
{
"TagValue": "dev",
"ResourceType": "ALIYUN::ELASTICSEARCH::INSTANCE",
"ResourceId": "es-cn-oew1q8bev0002****",
"TagKey": "env"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.