You can call the DescribeMetaList operation to query the information about the restorable databases and tables in a specific data backup file.

Before you call the RestoreTable operation to restore individual databases or tables of an ApsaraDB RDS for MySQL instance, you can call this operation to query the information about the databases and tables that can be restored. For more information, see Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.

Note This operation is supported only when the instance runs MySQL 8.0, MySQL 5.7, or MySQL 5.6 on RDS High-availability Edition with local SSDs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeMetaList

The operation that you want to perform. Set the value to DescribeMetaList.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the generated token is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance.

RestoreType String No BackupSetID

The method that is used to restore data. Valid values:

  • BackupSetID: Data is restored from a data backup file. If you use this value, you must also specify the BackupSetID parameter.
  • RestoreTime: Data is restored to a specific point in time. If you use this value, you must also specify the RestoreTime parameter.

Default value: BackupSetID.

BackupSetID Integer No 14358

The ID of the data backup file from which you want to restore data. You can call the DescribeBackups operation to query the IDs of data backup files.

Note This parameter is required when you set the RestoreType parameter to BackupSetID.
RestoreTime String No 2019-05-30T03:29:10Z

The point in time to which you want to restore data. The specified point in time must be earlier than the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can call the DescribeBackups operation to query the restorable time range.

Note This parameter is required when you set the RestoreType parameter to RestoreTime.
GetDbName String No testdb1

The name of the database to query. ApsaraDB RDS implements exact match based on the value of this parameter and returns the name of the matched database and the names of all tables contained in the database.

Note If you leave this parameter empty, ApsaraDB RDS returns all databases that are created on the instance.
Pattern String No test

The name of the database to query. ApsaraDB RDS implements fuzzy match based on the value of this parameter and returns only the names of the matched databases.

Note For example, if you set the value to test, ApsaraDB RDS returns testdb1 and testdb2. Then, you can specify the GetDbName parameter to query tables in the required database.
PageSize Integer No 1

The number of entries to return on each page. Default value: 1.

Note This parameter is valid only when you specify the PageIndex parameter.
PageIndex Integer No 1

The number of the page to return. Valid values: any non-zero positive integer. Default value: 1.

Note This parameter is valid only when you specify the PageSize parameter.
ResourceGroupId String No rg-acfmy*****

The ID of the resource group.

Response parameters

Parameter Type Example Description
DBInstanceName String rm-uf6wjk5xxxxxxx

The name of the instance.

TotalPageCount Integer 1

The total number of pages returned.

RequestId String 60F9A12A-16B8-4728-B099-4CA38D32C31C

The ID of the request.

PageRecordCount Integer 1

The number of entries returned on the current page.

TotalRecordCount Integer 1

The total number of entries returned.

PageNumber Integer 1

The number of the returned page.

Items Array of Meta

An array consisting of the information about the databases and tables whose data is included in the data backup file.

Meta
Tables String test1

The name of the table.

Database String testdb1

The name of the database.

Size String 64

The size of the table. Unit: KB.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeMetaList
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeMetaList>
    <TotalPageCount>1</TotalPageCount>
    <TotalRecordCount>1</TotalRecordCount>
    <PageRecordCount>1</PageRecordCount>
    <RequestId>60F9A12A-16B8-4728-B099-4CA38D32C31C</RequestId>
    <PageNumber>1</PageNumber>
    <Items>
        <Meta>
            <Size>64</Size>
            <Database>testdb1</Database>
            <Tables>test1</Tables>
        </Meta>
    </Items>
    <DBInstanceName>rm-uf6wjk5xxxxxxx</DBInstanceName>
</DescribeMetaList>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalPageCount" : "1",
  "TotalRecordCount" : "1",
  "PageRecordCount" : "1",
  "RequestId" : "60F9A12A-16B8-4728-B099-4CA38D32C31C",
  "PageNumber" : "1",
  "Items" : {
    "Meta" : [ {
      "Size" : "64",
      "Database" : "testdb1",
      "Tables" : "test1"
    } ]
  },
  "DBInstanceName" : "rm-uf6wjk5xxxxxxx"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidPageSize The page size is invalid The error message returned because the value of the pageSize parameter is invalid. Enter a valid number.
400 InvalidRestoreTime.Format Specified restore time is not valid. The error message returned because the specified restore time is invalid. Enter a valid time.
403 InvalidMeta.Empty Meta information is empty. The error message returned because the meta information is null.
403 IncorrectDBInstanceType Current DB instance type does not support this operation. The error message returned because this operation is not supported when the instance is in the current state.
403 IncorrectEngineVersion Current engine version does not support operations. The error message returned because this operation is not supported for the database engine version that is run on the instance.
403 InvalidBackupLogStatus Current backup log enable status does not support this operation. The error message returned because the log backup feature is disabled and the data cannot be restored to a specific point in time.
404 InvalidBackupSetID.NotFound Specified backup set ID does not exist. The error message returned because the specified data backup file cannot be found. Check the existing data backup files.

For a list of error codes, visit the API Error Center.