This API is used to add or delete tags to or from a specified cluster in batches. Tag Management Service (TMS) uses this API to batch manage tags of a cluster. A cluster can have a maximum of 10 tags.
POST /v1.0/{project_id}/css-cluster/{cluster_id}/tags/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID For details, see Obtaining a Project ID and Name. |
cluster_id |
Yes |
String |
IDs of clusters to which tags are to be added or deleted in batches |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tags |
No |
Array of tag objects |
Tag list |
action |
Yes |
String |
Operation to be performed. The value can be set to create or delete only. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Tag key. The value can contain up to 36 characters. |
value |
This parameter is mandatory when action is set to create and optional when action is set to delete. |
String |
Tag value. The value contains up to 43 characters. If value is not empty, delete tags by key/value. If value is empty, delete tags by key. |
None
POST /v1.0/458d905f22da49c39f609e3347d65723/css-cluster/4f3deec3-efa8-4598-bf91-560aad1377a3/tags/action
This API is used to add tags in batches.
{ "action": "create", "tags": [ { "key": "key1", "value": "value1" } ] }
{ "action": "delete", "tags": [ { "key": "key1" } ] }
Table 4 describes the status code.