Creating Tags in Batches
Function
This API is used to create tags in batches.
Calling Method
For details, see Calling APIs.
URI
POST /v5/{project_id}/{resource_type}/{resource_id}/tags/create
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant ID |
resource_type |
Yes |
String |
Resource type. The value is hss. |
resource_id |
Yes |
String |
Resource ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tags |
No |
Array of ResourceTagInfo objects |
Tag List |
sys_tags |
No |
Array of ResourceTagInfo objects |
Tag List |
Response Parameters
Status code: 200
success
None
Example Requests
Create a tag key TESTKEY20220831190155 (the tag value is 2) and a tag key test (the tag value is hss).
POST https://{endpoint}/v5/05e1e8b7ba8010dd2f80c01070a8d4cd/hss/fbaa9aca-2b5f-11ee-8c64-fa163e139e02/tags/create { "tags" : [ { "key" : "TESTKEY20220831190155", "value" : "2" }, { "key" : "test", "value" : "hss" } ] }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
success |
400 |
Invalid parameter. |
401 |
Authentication failed. |
403 |
Insufficient permission. |
404 |
Resources not found. |
500 |
System error. |
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