批量打资源标签 - AddTags
功能介绍
批量打资源标签。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
POST /v1/{project_id}/instances/{instance_id}/tags/create
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。 |
instance_id | 是 | String | 实例ID。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
tags | 否 | Array of tags objects | 标签。 |
响应参数
状态码:200
OK
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误消息。 |
error_details | String | 具体错误消息。 |
request_id | String | 请求处理ID。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误消息。 |
error_details | String | 具体错误消息。 |
request_id | String | 请求处理ID。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误消息。 |
error_details | String | 具体错误消息。 |
suggestion | String | 处理建议。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误消息。 |
error_details | String | 具体错误消息。 |
request_id | String | 请求处理ID。 |
请求示例
批量打资源标签
https://{roma_endpoint}/v1/{project_id}/instances/{instance_id}/tags/create
{
"tags" : [ {
"key" : "aaa",
"value" : "bbb"
}, {
"key" : "ccc",
"value" : "ddd"
} ]
} 响应示例
状态码:200
OK
{ } 状态码:400
Bad Request
{
"error_code" : "ROMA.00013000",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
} 状态码:403
Forbidden
{
"error_code" : "ROMA.00012000",
"error_msg" : "No permissions to request this method"
} 状态码:404
Not Found
{
"error_code" : "ROMA.00000101",
"error_msg" : "error summary",
"error_details" : "some error details here",
"suggestion" : ""
} 状态码:500
Internal Server Error
{
"error_code" : "ROMA.00011000",
"error_msg" : "System error"
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
错误码
请参见错误码。

