Release Notes
Announcements
API | Operation Name | Operation Description |
Setting Tags | Setting Tags for Existing Objects | |
Querying Tags | Query existing object tags for a specified object. | |
Deleting a tag | Delete existing object tags for a specified object. |
// Bucket name, which consists of bucketname-appid (appid must be included), can be viewed in the COS console. https://console.tencentcloud.com/cos5/bucketlet bucket = "examplebucket-1250000000";//The location identifier of an object in a bucket, also known as the object keylet cosPath = "exampleobject.txt";let tagSet = new List<TagObject>();tagSet.add(new TagObject("tag1", "value1"))tagSet.add(new TagObject("tag2", "value2"))let request = new PutObjectTagRequest(bucket,cosPath,tagSet);try {let result = await CosXmlBaseService.default().putObjectTag(request)// result includes http headers, etc.} catch (e) {// Exception handling}
// Bucket name, which consists of bucketname-appid (appid must be included), can be viewed in the COS console. https://console.tencentcloud.com/cos5/bucketlet bucket = "examplebucket-1250000000";//The location identifier of an object in a bucket, also known as the object keylet cosPath = "exampleobject.txt";let request = new GetObjectTagRequest(bucket, cosPath);try {let result = await CosXmlBaseService.default().getObjectTag(request)// result includes http headers, etc.} catch (e) {// Exception handling}
// Bucket name, which consists of bucketname-appid (appid must be included), can be viewed in the COS console. https://console.tencentcloud.com/cos5/bucketlet bucket = "examplebucket-1250000000";//The location identifier of an object in a bucket, also known as the object keylet cosPath = "exampleobject.txt";let request = new DeleteObjectTagRequest(bucket, cosPath);try {let result = await CosXmlBaseService.default().deleteObjectTag(request)// result includes http headers, etc.} catch (e) {// Exception handling}
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan