Queries resource labels and the detailed information, such as the key-value pairs of the labels and the clusters to which the labels are added. You can use labels to classify and manage Container Service for Kubernetes (ACK) clusters in order to meet monitoring, cost analysis, and tenant isolation requirements.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:ListTagResources |
get |
*All Resource
|
None | None |
Request syntax
GET /tags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| resource_ids |
array |
Yes |
The list of cluster IDs. |
["xxxxx","xxxxxx"] |
|
string |
No |
The cluster ID. |
c71cf3d796c374bf48644482cb0c3**** |
|
| resource_type |
string |
Yes |
The resource type. Set the value to |
CLUSTER |
| region_id |
string |
Yes |
The region ID. |
cn-beijing |
| tags |
array |
No |
The list of labels that you want to query. You can specify up to 20 labels. |
[{\"key\":\"env\",\"value\",\"dev\"},{\"key\":\"dev\", \"value\":\"IT\"}] |
| tag |
No |
The label. |
ack.aliyun.com |
|
| next_token |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. |
*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| next_token |
string |
The pagination token that is used in the next request to retrieve a new page of results. |
c374bf4864448**** |
| request_id |
string |
The request ID. |
E368C761-F8F6-4A36-9B58-BD53D5****** |
| tag_resources |
object |
The details of the queried labels and resources. |
|
| tag_resource |
array<object> |
The resource and label. |
|
|
object |
|||
| tag_key |
string |
The key of the label. |
ack.aliyun.com |
| tag_value |
string |
The value of the label. |
c71cf3d796c374bf48644482cb0c3**** |
| resource_id |
string |
The ID of the resource. |
c2e39566adf23481fa1164ed510**** |
| resource_type |
string |
The type of the resource. For more information, see Labels. |
ALIYUN::CS::CLUSTER |
Examples
Success response
JSON format
{
"next_token": "c374bf4864448****",
"request_id": "E368C761-F8F6-4A36-9B58-BD53D5******",
"tag_resources": {
"tag_resource": [
{
"tag_key": "ack.aliyun.com",
"tag_value": "c71cf3d796c374bf48644482cb0c3****",
"resource_id": "c2e39566adf23481fa1164ed510****",
"resource_type": "ALIYUN::CS::CLUSTER"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.