Modifies the retention policy of log backups for a 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 Yes ModifyLogBackupPolicy

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

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

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query information about all PolarDB clusters that are deployed within a specified region. The returned information includes the ID of each cluster.
LogBackupRetentionPeriod String No 3

The retention period of the log backups. Valid values:

  • 3 to 7300: The log backups are retained for 3 to 7,300 days.
  • -1: The log backups are retained indefinitely.
LogBackupAnotherRegionRegion String No cn-hangzhou

The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.

LogBackupAnotherRegionRetentionPeriod String No 30

The retention period of cross-region log backups. Default value: OFF. Valid values:

  • 0: The cross-region backup feature is disabled.
  • 30 to 7300: Cross-region log backups are retained for 30 to 7,300 days.
  • -1: The log backups are retained indefinitely.
Note When you create a cluster, the default value of this parameter is 0.

Response parameters

Parameter Type Example Description
RequestId String 345174B4-FAB3-412E-A326-BEDDA9******

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

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

<ModifyLogBackupPolicyResponse>
    <RequestId>345174B4-FAB3-412E-A326-BEDDA9******</RequestId>
</ModifyLogBackupPolicyResponse>

JSON format

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

{
  "RequestId" : "345174B4-FAB3-412E-A326-BEDDA9******"
}

Error codes

HTTP status code Error code Error message Description
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.