You can add labels in key-value pairs to clusters. This allows cluster developers or O\\\\\\&M engineers to classify and manage clusters in a more flexible manner. This also meets the requirements for monitoring, cost analysis, and tenant isolation. You can call the TagResources operation to add labels to a cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:TagResources |
update |
*All Resource
|
None | None |
Request syntax
PUT /tags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| resource_ids |
array |
Yes |
The list of resource IDs. |
|
|
string |
No |
The resource ID. You can specify up to 50 resource IDs. |
c1a7bb282fc0d48b**** |
|
| resource_type |
string |
Yes |
The type of resources that you want to label. Set the value to |
CLUSTER |
| region_id |
string |
Yes |
The ID of the region in which the resource resides. |
cn-hangzhou |
| tags |
array |
Yes |
The tags that you want to add to the resources in key-value pairs. You can add up to 20 key-value pairs. Note:
|
|
| tag |
No |
The resource tags. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF51894****** |
Examples
Success response
JSON format
{
"RequestId": "2D69A58F-345C-4FDE-88E4-BF51894******"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.