Adds labels to a specified Container Service for Kubernetes (ACK) cluster.
Debugging
Request syntax
PUT /tags HTTP/1.1
Content-Type:application/json
{
"resource_ids" : [ "String" ],
"resource_type" : "String",
"region_id" : "String",
"tags" : [ {
"key" : "String",
"value" : "String"
} ]
}Request parameters
Parameter | Type | Required | Example | Description |
resource_ids | Array of String | Yes | [c1a7bb282fc0d48b****] | The IDs of the resources to which you want to add labels. You can specify up to 50 resources. |
resource_type | String | Yes | CLUSTER | The type of the resources. Valid value: |
region_id | String | Yes | cn-hangzhou | The ID of the region where the resources are deployed. |
tags | Array of tag | Yes | The key-value pairs that you want to add to the resources. You can add up to 20 key-value pairs. Note:
|
Response syntax
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "String"
}Response parameters
Table 2. Response body parameters
Parameter | Type | Example | Description |
RequestId | String | 2D69A58F-345C-4FDE-88E4-BF51894XXXXX | The request ID. |
Examples
Sample requests
PUT /tags HTTP/1.1
Content-Type:application/json
{
"resource_ids" : [ "c1a7bb282fc0d48b****" ],
"resource_type" : "CLUSTER",
"region_id" : "cn-hangzhou",
"tags" : [ {
"key" : "env",
"value" : "prod"
} ]
}Sample success responses
JSON format
HTTP/1.1 200 OKError codes
For a list of error codes, visit the API Error Center.