Deleting Resource Tags in Batches
Function
This API is used to delete resource tags in batches.
Calling Method
For details, see Calling APIs.
URI
DELETE /v1/{project_id}/{resource_type}/{resource_id}/tags/delete
| Parameter | Mandatory | Parameter Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| resource_type | Yes | String | Resource type.
|
| resource_id | Yes | String | Resource ID. You can obtain the value from the resource_id field in the API for querying the instance list. |
Request Parameter
| Parameter | Mandatory | Parameter Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. |
| Parameter | Mandatory | Parameter Type | Description |
|---|---|---|---|
| tags | No | Array of tags objects | Tags. This parameter is mandatory for the tenant permission. For the op_service permission, either tags or sys_tags can be set. |
| sys_tags | No | Array of sys_tags objects | System tag list. This field is available only to the op_service permission. Choose either this field or tags. Currently, TMS invokes only one resource_tag structure. The key is fixed as _sys_enterprise_project_id. The value is UUID or 0. 0 indicates the enterprise project by default. Currently, only create is supported. |
Response Parameter
Status code: 204
| Parameter | Parameter Type | Description |
|---|---|---|
| - | String | - |
Status code: 400
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 403
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 500
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Example Request
/v1/{project_id}/{resource_type}/{resource_id}/tags/delete
{
"tags" : [ {
"key" : "key1"
}, {
"key" : "key2",
"value" : "value3"
} ]
} Response Examples
Status code: 400
Failed
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
} Status Code
| Status Code | Description |
|---|---|
| 204 | Request succeeded. |
| 400 | Failed |
| 403 | Authentication failed. |
| 500 | Server error. |
Error Codes
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.