All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeClusterBackups

更新時間:Nov 06, 2024

Queries the backup sets of an ApsaraDB for MongoDB sharded cluster instance that uses cloud disks.

Operation description

For a sharded cluster instance that is created before October 19, 2023 and uses cloud disks, you must call the TransferClusterBackup operation to switch the instance from the shard backup mode to the cluster backup mode before you call the DescribeClusterBackups operation.

By default, cloud disk-based sharded cluster instances that are created after October 19, 2023 are in the cluster backup mode.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:DescribeClusterBackupsget
  • Instance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

dds-bp16cb162771****
BackupIdstringNo

The ID of the cluster backup set.

5664****
PageNointegerNo

The page number. Default value: 1. The page number must be a positive integer.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values:

  • 30 (default)
  • 50
  • 100
30
StartTimestringNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2019-03-13T12:11:14Z
EndTimestringNo

The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The end time must be later than the start time.

2019-03-14T13:10Z
IsOnlyGetClusterBackUpbooleanNo

Specifies whether to query information about child nodes in the cluster backup. Valid values:

  • true: The system returns only the basic information of the cluster backup.
  • false (default): The system returns the backup information of all child nodes.
true
SrcRegionstringNo

The region ID of the instance.

Note
  • This parameter is required if you want to query the backup sets of a released instance.

  • This parameter is required if you want to query cross-region backups.

cn-hangzhou
DestRegionstringNo

The region where cross-region backups reside.

Note This parameter is required if you want to query cross-region backups.
cn-shanghai

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

2F42BB4E-461F-5B55-A37C-53B1141C****
MaxResultsinteger

The maximum number of entries returned.

10
PageNumberinteger

The page number of the page returned.

1
PageSizeinteger

The number of entries to return on each page.

30
ClusterBackupsarray<object>

The cluster backup sets. A cluster backup file contains the backup sets of each node.

clusterBackupobject
IsAvailinteger

Indicates whether the cluster backup sets take effect. Valid values:

  • 1: The cluster backup sets take effect.
  • 0: The backup sets of child nodes are incomplete or fail.
1
ClusterBackupIdstring

The backup set ID.

cb-o8c2ugnxo26kx***
ClusterBackupStatusstring

The status of the cluster backup set.

OK
ClusterBackupStartTimestring

The beginning of the time range within which the cluster backup is performed.

2023-10-16T19:33:20Z
ClusterBackupSizestring

The size of the cluster backup set. Unit: bytes.

107374182400
ClusterBackupEndTimestring

The end of the time range within which the cluster backup is performed.

2023-10-16T19:33:20Z
ClusterBackupModestring

The cluster backup mode.

Automated
ExtraInfoobject

The additional information in the JSON format.

RegistryFromHistorystring

Indicates whether the cluster backups are migrated from the historical backup sets. If the value of this parameter is 1, the cluster backups are migrated from the historical backup sets.

1
Backupsarray<object>

The collection of the backup sets of each child node in a cluster backup set.

backupobject
BackupIdstring

The ID of the backup set.

738025367
InstanceNamestring

The shard name.

d-bp16cb162771****
BackupDownloadURLstring

The URL that is used to download the backup set over the Internet. If the backup set cannot be downloaded, an empty string is returned.

http://oss.com/xxx
BackupIntranetDownloadURLstring

The URL that is used to download the backup set over an internal network. If the backup set cannot be downloaded, null is returned.

http://oss.com/xxx
BackupStartTimestring

The start time of the backup. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-10-16T19:33:20Z
BackupEndTimestring

The end time of the backup. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-10-16T19:33:20Z
BackupSizestring

The size of the backup file. Unit: bytes.

77544597650
IsAvailstring

Indicates whether the backup set is available. Valid values:

  • 0: unavailable
  • 1: available
1
BackupStatusstring

The status of the backup task. Valid values:

  • Success: The backup task is successful.
  • Failed: The backup task failed.
Success
BackupNamestring

The backup name.

12345678.tar.gz
ExtraInfoobject

The information of the node associated with the backup.

NodeIdstring

The node ID.

d-2ze75ab1fa5d****
StorageSizestring

The storage capacity of the node. Unit: MB.

20480
InstanceClassstring

The instance type of the node.

mdb.shard.4x.large.d
NodeTypestring

The node type.

db
Progressstring

The progress of the backup task. Unit: %. The progress is returned only for running backup tasks.

50
AttachLogStatusstring

The backup status. Valid values:

  • init: The backup is being initialized.
  • No_Need: Log backup is not performed.
  • Running: Log backup is being performed.
  • Ready: Log backup is complete.
  • Failed: Log backup failed.
Note If the ClusterBackupStatus parameter is set to OK, full backup is successful. If you want to perform point-in-time-restoration on an instance for which log backup is enabled or to implement consistency restoration, make sure that log backup is complete.
Ready
EngineVersionstring

Version of the backuped instance.

  • 6.0
  • 5.0
  • 4.4
  • 4.2
  • 4.0
  • 3.4
4.2

Examples

Sample success responses

JSONformat

{
  "RequestId": "2F42BB4E-461F-5B55-A37C-53B1141C****",
  "MaxResults": 10,
  "PageNumber": 1,
  "PageSize": 30,
  "ClusterBackups": [
    {
      "IsAvail": 1,
      "ClusterBackupId": "cb-o8c2ugnxo26kx***",
      "ClusterBackupStatus": "OK",
      "ClusterBackupStartTime": "2023-10-16T19:33:20Z",
      "ClusterBackupSize": "107374182400",
      "ClusterBackupEndTime": "2023-10-16T19:33:20Z",
      "ClusterBackupMode": "Automated",
      "ExtraInfo": {
        "RegistryFromHistory": "1"
      },
      "Backups": [
        {
          "BackupId": "738025367",
          "InstanceName": "d-bp16cb162771****\n",
          "BackupDownloadURL": "http://oss.com/xxx",
          "BackupIntranetDownloadURL": "http://oss.com/xxx",
          "BackupStartTime": "2023-10-16T19:33:20Z",
          "BackupEndTime": "2023-10-16T19:33:20Z",
          "BackupSize": "77544597650",
          "IsAvail": "1",
          "BackupStatus": "Success",
          "BackupName": "12345678.tar.gz",
          "ExtraInfo": {
            "NodeId": "d-2ze75ab1fa5d****",
            "StorageSize": "20480",
            "InstanceClass": "mdb.shard.4x.large.d",
            "NodeType": "db"
          }
        }
      ],
      "Progress": "50",
      "AttachLogStatus": "Ready",
      "EngineVersion": "4.2"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400InvalidStartTime.MalformedThe Specified parameter StartTime is not valid.
400InvalidEndTime.MalformedThe Specified parameter EndTime is not valid.
400InvalidStartTimeAndEndTime.MalformedThe Specified parameter StartTime or EndTime is not valid.
400InvalidPageSize.MalformedThe specified parameter PageSize is not valid.

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

Change history

Change timeSummary of changesOperation
2024-10-29The Error code has changed. The response structure of the API has changedView Change Details
2024-05-17API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details