Adding Resource Tags
Function
Add tags to a specified resource.
The API is idempotent.
If a to-be-created tag has the same key as an existing tag, the tag will be created and overwrite the existing one.
URI
POST /v2/{project_id}/{resource_type}/{resource_id}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. You can obtain it in Obtaining a Project ID. |
resource_type |
Yes |
String |
Resource type.
|
resource_id |
Yes |
String |
Resource ID |
Request
- Parameter description
Table 2 Parameter in the request Parameter
Mandatory
Type
Description
tag
Yes
Object
Tag
For details, see Table 3.
- Example request
Add tags for the private zone whose ID is ff8080825b8fc86c015b94bc6f8712c3:
POST https://{DNS_Endpoint}/v2/{project_id}/DNS-private_zone/ff8080825b8fc86c015b94bc6f8712c3/tags
{ "tag": { "key": "key1", "value": "value1" } }
Response
None
Returned Value
If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.
For details, see Status Code.
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