Queries the backup set details of an PolarDB cluster that has been released.

Before you call this operation, make sure that the PolarDB cluster is in the Released state. You must also confirm that the Retain All Backups Permanently or Retain Last Automatic Backup Permanently backup retention policy takes effect after you release the cluster. If you delete all backup sets after the cluster is released, you cannot use this API operation to query the cluster.

Note You can call the DescribeDBClusterAttribute operation to query the cluster status.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDetachedBackups

The operation that you want to perform. Set the value to DescribeDetachedBackups.

DBClusterId String Yes pc-****************

The ID of the cluster.

BackupId String No 111111111

The ID of the backup set.

BackupStatus String No Success

The status of the backup set. Valid values:

  • Success
  • Failed
BackupMode String No Manual

The backup mode. Valid values:

  • Automated
  • Manual
BackupRegion String No cn-hangzhou

The region where the cross-region data backup file of the instance is stored.

Note This parameter is supported by only PolarDB for MySQL clusters.
StartTime String Yes 2020-05-01T00:00Z

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

EndTime String Yes 2020-05-14T00:00Z

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.

PageSize Integer No 30

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

  • 30
  • 50
  • 100

Default value: 30.

PageNumber Integer No 1

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

Response parameters

Parameter Type Example Description
TotalRecordCount String 50

The total number of entries returned.

PageRecordCount String 15

The number of entries returned per page.

RequestId String 717B2382-BB14-4DCB-BBC2-32DBE0******

The ID of the request.

PageNumber String 1

The page number of the returned page.

Items Array of Backup

Details about backup sets.

Backup
BackupSetSize String 7251056

The size of the backup set. Unit: bytes.

Note After you delete the target snapshot backups, the storage space consumed by the backups is released. The released storage space is smaller than the size of the backup file, because the snapshots share certain data blocks.
ConsistentTime String 1589253947

The snapshot checkpoint time. The value is a Unix timestamp.

StoreStatus String Disabled

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

  • Enabled: The backup set can be deleted.
  • Disabled: The backup set cannot be deleted.
BackupStatus String Success

The status of the backup set. Valid values:

  • Success
  • Failed
BackupType String FullBackup

The type of the backup. Only full backups are supported. Set the value to FullBackup.

BackupStartTime String 2020-05-12T03:25:44Z

The time when this backup task started. The time is displayed in UTC.

IsAvail String 1

Indicates whether the backup set is available. Valid values:

  • 0: The data backup set is unavailable.
  • 1: The data backup set is available.
BackupEndTime String 2020-05-12T03:25:55Z

The time when this backup task ended. The time is displayed in UTC.

BackupId String 111111111

The ID of the backup set.

DBClusterId String pc-**************

The ID of the cluster.

BackupsLevel String Level-2

The level of the backup set. Valid values:

  • Level-1: level-1 backup set
  • Level-2: level-2 backup set
BackupMode String Manual

The backup mode. Valid values:

  • Automated
  • Manual
BackupMethod String Snapshot

The backup method. Only snapshot backups are supported. The value is set to Snapshot.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeDetachedBackups
&DBClusterId=pc-****************
&BackupId=111111111
&BackupStatus=Success
&BackupMode=Manual
&BackupRegion=cn-hangzhou
&StartTime=2020-05-01T00:00Z
&EndTime=2020-05-14T00:00Z
&PageSize=30
&PageNumber=1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDetachedBackupsResponse>
    <TotalRecordCount>50</TotalRecordCount>
    <PageRecordCount>15</PageRecordCount>
    <RequestId>717B2382-BB14-4DCB-BBC2-32DBE0******</RequestId>
    <PageNumber>1</PageNumber>
    <Items>
        <BackupSetSize>7251056</BackupSetSize>
        <ConsistentTime>1589253947</ConsistentTime>
        <StoreStatus>Disabled</StoreStatus>
        <BackupStatus>Success</BackupStatus>
        <BackupType>FullBackup</BackupType>
        <BackupStartTime>2020-05-12T03:25:44Z</BackupStartTime>
        <IsAvail>1</IsAvail>
        <BackupEndTime>2020-05-12T03:25:55Z</BackupEndTime>
        <BackupId>111111111</BackupId>
        <DBClusterId>pc-**************</DBClusterId>
        <BackupsLevel>Level-2</BackupsLevel>
        <BackupMode>Manual</BackupMode>
        <BackupMethod>Snapshot</BackupMethod>
    </Items>
</DescribeDetachedBackupsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalRecordCount" : "50",
  "PageRecordCount" : "15",
  "RequestId" : "717B2382-BB14-4DCB-BBC2-32DBE0******",
  "PageNumber" : "1",
  "Items" : [ {
    "BackupSetSize" : "7251056",
    "ConsistentTime" : "1589253947",
    "StoreStatus" : "Disabled",
    "BackupStatus" : "Success",
    "BackupType" : "FullBackup",
    "BackupStartTime" : "2020-05-12T03:25:44Z",
    "IsAvail" : "1",
    "BackupEndTime" : "2020-05-12T03:25:55Z",
    "BackupId" : "111111111",
    "DBClusterId" : "pc-**************",
    "BackupsLevel" : "Level-2",
    "BackupMode" : "Manual",
    "BackupMethod" : "Snapshot"
  } ]
}

Error codes

HttpCode Error code Error message Description
400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid. The error message returned because the specified DBClusterId parameter is invalid.
400 InvalidBackupStatus.Malformed The specified parameter BackupStatus is not valid. The error message returned because the specified BackupStatus parameter is invalid.
400 InvalidBackupMode.Malformed The specified parameter BackupMode is not valid. The error message returned because the specified BackupMode parameter is invalid.
400 InvalidStartTime.Malformed The specified parameter StartTime is not valid. The error message returned because the specified StartTime parameter is invalid.
400 InvalidEndTime.Malformed The specified parameter EndTime is not valid. The error message returned because the specified EndTime parameter is invalid.
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist.

For a list of error codes, visit the API Error Center.