Deleting the Tags of an Object
Function
You can use this command to delete the tags of an object.
Constraints
- To delete the tags of an object, you must be the object owner or have the required permission (obs:bucket:DeleteObjectTagging granted using IAM or DeleteObjectTagging granted using a bucket policy). For details, see Differences Between OBS Permissions Control Methods, Using IAM Roles or Policies to Grant Access to OBS, and Creating a Custom Bucket Policy.
Command Line Structure
- Windows
obsutil object-tagging obs://bucket/key -method=delete [-versionId=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- macOS or Linux
./obsutil object-tagging obs://bucket/key -method=delete [-versionId=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
Examples
- In Windows, run obsutil object-tagging obs://test-bucket/key -method=delete to delete the tag configuration of object key in the test-bucket bucket.
obsutil object-tagging obs://test-bucket/key -method=delete Start at 2024-09-30 07:59:28.8675681 +0000 UTC Delete tagging object [key] in the bucket [test-bucket] successfully, cost [2155] ms, request id [0000019AB628731C40193DECAE8F0D68]
Parameter Description
| Parameter | Optional or Mandatory | Description |
|---|---|---|
| bucket | Mandatory | The bucket name |
| method | Mandatory | The method. Set it to delete when you delete object tags. |
| config | Optional (additional parameter) | The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. |
| e | Optional (additional parameter) | The endpoint |
| i | Optional (additional parameter) | The user's AK |
| k | Optional (additional parameter) | The user's SK |
| t | Optional (additional parameter) | The user's security token |
Helpful Links
- For details about the API for deleting object tags, see Deleting Object Tags.
- For details about the meanings, causes, and handling methods of error codes that may be returned during the operation, see OBS Error Codes.
What is your overall rating for this page?
Thank 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