Creating or Deleting Predefined Tags
Function
This API is used to create or delete predefined tags. You can add tags to resources using the predefined tags.
This API supports idempotency and batch processing.
Idempotent operations refer to invoking the same API for multiple times by using the same parameters, which have the same impact on the system.
URI
POST /v1.0/predefine_tags/action
Request
- Parameter description
Table 1 Parameters Name
Mandatory
Type
Description
action
Yes
String
Specifies the action identifier.
The value is case sensitive and can be create or delete.
tags
Yes
Array of objects
Specifies the tags.
For details, see Table 2.
- tags field description
Table 2 Fields Name
Mandatory
Type
Description
key
Yes
String
Specifies the key.
A tag key can contain up to 36 characters. Only A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.
value
Yes
String
Specifies the value.
A tag value can contain up to 43 characters and can be an empty string. Only A-Z, a-z, 0-9, periods (.), hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.
- Example request
POST https://{TMS endpoint}/v1.0/predefine_tags/action
{ "action": "create", "tags": [ { "key": "ENV1", "value": "DEV1" }, { "key": "ENV2", "value": "DEV2" } ] }
Example Response
Status code: 200
Successful operation
Status Codes
See Status Codes.
Error Codes
See Error Codes.
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