All Products
Search
Document Center

Object Storage Service:CloseMetaQuery

Last Updated:Sep 20, 2023

Disables the metadata management feature for an Object Storage Service (OSS) bucket. After the metadata management feature is disabled for a bucket, OSS automatically deletes the metadata index library of the bucket. After the metadata index library is deleted, you cannot perform metadata indexing.

Usage notes

  • To disable the metadata management feature for a bucket, you must have the oss:CloseMetaQuery permission. For more information, see Common examples of RAM policies.

  • HTTP status code 200 is returned when you call the CloseMetaQuery operation to disable the metadata management feature, regardless of whether the metadata management feature is enabled for a bucket.

  • This operation is an asynchronous operation and does not immediately take effect. After you call the CloseMetaQuery operation, it takes some time for OSS to delete the metadata index library.

Request syntax

POST /?metaQuery&comp=delete HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

This request contains only common request headers. For more information, see Common HTTP headers.

Response headers

This request contains only common response headers. For more information, see Common HTTP headers.

Examples

Sample request

POST /?metaQuery&comp=delete HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 26 Jul 2021 13:08:38 GMT
Authorization: OSS qn6qrrqxo2oawuk53otf****:ceOEyZavKY4QcjoUWYSpYbJ3**** 

Sample response

HTTP/1.1 200 OK
x-oss-request-id: 5C1B138A109F4E405B2D****
Date: Mon, 26 Jul 2021 13:08:38 GMT
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS
x-oss-server-time: 178

Error codes

Error code

HTTP status code

Description

AccessDenied

403

You do not have permissions to access the bucket. Make sure that the RAM user is granted permissions to access the bucket.

NoSuchBucket

404

The destination bucket does not exist. Specify a valid bucket name.