Batch Tagging Resources
Function
This API is used to batch tag resources.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v1/{project_id}/instances/{instance_id}/tags/create
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. |
|
instance_id |
Yes |
String |
Instance 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 the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
tags |
No |
Array of tags objects |
Tag. |
Response Parameters
Status code: 200
OK
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
error_details |
String |
Error information. |
|
request_id |
String |
Request ID. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
error_details |
String |
Error information. |
|
request_id |
String |
Request ID. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
error_details |
String |
Error details. |
|
suggestion |
String |
Suggestion. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
error_details |
String |
Error information. |
|
request_id |
String |
Request ID. |
Example Requests
Batch tagging resources
https://{roma_endpoint}/v1/{project_id}/instances/{instance_id}/tags/create
{
"tags" : [ {
"key" : "aaa",
"value" : "bbb"
}, {
"key" : "ccc",
"value" : "ddd"
} ]
}
Example Responses
Status code: 200
OK
{ }
Status code: 400
Bad Request
{
"error_code" : "ROMA.00013000",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
}
Status code: 403
Forbidden
{
"error_code" : "ROMA.00012000",
"error_msg" : "No permissions to request this method"
}
Status code: 404
Not Found
{
"error_code" : "ROMA.00000101",
"error_msg" : "error summary",
"error_details" : "some error details here",
"suggestion" : ""
}
Status code: 500
Internal Server Error
{
"error_code" : "ROMA.00011000",
"error_msg" : "System error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server 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