Adding Tags to the Specified Resource
Function
This API is used to add one or more tags to the specified resource. Currently, tags can only be attached to permission sets.
URI
POST /v1/instances/{resource_type}/{resource_id}/tags/create
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_type |
Yes |
String |
Resource type Enumerated value:
|
resource_id |
Yes |
String |
Unique ID of a permission set Maximum length: 130 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Security-Token |
No |
String |
Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required. Maximum length: 2048 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Yes |
Array of objects |
A key-value pair used to manage resources Array length: 0 - 50 |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
request_id |
String |
Unique ID of a request |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
request_id |
String |
Unique ID of a request |
Status code: 409
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
request_id |
String |
Unique ID of a request |
Example Request
Adding tags to the specified resource
POST https://{hostname}/v1/instances/{resource_type}/{resource_id}/tags/create { "tags" : [ { "key" : "keystring", "value" : "valuestring" } ] }
Example Response
None
Status Code
For details, see Status Codes.
Error Code
For details, 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