All Products
Search
Document Center

PolarDB:DescribeDetachedBackups

Last Updated:Jun 17, 2024

Queries the information about the backup sets in a released PolarDB cluster.

Operation description

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.

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
polardb:DescribeDetachedBackupsRead
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:DBCluster/{#DbClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

pc-****************
BackupIdstringNo

The ID of the backup set.

111111111
BackupStatusstringNo

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupModestringNo

The backup mode. Valid values:

  • Automated
  • Manual
Manual
BackupRegionstringNo

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

Note This parameter is valid only for PolarDB for MySQL clusters.
cn-hangzhou
StartTimestringYes

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

2020-05-01T00:00Z
EndTimestringYes

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.

2020-05-14T00:00Z
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

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 parameters

ParameterTypeDescriptionExample
object
TotalRecordCountstring

The total number of returned entries.

50
PageRecordCountstring

The number of entries per page.

15
RequestIdstring

The ID of the request.

717B2382-BB14-4DCB-BBC2-32DBE0******
PageNumberstring

The page number.

1
Itemsobject []

Details about the backup sets.

BackupSetSizestring

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.
7251056
ConsistentTimestring

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

1589253947
StoreStatusstring

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
BackupStatusstring

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupTypestring

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

FullBackup
BackupStartTimestring

The start time of the backup task. The time is displayed in UTC.

2020-05-12T03:25:44Z
IsAvailstring

Indicates whether the backup set is available. Valid values:

  • 0: The data backup set is unavailable.
  • 1: The data backup set is available.
1
BackupEndTimestring

The end time of the backup task. The time is displayed in UTC.

2020-05-12T03:25:55Z
BackupIdstring

The ID of the backup set.

111111111
DBClusterIdstring

The ID of the cluster.

pc-**************
BackupsLevelstring

The level of the backup set. Valid values:

  • Level-1: level-1 backup set
  • Level-2: level-2 backup set
Level-2
BackupModestring

The backup mode. Valid values:

  • Automated
  • Manual
Manual
BackupMethodstring

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

Snapshot

Examples

Sample success responses

JSONformat

{
  "TotalRecordCount": "50",
  "PageRecordCount": "15",
  "RequestId": "717B2382-BB14-4DCB-BBC2-32DBE0******",
  "PageNumber": "1",
  "Items": {
    "Backup": [
      {
        "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

HTTP status codeError codeError messageDescription
400InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId parameter is invalid.
400InvalidBackupStatus.MalformedThe specified parameter BackupStatus is not valid.The specified BackupStatus parameter is invalid.
400InvalidBackupMode.MalformedThe specified parameter BackupMode is not valid.The specified BackupMode parameter is invalid.
400InvalidStartTime.MalformedThe specified parameter StartTime is not valid.The specified StartTime parameter is invalid.
400InvalidEndTime.MalformedThe specified parameter EndTime is not valid.The specified EndTime parameter is invalid.
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
404InvalidDBClusterId.NotFoundThe DBInstanceId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

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

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404
2023-06-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 400
2022-06-01The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: BackupRegion