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
You can call the DescribeDBClusters operation to query the information about all clusters in a specified region, including cluster IDs. |
pc-************* |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| AdvancedDataPolicies |
object |
||
| AdvancedDataPolicy |
array<object> |
The details of the advanced backup policy. Note
|
|
|
object |
|||
| AutoCreated |
boolean |
Indicates whether the backup policy is automatically generated by the system. Valid values:
|
true |
| BakType |
string |
The backup type. Valid values:
|
F |
| DestRegion |
string |
The destination region of the backup policy. |
cn-hangzhou |
| DestType |
string |
The destination type of the backup policy. Valid values:
|
level1 |
| DumpAction |
string |
The method used to convert a level-1 backup to a level-2 backup. Valid values:
|
copy |
| FilterKey |
string |
The scheduling type. Valid values:
Note
This parameter is returned only when FilterType is set to crontab. |
dayOfWeek |
| FilterType |
string |
The filter type of the advanced policy. Valid values:
|
crontab |
| FilterValue |
string |
The backup cycle. |
1,2,3,4,5,6,7 |
| OnlyPreserveOneEachDay |
boolean |
The 24-hour backup data retention policy. Valid values:
|
true |
| OnlyPreserveOneEachHour |
boolean |
The hourly backup data retention policy. Valid values:
|
true |
| PolicyId |
string |
The backup policy ID. |
71930ac2e9f15e41615e10627c****** |
| RetentionType |
string |
The retention type of the backup set. Valid values:
|
delay |
| RetentionValue |
string |
The number of days for which backups are retained. |
7 |
| SrcRegion |
string |
The source region of the backup policy. |
cn-beijing |
| SrcType |
string |
The source type of the backup policy. Valid values:
|
level1 |
| StorageClass |
string |
||
| AdvancedPolicyOption |
string |
The advanced backup policy option. Valid values:
Note
|
disable |
| BackupFrequency |
string |
The backup frequency. Valid values:
Note
|
Normal |
| BackupPolicyLevel |
string |
The current backup policy level. Valid values:
Note
|
Normal |
| BackupRetentionPolicyOnClusterDeletion |
string |
Specifies whether to retain backups when the cluster is deleted. Valid values:
|
NONE |
| DataLevel1BackupFrequency |
string |
The backup frequency. Valid values:
Note
|
Normal |
| DataLevel1BackupPeriod |
string |
The level-1 backup cycle. Valid values:
Note
|
Monday,Tuesday |
| DataLevel1BackupRetentionPeriod |
string |
The retention period of level-1 backups. Valid values: 3 to 14. Unit: days. Note
After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter. |
7 |
| DataLevel1BackupTime |
string |
The time period during which automatic backups are performed. The value is in the Note
|
15:00Z-16:00Z |
| DataLevel2BackupAnotherRegionRegion |
string |
The cross-region backup region for level-2 backups. For the regions that support cross-region backup, see Overview. Note
After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter. |
cn-hangzhou |
| DataLevel2BackupAnotherRegionRetentionPeriod |
string |
The retention epoch of cross-region backups for level-2 backups. Valid values:
Note
|
30 |
| DataLevel2BackupPeriod |
string |
The level-2 backup cycle. Valid values:
Note
|
Monday,Tuesday |
| DataLevel2BackupRetentionPeriod |
string |
The retention epoch of level-2 backups. Valid values:
Note
|
0 |
| EnableCrossRegionImmutableBackup |
boolean |
Indicates whether immutable cross-region backup is enabled. |
|
| EnableImmutableBackup |
boolean |
Indicates whether immutable backup is enabled. |
|
| PreferredBackupPeriod |
string |
The data backup cycle. Valid values:
Note
After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter. |
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday |
| PreferredBackupTime |
string |
The time period during which automatic backups are performed. The value is in the |
07:00Z-08:00Z |
| PreferredNextBackupTime |
string |
The time of the next backup. The value is in the |
2020-11-16T07:30Z |
| RequestId |
string |
The request ID. |
EADFCE0F-9FB5-4685-B395-1440B****** |
Examples
Success response
JSON format
{
"AdvancedDataPolicies": {
"AdvancedDataPolicy": [
{
"AutoCreated": true,
"BakType": "F",
"DestRegion": "cn-hangzhou",
"DestType": "level1",
"DumpAction": "copy",
"FilterKey": "dayOfWeek",
"FilterType": "crontab",
"FilterValue": "1,2,3,4,5,6,7",
"OnlyPreserveOneEachDay": true,
"OnlyPreserveOneEachHour": true,
"PolicyId": "71930ac2e9f15e41615e10627c******\n",
"RetentionType": "delay",
"RetentionValue": "7",
"SrcRegion": "cn-beijing",
"SrcType": "level1",
"StorageClass": ""
}
]
},
"AdvancedPolicyOption": "disable",
"BackupFrequency": "Normal",
"BackupPolicyLevel": "Normal",
"BackupRetentionPolicyOnClusterDeletion": "NONE",
"DataLevel1BackupFrequency": "Normal",
"DataLevel1BackupPeriod": "Monday,Tuesday",
"DataLevel1BackupRetentionPeriod": "7",
"DataLevel1BackupTime": "15:00Z-16:00Z",
"DataLevel2BackupAnotherRegionRegion": "cn-hangzhou",
"DataLevel2BackupAnotherRegionRetentionPeriod": "30",
"DataLevel2BackupPeriod": "Monday,Tuesday",
"DataLevel2BackupRetentionPeriod": "0",
"EnableCrossRegionImmutableBackup": false,
"EnableImmutableBackup": false,
"PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
"PreferredBackupTime": "07:00Z-08:00Z",
"PreferredNextBackupTime": "2020-11-16T07:30Z",
"RequestId": "EADFCE0F-9FB5-4685-B395-1440B******"
}
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.