Adding or Deleting Cluster Tags in Batches
Function
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.
- If a tag to be created has the same key as an existing tag in a cluster, the tag will overwrite the existing one.
- When tags are being deleted and some tags do not exist, the operation is considered successful by default. The character set of the tags will not be checked. A key and a value can respectively contain up to 36 and 43 Unicode characters. When tags are deleted, the tag structure body cannot be missing, and the key cannot be left blank or set to an empty string.
URI
- Format
- Parameter description
Table 1 URI parameter description 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
Request
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 cannot contain special characters (=*<>\,|/) or start or end with a space. |
value |
Yes |
String |
Tag value. A tag value cannot contain special characters (=*<>\,|/) or start or end with a space. Note:
|
Response
Response parameters
None.
Example
- Example request
{ "action": "create", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key", "value": "value3" } ] }
Status Code
Table 4 describes the status code of this API.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot