All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeBackupDBs

Last Updated:Jan 17, 2023

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

Operation Description

Precautions

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

Before you call this operation, make sure that the ApsaraDB for MongoDB 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 (Singapore) region. Other regions are not supported.
  • The instance is a replica set instance.
  • The version of the database engine is 3.4, 4.0, or 4.2.
  • The storage engine of the instance is WiredTiger.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operate access level Resource type conditional keyword Association operation
dds:DescribeBackupDBs READ
  • MongoDB
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbInstanceId}
    without
without

Request parameters

Parameter Type Required Description Example
PageNumber integer No

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

1
PageSize integer No

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

30
SourceDBInstance string Yes

The ID of the source instance.

dds-bp2286****
RestoreTime string No

The point in time to which the instance is restored. Specify the time 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 past 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
    BackupId string No

    The ID of the backup set.

    Note
  • You can call the DescribeBackups operation to query the backup ID.
  • You must specify one of the RestoreTime and BackupId parameters.
  • 5664****
    ResourceGroupId string No

    The ID of the resource group.

    rg-ax68****

    Response parameters

    Parameter Type Description Example
    object
    TotalCount integer

    The number of returned databases.

    5
    Databases array

    Details about the databases.

    object
    DBName string

    The name of the database.

    mongodbtest
    RequestId string

    The ID of the request.

    1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455
    PageSize integer

    The number of entries returned per page.

    30
    PageNumber integer

    The page number of the returned page.

    1

    Example

    Normal return example

    JSONFormat

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

    Error codes

    Http code Error code Error message
    400 InvalidMeta.WrongFormat Meta information is wrong formatter.
    400 InvalidRestoreTime.Format Specified restore time is not valid.
    403 InvalidDBName The specified database name is not allowed.
    403 InvalidMeta.TooLarge Meta information is too large.
    403 SingleDBRestore.BackupSetNotSupport This backup set do not support this operation.
    403 IncorrectDBInstanceType Current DB instance type does not support this operation.
    403 IncorrectEngineVersion Current engine version does not support operations.
    403 InvalidBackupLogStatus Current backup log enable status does not support this operation.
    403 IncorrectBackupSetState Current backup set state does not support operations..
    404 InvalidBackupSetID.NotFound Specifiedbackup set ID does not exist.
    404 InvalidBackup.NotFound Theavailable backup does not exist in recovery time.

    For a list of error codes, visit the API error center.