The object tagging feature uses a key-value pair to tag an object. This topic describes how to delete the tags added to an object.

The following code provides an example on how to delete the tags added to an object:

using Aliyun.OSS;
var endpoint = "<yourEndpoint>";
var accessKeyId = "<yourAccessKeyId>";
var accessKeySecret = "<yourAccessKeySecret>";
var bucketName = "<yourBucketName>";
var objectName = "<yourObjectName>";
// Create an OSSClient instance.
var client = new OssClient(endpoint, accessKeyId, accessKeySecret);
    // Delete the tags added to the object.
    var result = client.DeleteObjectTagging(bucketName,objectName);
    Console.WriteLine("delete objects tagging succeeded");
catch (Exception ex)
    Console.WriteLine("delete objects failed. {0}", ex.Message);

For more information about how to delete the tags added to an object, see DeleteObjectTagging. For more information about the object tagging feature, see Configure object tagging.