Queries the retention policy of log backups in 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 No DescribeLogBackupPolicy

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

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

The ID of the cluster.

Response parameters

Parameter Type Example Description
EnableBackupLog Integer 1

Indicates whether the log backup feature was enabled. Valid values:

  • 0: disabled.
  • 1: enabled. By default, the log backup feature is enabled and cannot be disabled.
LogBackupRetentionPeriod Integer 7

The retention period of the logs. Valid values:

  • 7 to 7300: The logs are retained for 7 to 7,300 days.
  • -1: The logs are permanently retained.
RequestId String 62EE0051-102B-488D-9C79-D607B8******

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeLogBackupPolicyResponse>
  <LogBackupRetentionPeriod>7</LogBackupRetentionPeriod>
  <RequestId>62EE0051-102B-488D-9C79-D607B8******</RequestId>
  <EnableBackupLog>1</EnableBackupLog>
</DescribeLogBackupPolicyResponse>

JSON format

{
    "LogBackupRetentionPeriod": 7,
    "RequestId": "62EE0051-102B-488D-9C79-D607B8******",
    "EnableBackupLog": 1
}

Error codes

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