Queries the details of backup sets in a released PolarDB cluster.
Operation description
When you invoke this operation, the PolarDB cluster must be in the Released state, and one of the following backup retention options must have been selected when the cluster was released: Long-term Retention (LTR) of All Backups or Long-term Retention (LTR) of the Last Backup (Automatic Backup Before Deletion). If all retained backup sets of a released cluster have been manually deleted, this operation can no longer query the cluster.
You can invoke the DescribeDBClusterAttribute operation to query the cluster status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeDetachedBackups |
get |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. |
pc-**************** |
| BackupId |
string |
No |
The backup ID. |
111111111 |
| BackupStatus |
string |
No |
The backup status. Valid values:
|
Success |
| BackupMode |
string |
No |
The backup mode. Valid values:
|
Manual |
| BackupRegion |
string |
No |
The destination region for cross-region backups. Note
Only PolarDB for MySQL supports this parameter. |
cn-hangzhou |
| StartTime |
string |
Yes |
The beginning of the time range to query. Specify the time in the |
2020-05-01T00:00Z |
| EndTime |
string |
Yes |
The end of the time range to query. The end time must be later than the start time. Specify the time in the |
2020-05-14T00:00Z |
| PageSize |
integer |
No |
The number of entries per page. Valid values:
Default value: 30. |
30 |
| PageNumber |
integer |
No |
The page number. The value must be a positive integer that does not exceed the maximum value of the Integer data type. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Items |
object |
||
| Backup |
array<object> |
The details of the backup set. |
|
|
object |
|||
| BackupEndTime |
string |
The end time of the backup (UTC). |
2020-05-12T03:25:55Z |
| BackupId |
string |
The backup ID. |
111111111 |
| BackupMethod |
string |
The data backup method. Only snapshot backups are supported. The value is fixed as Snapshot. |
Snapshot |
| BackupMode |
string |
The backup mode. Valid values:
|
Manual |
| BackupSetSize |
string |
The size of the backup file. Unit: bytes. Note
Because snapshots share data blocks, the space released after you delete a snapshot backup is much smaller than the size of the backup file. |
7251056 |
| BackupStartTime |
string |
The start time of the backup (UTC). |
2020-05-12T03:25:44Z |
| BackupStatus |
string |
The backup status. Valid values:
|
Success |
| BackupType |
string |
The backup type. Only full backups are supported. The value is fixed as FullBackup. |
FullBackup |
| BackupsLevel |
string |
The level of the backup set. Valid values:
|
Level-2 |
| ConsistentTime |
string |
The point in time of the consistent snapshot. The value is a UNIX timestamp. Unit: seconds. |
1589253947 |
| DBClusterId |
string |
The cluster ID. |
pc-************** |
| IsAvail |
string |
Indicates whether the backup set is available. Valid values:
|
1 |
| StoreStatus |
string |
Indicates whether the backup set can be deleted. Valid values:
|
Disabled |
| PageNumber |
string |
The page number. |
1 |
| PageRecordCount |
string |
The number of entries on the current page. |
15 |
| RequestId |
string |
The request ID. |
717B2382-BB14-4DCB-BBC2-32DBE0****** |
| TotalRecordCount |
string |
The total number of entries. |
50 |
Examples
Success response
JSON format
{
"Items": {
"Backup": [
{
"BackupEndTime": "2020-05-12T03:25:55Z",
"BackupId": "111111111",
"BackupMethod": "Snapshot",
"BackupMode": "Manual",
"BackupSetSize": "7251056",
"BackupStartTime": "2020-05-12T03:25:44Z",
"BackupStatus": "Success",
"BackupType": "FullBackup",
"BackupsLevel": "Level-2",
"ConsistentTime": "1589253947",
"DBClusterId": "pc-**************",
"IsAvail": "1",
"StoreStatus": "Disabled"
}
]
},
"PageNumber": "1",
"PageRecordCount": "15",
"RequestId": "717B2382-BB14-4DCB-BBC2-32DBE0******",
"TotalRecordCount": "50"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 400 | InvalidBackupStatus.Malformed | The specified parameter BackupStatus is not valid. | The specified BackupStatus parameter is invalid. |
| 400 | InvalidBackupMode.Malformed | The specified parameter BackupMode is not valid. | The specified BackupMode parameter is invalid. |
| 400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | The specified StartTime parameter is invalid. |
| 400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | The specified EndTime parameter is invalid. |
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | The specified PageSize parameter is invalid. |
| 400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | The specified PageNumber parameter is invalid. |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The specified DBClusterId parameter is invalid. |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.