All Products
Search
Document Center

PolarDB:DescribeDetachedBackups

Last Updated:Sep 09, 2026

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.

Note

You can invoke the DescribeDBClusterAttribute operation to query the cluster status.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeDetachedBackups

get

*dbcluster

acs:polardb:{#regionId}:{#accountId}:DBCluster/{#DbClusterId}

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: The backup is complete.

  • Failed: The backup failed.

Success

BackupMode

string

No

The backup mode. Valid values:

  • Automated: automatic backup.

  • Manual: manual backup.

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 YYYY-MM-DDThh:mmZ format (UTC).

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 YYYY-MM-DDThh:mmZ format (UTC).

2020-05-14T00:00Z

PageSize

integer

No

The number of entries per page. Valid values:

  • 30

  • 50

  • 100

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:

  • Automated: automatic backup.

  • Manual: manual backup.

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: The backup is complete.

  • Failed: The backup failed.

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-1: level-1 backup.

  • Level-2: level-2 backup.

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:

  • 0: unavailable.

  • 1: available.

1

StoreStatus

string

Indicates whether the backup set can be deleted. Valid values:

  • Enabled: The backup set can be deleted.

  • Disabled: The backup set cannot be deleted.

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.