All Products
Search
Document Center

Object Storage Service:GetMetaQueryStatus

Last Updated:Apr 29, 2024

Queries the information about the metadata index library of a bucket.

Usage notes

If you want to query the information about the metadata index library of a bucket, you must have the oss:GetMetaQueryStatus permission. For more information, see Attach a custom policy to a RAM user.

Request syntax

GET /?metaQuery HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Response elements

Element

Type

Example

Description

MetaQueryStatus

Container

N/A

The container that stores metadata information.

Child nodes: State, Phase, CreateTime, and UpdateTime.

Phase

String

FullScanning

The scan type. Valid values:

  • FullScanning: Full scanning is in progress.

  • IncrementalScanning: Incremental scanning is in progress.

Parent node: MetaQuery.

State

String

Running

The status of the metadata index library. Valid values:

  • Ready: The metadata index library is being prepared after it is created.

    In this case, the metadata index library cannot be used to query data.

  • Stop: The metadata index library is paused.

  • Running: The metadata index library is running.

  • Retrying: The metadata index library failed to be created and is being created again.

  • Failed: The metadata index library failed to be created.

  • Deleted: The metadata index library is deleted.

Parent node: MetaQuery.

CreateTime

String

2021-08-02T10:49:17.289372919+08:00

The time when the metadata index library was created. The value follows the RFC 3339 standard in the YYYY-MM-DDTHH:mm:ss+TIMEZONE format. YYYY-MM-DD indicates the year, month, and day. T indicates the beginning of the time element. HH:mm:ss indicates the hour, minute, and second. TIMEZONE indicates the time zone.

Parent node: MetaQuery.

UpdateTime

String

2021-08-02T10:49:17.289372919+08:00

The time when the metadata index library was updated. The value follows the RFC 3339 standard in the YYYY-MM-DDTHH:mm:ss+TIMEZONE format. YYYY-MM-DD indicates the year, month, and day. T indicates the beginning of the time element. HH:mm:ss indicates the hour, minute, and second. TIMEZONE indicates the time zone.

Parent node: MetaQuery.

Examples

Sample requests

GET /?metaQuery HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 26 Jul 2021 13:08:38 GMT
Authorization: OSS qn6q**************:77Dv****************

Sample responses

HTTP/1.1 200 OK
x-oss-request-id: 5C1B138A109F4E405B2D****
Date: Mon, 26 Jul 2021 13:08:38 GMT
Content-Length: 118
Content-Type: application/xml
Connection: keep-alive
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<MetaQueryStatus>
  <State>Running</State>
  <Phase>FullScanning</Phase>
  <CreateTime>2021-08-02T10:49:17.289372919+08:00</CreateTime>
  <UpdateTime>2021-08-02T10:49:17.289372919+08:00</UpdateTime>
</MetaQueryStatus>

Error codes

Error code

HTTP status code

Description

MetaQueryNotExist

400

The error message returned because the metadata index library does not exist in the bucket. Make sure that you have enabled the metadata management feature for the bucket and try again after the metadata index library is created.

AccessDenied

403

The error message returned because you do not have the permissions to access the bucket. Make sure that the RAM user is granted the permissions to access the bucket.

NoSuchBucket

404

The error message returned because the destination bucket does not exist. Specify a valid bucket name.