This API is used to batch delete resource tags.
Function
This API is used to batch delete tags from a specified instance.
TMS may use this API to batch manage service resource tags.
Calling Method
For details, see Calling APIs.
URI
DELETE /v1/{project_id}/{resource_type}/{resource_id}/tags/delete
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
resource_type |
Yes |
String |
Resource type. |
|
resource_id |
Yes |
String |
Resource ID. |
|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID Constraints N/A Range N/A Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-type |
Yes |
String |
Definition Content type.
Constraints N/A Range
Default Value N/A |
|
X-Auth-Token |
Yes |
String |
User token. You can call the IAM API 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 ResourceTag objects |
Tag list. This field is mandatory when the tenant permission is used. For the op_service permission, choose either this field or sys_tags. |
|
sys_tags |
No |
Array of ResourceTag 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. Only create is supported currently. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
Yes |
String |
Key. The value can contain a maximum of 128 Unicode characters. The key complies with 3.1 KEY character set specifications. |
|
value |
Yes |
String |
Value. Each value can contain a maximum of 255 Unicode characters. The value must comply with 3.2 VALUE character set specifications. |
Response Parameters
Status code: 204
No Content
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
DELETE /v1/{project_id}/{resource_type}/{resource_id}/tags/delete
{
"tags" : [ {
"key" : "key1"
}, {
"key" : "key2",
"value" : "value3"
} ],
"sys_tags" : [ {
"key" : "_sys_enterprise_project_id",
"value" : "5aa119a8-d25b-45a7-8d1b-88e127885635"
} ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
204 |
No Content |
|
400 |
Invalid tag parameter. |
|
401 |
Authentication failed. |
|
403 |
Insufficient permissions. |
|
404 |
No resources 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