You can call this operation to modify the backup policy of an AnalyticDB for MySQL cluster.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyBackupPolicy

The operation that you want to perform. Set this parameter to ModifyBackupPolicy.

DBClusterId String Yes am-bp1xxxxxxxx47

The ID of the cluster.

PreferredBackupPeriod String Yes Monday,Wednesday,Friday,Sunday

The cycle of the full backup. Separate multiple days with commas (,). Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note To ensure data security, we recommend that you select at least two days.
PreferredBackupTime String Yes 00:00Z-01:00Z

The start time of the full backup. Specify the time in the HH:mmZ-HH:mmZ format. The time must be in UTC.

Note The maximum period is 1 hour.
BackupRetentionPeriod String No 30

The number of days for which to retain full backup files. Valid values: 7 to 730. Default value: 7.

EnableBackupLog String No enable

Specifies whether to enable real-time log backup. Valid values:

  • Enable
  • Disable
    Note Default value: Enable.
LogBackupRetentionPeriod Integer No 30

The number of days for which to retain log backup files. Valid values: 7 to 730. Default value: 7.

Response parameters

Parameter Type Example Description
RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

Examples

Sample requests

http(s)://[Endpoint]/? Action=ModifyBackupPolicy
&DBClusterId=am-bp1xxxxxxxx47
&PreferredBackupPeriod=Monday,Wednesday,Friday,Sunday
&PreferredBackupTime=00:00Z-01:00Z
&<Common request parameters>

Sample success responses

XML format

<RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>

JSON format

{
    "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF"
}

Error codes

HttpCode Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId parameter does not exist. Check whether you specify the DBClusterId parameter correctly.

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