Modifies 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 ModifyBackupPolicy

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

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

The ID of the cluster.

PreferredBackupPeriod String Yes Monday,Tuesday

The backup cycle. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note Select at least two values. Separate multiple values with commas (,).
PreferredBackupTime String Yes 15:00Z-16:00Z

The time range during which the automatic backup is performed. Specify the time range in the hh:mmZ-hh:mmZ format. The start time and end time must be on the hour and the duration of the time range must be 1 hour, for example, 14:00Z-15:00Z. The start time and the end time must be in UTC.

DataLevel1BackupRetentionPeriod String No 7

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

DataLevel2BackupRetentionPeriod String No 0

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.
BackupRetentionPolicyOnClusterDeletion String No 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.

Response parameters

Parameter Type Example Description
RequestId String C5A5DF0E-5968-4DC1-882E-AC2FE7******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=ModifyBackupPolicy
&DBClusterId=pc-*************
&PreferredBackupPeriod=Monday,Tuesday
&PreferredBackupTime=15:00Z-16:00Z
&<Common request parameters>

Sample success responses

XML format

<RequestId>C5A5DF0E-5968-4DC1-882E-AC2FE7******</RequestId>

JSON format

{
    "RequestId":"C5A5DF0E-5968-4DC1-882E-AC2FE7******"
}

Error codes

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