Queries the automatic backup policy of an Apsara PolarDB cluster.

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 No DescribeBackupPolicy

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

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

The ID of the cluster.

Response parameters

Parameter Type Example Description
BackupRetentionPeriod Integer 7

The retention period of the data backups.

Note This parameter has expired. To view the retention periods for level-1 and level-2 backups, check the values of the DataLevel1BackupRetentionPeriod and DataLevel2BackupRetentionPeriod parameters, respectively.
BackupRetentionPolicyOnClusterDeletion String NONE

The retention policy for the backup sets. The retention policy takes effect after you delete the cluster. Valid values:

  • ALL: All backups are permanently retained.
  • LATEST: The latest backup is permanently retained. A backup for the cluster is automatically created before the cluster is deleted.
  • NONE: No backup sets are retained after the cluster is deleted.
    Note The default value is NONE after you create a cluster. The default value NONE indicates that no backup sets are retained after the cluster is deleted.
DataLevel1BackupRetentionPeriod String 7

The retention period for the level-1 backups. Valid values: 7 to 14. Unit: days.

DataLevel2BackupRetentionPeriod String 7300

The retention period for the level-2 backups. Valid values:

  • 0: The level-2 backup feature is disabled.
  • 30 to 7300: The level-2 backups are retained for 30 to 7,300 days.
  • -1: The level-2 backups are permanently retained.
    Note The default value is 0 after you create a cluster. The default value 0 indicates that the level-2 backup feature is disabled.
PreferredBackupPeriod String Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday

The backup cycle. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
PreferredBackupTime String 22:00Z-23:00Z

The time range during which the automatic backup was performed. The start time and the end time of the time range is displayed in UTC.

PreferredNextBackupTime String 2020-05-13T22:56Z

The time for the next backup. The time is displayed in UTC.

RequestId String EADFCE0F-9FB5-4685-B395-1440B******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=DescribeBackupPolicy
&DBClusterId=pc-*************
&<Common request parameters>

Sample success responses

XML format

<PreferredBackupPeriod>Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</PreferredBackupPeriod>
<DataLevel1BackupRetentionPeriod>7</DataLevel1BackupRetentionPeriod>
<RequestId>EADFCE0F-9FB5-4685-B395-1440B******</RequestId>
<PreferredBackupTime>22:00Z-23:00Z</PreferredBackupTime>
<BackupRetentionPolicyOnClusterDeletion>NONE</BackupRetentionPolicyOnClusterDeletion>
<BackupRetentionPeriod>7</BackupRetentionPeriod>
<PreferredNextBackupTime>2020-05-13T22:56Z</PreferredNextBackupTime>
<DataLevel2BackupRetentionPeriod>7300</DataLevel2BackupRetentionPeriod>

JSON format

{
    "PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
    "DataLevel1BackupRetentionPeriod": 7,
    "RequestId": "EADFCE0F-9FB5-4685-B395-1440B******",
    "PreferredBackupTime": "22:00Z-23:00Z",
    "BackupRetentionPolicyOnClusterDeletion": "NONE",
    "BackupRetentionPeriod": 7,
    "PreferredNextBackupTime": "2020-05-13T22:56Z",
    "DataLevel2BackupRetentionPeriod": 7300
}

Error codes

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