Enables the metadata management feature for a bucket. After you enable the metadata management feature for a bucket, Object Storage Service (OSS) creates a metadata index library for the bucket and creates metadata indexes for all objects in the bucket. After the metadata index library is created, OSS continues to perform quasi-real-time scans on incremental objects in the bucket and creates metadata indexes for the incremental objects.
By default, an Alibaba Cloud account has the permissions to enable the metadata management feature. To enable the metadata management feature as a RAM user, make sure that the RAM user has the
oss:OpenMetaQuerypermission. For more information, see Attach a custom policy to a RAM user.
By default, the metadata management feature is supported only for a bucket that contains fewer than 100,000,000 objects.
During the public preview, you are not charged for metadata management. For more information about billable items of the data indexing feature, see Data indexing fees.
Time required for indexing
When you enable metadata management, OSS creates an index. The time required for creating the index is directly proportional to the number of objects stored in the bucket. The larger the number of objects in the bucket, the longer the time required to create the index.
POST /?metaQuery&comp=add HTTP/1.1 Host: BucketName.oss-cn-hangzhou.aliyuncs.com Date: GMT Date Authorization: SignatureValue
This request contains only common request headers. For more information, see Common HTTP headers.
This request contains only common response headers. For more information, see Common HTTP headers.
POST /?metaQuery&comp=add HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Date: Mon, 26 Jul 2021 13:08:38 GMT Authorization: OSS qn6qrrqxo2oawuk53otf****:ceOEyZavKY4QcjoUWYSpYbJ3****
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-request-id: 5C06A3B67B8B5A3DA422299D x-oss-server-time: 544
HTTP status code
The metadata index library of the bucket is being created. Wait until the metadata index library is created and try again.
You do not have the permissions to access the bucket. Make sure that the RAM user is granted the permissions to access the bucket.
The destination bucket does not exist. Specify a valid bucket name.