All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeBackupDBs

Last Updated:Apr 01, 2024

Queries the databases at a specified time or the databases in a specified backup set before you restore a database for an ApsaraDB for MongoDB instance.

Operation description

You can call the CreateDBInstance operation to restore a database for an ApsaraDB for MongoDB instance. For more information, see Restore one database of an ApsaraDB for MongoDB instance.

Before you call this operation, make sure that the instance meets the following requirements:

  • The instance was created after March 26, 2019.
  • The instance is located in the China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore region. Other regions are not supported.
  • The instance is a replica set instance.
  • The instance runs MongoDB 3.4, MongoDB 4.0, or MongoDB 4.2. In addition, the instance uses local disks to store data.
  • The storage engine of the instance is WiredTiger.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeBackupDBsREAD
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The page number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

1
PageSizeintegerNo

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

30
SourceDBInstancestringYes

The ID of the source instance.

dds-bp2286****
RestoreTimestringNo

The point in time to which the instance is restored. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note
  • The time can be a point in time within the previous seven days. The time must be earlier than the current time, but later than the time when the instance was created.

  • You must specify one of the RestoreTime and BackupId parameters.

2019-08-22T12:00:00Z
BackupIdstringNo

The backup ID.

Note
  • You can call the DescribeBackups operation to query the backup ID.

  • You must specify one of the RestoreTime and BackupId parameters.

5664****
ResourceGroupIdstringNo

The ID of the resource group.

rg-ax68****

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The number of returned databases.

5
Databasesobject []

The details of the databases.

DBNamestring

The name of the database.

mongodbtest
RequestIdstring

The request ID.

1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455
PageSizeinteger

The number of entries returned per page.

30
PageNumberinteger

The page number of the page returned.

1

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidMeta.WrongFormatMeta information is wrong formatter.-
400InvalidRestoreTime.FormatSpecified restore time is not valid.The specified RestoreTime value is invalid.
403InvalidDBNameThe specified database name is not allowed.The specified database name is invalid.
403InvalidMeta.TooLargeMeta information is too large.The metadata is too large.
403SingleDBRestore.BackupSetNotSupportThis backup set do not support this operation.Single-database recovery is not supported for the specified time point or backup file.
403IncorrectDBInstanceTypeCurrent DB instance type does not support this operation.This operation is not supported for the specified instance type.
403IncorrectEngineVersionCurrent engine version does not support operations.-
403InvalidBackupLogStatusCurrent backup log enable status does not support this operation.The operation is not supported when log backup is enabled.
403IncorrectBackupSetStateCurrent backup set state does not support operations..-
404InvalidBackupSetID.NotFoundSpecifiedbackup set ID does not exist.-
404InvalidBackup.NotFoundTheavailable backup does not exist in recovery time.No backup set is available during the specified recovery period.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history