This API is used to add or delete tags to or from a specified cluster in batches.
You can add a maximum of 10 tags to a cluster.
This API is idempotent.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details on how to obtain the project ID, see Obtaining a Project ID. |
cluster_id |
Yes |
Cluster ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
Operation to be performed. The value can be set to create or delete only. |
tags |
Yes |
List<resource_tag> |
Tag list. For details about the parameter, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Key. A tag key can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). |
value |
Yes |
String |
Tag value. A tag value can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). Note:
|
Response parameters
None.
{ "action": "create", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key", "value": "value3" } ] }
Table 4 describes the status code of this API.