Deleting Resource Tags
Function
This API is used to delete tags of a real-time service. Tags can be deleted in batches.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
DELETE /v1/{project_id}/services/{resource_id}/tags/delete
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
resource_id |
Yes |
String |
Resource ID, for example, the ID of a real-time service |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
This field is set to application/json;charset=utf8. |
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API that is used for obtaining a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tags |
Yes |
Array of TmsTagForDelete objects |
Definition: List of tags to be deleted. Constraints: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Definition: Key of a TMS tag. Constraints: N/A Range: The value allows up to 128 characters, including letters, digits, spaces, and special characters (_.:=+-@). The value cannot start or end with a space or start with sys. Default Value: N/A |
value |
No |
String |
Definition: Value of a TMS tag. This parameter is optional. Constraints: N/A Range: The value allows up to 255 characters, including letters, digits, spaces, and special characters (_.:/=+-@). Default Value: N/A |
Response Parameters
Status code: 204
The tag is deleted.
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
https://{endpoint}/v1/{project_id}/services/a55eba18-1ebf-4e9a-8229-d2d3b593a3dc/tags/delete { "tags" : [ { "key" : "dev", "value" : "dev1" } ] }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
204 |
The tag is deleted. |
400 |
Invalid parameter |
401 |
Authentication failed. |
403 |
Insufficient permissions |
404 |
No resources available. |
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