Disables the metadata management feature for an Object Storage Service (OSS) bucket. After this feature is disabled, OSS automatically deletes the metadata index library of the bucket, and you can no longer perform metadata indexing.
Usage notes
-
To disable the metadata management feature for a bucket, you must have the
oss:CloseMetaQuerypermission. For more information, see Common examples of RAM policies. -
The CloseMetaQuery operation returns HTTP status code 200 regardless of whether the metadata management feature is enabled for the bucket.
-
This is an asynchronous operation. After you call CloseMetaQuery, 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
DescribeRegions uses only common request headers. For more information, see Common request headers.
Response headers
The response contains only common response headers. For more information, see Common response headers.
Examples
Sample request
POST /?metaQuery&comp=delete HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 17 Apr 2025 13:08:38 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
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
OSS SDKs
You can use OSS SDKs for the following programming languages to call the CloseMetaQuery operation:
ossutil
For information about the ossutil command that corresponds to the CloseMetaQuery operation, see close-meta-query.
Error codes
|
Error code |
HTTP status code |
Description |
|
AccessDenied |
403 |
You do not have the required permissions to access the bucket. Ensure that the RAM user is granted the required permissions. |
|
NoSuchBucket |
404 |
The specified bucket does not exist. Verify that the bucket name is correct. |