Queries the data retention policy for the log backups of a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeLogBackupPolicy |
get |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
You can call the DescribeDBClusters operation to query the information about all clusters in a specific region, including the cluster IDs. |
pc-***************** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| LogBackupRetentionPeriod |
integer |
The retention period of the log backup. Valid values:
Note
|
7 |
| RequestId |
string |
The request ID. |
62EE0051-102B-488D-9C79-D607B8****** |
| LogBackupAnotherRegionRetentionPeriod |
string |
The retention period of the cross-region log backup. Valid values:
Note
|
0 |
| LogBackupAnotherRegionRegion |
string |
The region in which the cross-region log backup is stored. For information about the regions that support cross-region backup, see Overview. Note
If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead. |
cn-beijing |
| EnableBackupLog |
integer |
Indicates whether the log backup feature is enabled. Valid values:
Note
If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead. |
1 |
| AdvancedLogPolicies |
object |
||
| AdvancedLogPolicy |
array<object> |
The details of the advanced log backup policy. Note
|
|
|
object |
|||
| PolicyId |
string |
The ID of the log backup policy. Note
This parameter is returned only for clusters for which the cross-region log backup feature is enabled. |
1c75zkmqczcd1vbf6f6d05*** |
| LogRetentionType |
string |
The retention type for the log backup. Valid values:
|
delay |
| LogRetentionValue |
string |
The number of days to retain log backups. Valid values:
|
7 |
| SrcType |
string |
The source type for the log backup policy. Valid values:
|
level1 |
| DestType |
string |
The destination type for the log backup policy. Valid values:
|
level2 |
| EnableLogBackup |
integer |
Indicates whether the log backup feature is enabled. The return value can be:
|
1 |
| SrcRegion |
string |
The source region of the log backup policy. |
cn-hangzhou |
| DestRegion |
string |
The destination region of the log backup policy. |
cn-shanghai |
Examples
Success response
JSON format
{
"LogBackupRetentionPeriod": 7,
"RequestId": "62EE0051-102B-488D-9C79-D607B8******",
"LogBackupAnotherRegionRetentionPeriod": "0",
"LogBackupAnotherRegionRegion": "cn-beijing",
"EnableBackupLog": 1,
"AdvancedLogPolicies": {
"AdvancedLogPolicy": [
{
"PolicyId": "1c75zkmqczcd1vbf6f6d05***",
"LogRetentionType": "delay",
"LogRetentionValue": "7",
"SrcType": "level1",
"DestType": "level2",
"EnableLogBackup": 1,
"SrcRegion": "cn-hangzhou",
"DestRegion": "cn-shanghai"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.