You can call this operation to query the databases at a specified time or contained in a backup set before performing database restoration for an ApsaraDB for MongoDB instance.

Note You can call the CreateDBInstance operation to restore a single database. For more information, see Restore a database in ApsaraDB for MongoDB.

Before you call this operation, ensure that the following requirements are met:

  • The instance is created after March 26, 2019.
  • The instance is located in China (Qingdao), China (Beijing), China (Zhangjiakou-Beijing Winter Olympics), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore (Singapore). Other regions are not supported.
  • The instance is a replica set instance.
  • The instance version is 3.4 or 4.0.
  • The storage engine of the instance is WiredTiger. RocksDB and TerarkDB are not supported.

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
SourceDBInstance String Yes dds-bpxxxxxxxx

The ID of the source instance.

Action String No DescribeBackupDBs

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

PageNumber Integer No 1

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

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.

RestoreTime String No 2019-08-22T12:00:00Z

The time when the instance is restored. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note
  • Any time within the past seven days is allowed. The time must be earlier than the current time, but later than the time when the database was created.
  • You must specify either this parameter or the BackupId parameter.
BackupId String No 5664xxxx

The backup ID.

Note
  • You can call the DescribeBackups operation to query the backup ID.
  • You must specify either this parameter or the RestoreTime parameter.
AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
Databases

The list of databases.

DBName String mongodbtest

The name of the database.

PageNumber Integer 1

The number of the returned page.

TotalCount Integer 5

The number of databases.

PageSize Integer 30

The number of entries returned per page.

RequestId String 1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455

The ID of the request.

Samples

Sample requests


http(s)://mongodb.aliyuncs.com/? Action=DescribeBackupDBs
&SourceDBInstance=dds-bpxxxxxxxx
&RestoreTime=2019-08-22T12:00:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeBackupDBsResponse>
	  <Databases>
		    <Database>
			      <DBName>admin</DBName>
		    </Database>
		    <Database>
			      <DBName>config</DBName>
		    </Database>
		    <Database>
			      <DBName>mongodbtest</DBName>
		    </Database>
		    <Database>
			      <DBName>db1</DBName>
		    </Database>
		    <Database>
			      <DBName>db2</DBName>
		    </Database>
	  </Databases>
	  <PageNumber>1</PageNumber>
	  <TotalCount>5</TotalCount>
	  <PageSize>30</PageSize>
	  <RequestId>1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455</RequestId>
</DescribeBackupDBsResponse>

JSON format

{
	"PageNumber":1,
	"Databases":{
		"Database":[
			{
				"DBName":"admin"
			},
			{
				"DBName":"config"
			},
			{
				"DBName":"mongodbtest"
			},
			{
				"DBName":"db1"
			},
			{
				"DBName":"db2"
			}
		]
	},
	"TotalCount":5,
	"PageSize":30,
	"RequestId":"1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455"
}

Error codes

HTTP status code Error code Error message Description
403 IncorrectDBInstanceType Current DB instance type does not support this operation. The error message returned because the operation is not supported by the current instance type.

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