Queries the automatic backup policy of a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeBackupPolicy |
get |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
Call the DescribeDBClusters operation to query the details of all clusters in a region, including the cluster IDs. |
pc-************* |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PreferredBackupPeriod |
string |
The backup cycle. Valid values:
Note
This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead. |
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday |
| DataLevel1BackupRetentionPeriod |
string |
The retention period of level-1 backups. Valid values: 3 to 14. Unit: days. Note
This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead. |
7 |
| RequestId |
string |
The request ID. |
EADFCE0F-9FB5-4685-B395-1440B****** |
| PreferredBackupTime |
string |
The time range when an automatic backup is performed. The time is in the |
07:00Z-08:00Z |
| BackupRetentionPolicyOnClusterDeletion |
string |
The policy to retain backups when you delete a cluster:
|
NONE |
| PreferredNextBackupTime |
string |
The time of the next backup. The time is in the |
2020-11-16T07:30Z |
| DataLevel2BackupRetentionPeriod |
string |
The retention period of level-2 backups. Valid values:
Note
|
0 |
| BackupFrequency |
string |
The backup frequency. Valid values:
Note
|
Normal |
| DataLevel1BackupFrequency |
string |
The backup frequency. Valid values:
Note
|
Normal |
| DataLevel1BackupPeriod |
string |
The cycle of a level-1 backup. Valid values:
Note
|
Monday,Tuesday |
| DataLevel1BackupTime |
string |
The time range when an automatic backup is performed. The time is in the Note
|
15:00Z-16:00Z |
| DataLevel2BackupPeriod |
string |
The cycle of a level-2 backup. Valid values:
Note
|
Monday,Tuesday |
| DataLevel2BackupAnotherRegionRetentionPeriod |
string |
The retention period of cross-region level-2 backups. Valid values:
Note
|
30 |
| DataLevel2BackupAnotherRegionRegion |
string |
The destination region of the cross-region level-2 backup. For more information about the regions that support cross-region backup, see Overview. Note
This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead. |
cn-hangzhou |
| BackupPolicyLevel |
string |
The level of the backup policy. Valid values:
Note
|
Normal |
| AdvancedPolicyOption |
string |
The advanced backup policy option. Valid values:
Note
|
disable |
| AdvancedDataPolicies |
object |
||
| AdvancedDataPolicy |
array<object> |
The details of the advanced backup policy. Note
|
|
|
object |
|||
| PolicyId |
string |
The ID of the backup policy. |
71930ac2e9f15e41615e10627c****** |
| RetentionType |
string |
The retention period type of the backup set. The return value is:
|
delay |
| RetentionValue |
string |
The number of days to retain the backup. |
7 |
| FilterType |
string |
The filter type for the advanced policy. The return value is:
|
crontab |
| FilterKey |
string |
The scheduling type. The return value is:
Note
This parameter is returned only when FilterType is set to crontab. |
dayOfWeek |
| FilterValue |
string |
The backup cycle. |
1,2,3,4,5,6,7 |
| SrcType |
string |
The source type of the backup policy. The return value is:
|
level1 |
| SrcRegion |
string |
The source region of the backup policy. |
cn-beijing |
| DestType |
string |
The destination type of the backup policy. The return value is:
|
level1 |
| DestRegion |
string |
The destination region of the backup policy. |
cn-hangzhou |
| DumpAction |
string |
The method to convert a level-1 backup to a level-2 backup. The return value is:
|
copy |
| AutoCreated |
boolean |
Indicates whether the backup policy is automatically generated by the system. The return value is:
|
true |
| OnlyPreserveOneEachHour |
boolean |
The hourly backup retention policy. Valid values:
|
true |
| OnlyPreserveOneEachDay |
boolean |
The 24-hour backup retention policy.
|
true |
| BakType |
string |
The backup type. The return value is:
|
F |
Examples
Success response
JSON format
{
"PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
"DataLevel1BackupRetentionPeriod": "7",
"RequestId": "EADFCE0F-9FB5-4685-B395-1440B******",
"PreferredBackupTime": "07:00Z-08:00Z",
"BackupRetentionPolicyOnClusterDeletion": "NONE",
"PreferredNextBackupTime": "2020-11-16T07:30Z",
"DataLevel2BackupRetentionPeriod": "0",
"BackupFrequency": "Normal",
"DataLevel1BackupFrequency": "Normal",
"DataLevel1BackupPeriod": "Monday,Tuesday",
"DataLevel1BackupTime": "15:00Z-16:00Z",
"DataLevel2BackupPeriod": "Monday,Tuesday",
"DataLevel2BackupAnotherRegionRetentionPeriod": "30",
"DataLevel2BackupAnotherRegionRegion": "cn-hangzhou",
"BackupPolicyLevel": "Normal",
"AdvancedPolicyOption": "disable",
"AdvancedDataPolicies": {
"AdvancedDataPolicy": [
{
"PolicyId": "71930ac2e9f15e41615e10627c******\n",
"RetentionType": "delay",
"RetentionValue": "7",
"FilterType": "crontab",
"FilterKey": "dayOfWeek",
"FilterValue": "1,2,3,4,5,6,7",
"SrcType": "level1",
"SrcRegion": "cn-beijing",
"DestType": "level1",
"DestRegion": "cn-hangzhou",
"DumpAction": "copy",
"AutoCreated": true,
"OnlyPreserveOneEachHour": true,
"OnlyPreserveOneEachDay": true,
"BakType": "F"
}
]
}
}
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.