Queries the backup policy for a PolarDB instance.
Operation description
Applicable engines
PolarDB for MySQL
This API operation is available only to specific customers. To use this operation, join the DBS Customer Service DingTalk group (ID: 35585947) and request access.
Related document
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:DescribeBackupPolicy |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionCode |
string |
No |
The region where the backup set is located. |
cn-beijing |
| InstanceName |
string |
No |
The ID of the PolarDB instance. |
pc-2ze3nrr64c5**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
54A63B3B-AA10-1CC3-A6BB-6CCE98D19628 |
| Message |
string |
The response message. |
instanceName can not be empty. |
| Data |
object |
The details of the backup policy. |
|
| PreferredBackupDate |
string |
The basic backup cycle. This is a 7-digit number. From left to right, each digit represents a day from Monday to Sunday. A value of 1 indicates that a backup is performed, and 0 indicates that no backup is performed. |
1010101 |
| PreferredBackupWindowBegin |
string |
The start time of the basic backup window. |
23:00Z |
| PreferredBackupWindow |
string |
The basic backup window. |
23:00Z-24:00Z |
| BackupRetentionPeriod |
integer |
The retention period for basic backups. If an advanced backup policy is enabled, this is the longest retention period for level-1 backups. |
7 |
| BackupRetentionPolicyOnClusterDeletion |
string |
The data retention policy for archived backups of deleted instances. Valid values:
|
LATEST |
| HighFrequencyBakInterval |
integer |
The high-frequency backup interval in minutes. For example, a value of 120 means that a backup is performed every two hours. |
120 |
| BackupPriority |
integer |
The policy for backing up the secondary database. Valid values:
Note
This parameter applies only to RDS SQL Server instances. For other engines, the return value is 0. |
0 |
| EnableLogBackup |
integer |
Specifies whether log backup is enabled. Valid values:
|
1 |
| LogBackupRetention |
integer |
The retention period for log backups. |
7 |
| LogBackupLocalRetentionNumber |
string |
The number of local log files to retain. |
10 |
| EnableBackup |
integer |
Specifies whether backup is enabled. |
1 |
| LocalLogRetentionSpace |
integer |
The maximum space usage for local logs. |
30 |
| HighSpaceUsageProtection |
string |
Specifies whether to forcibly clear logs when the instance space usage exceeds 80% or the remaining space is less than 5 GB. Valid values:
|
Enable |
| Category |
string |
Specifies whether second-level backup is enabled. Valid values:
Note
This parameter is valid only for MySQL. |
Standard |
| IncBackupInterval |
integer |
The interval for high-frequency incremental backups. |
-1 |
| EnableIncBackup |
integer |
Specifies whether incremental backup is enabled. |
0 |
| BackupMethod |
string |
The backup method. Valid values:
|
Physical |
| AdvanceLogPolicies |
array<object> |
The details of the log backup policy. |
|
|
object |
The details of the policy. |
||
| PolicyId |
string |
The ID of the backup policy. |
dc13b153acc91141789122c23835**** |
| SrcType |
string |
The source type of the backup policy. Valid values:
|
level1 |
| SrcRegion |
string |
The source region of the backup policy. |
cn-beijing |
| DestType |
string |
The destination type of the backup policy. Valid values:
|
level1 |
| DestRegion |
string |
The destination region of the backup policy. |
cn-shanghai |
| EnableLogBackup |
integer |
A reserved parameter. |
1 |
| LogRetentionType |
string |
The retention type for log backups. Valid values:
|
delay |
| LogRetentionValue |
string |
The retention period for log backups. |
3 |
| FilterType |
string |
||
| FilterKey |
string |
||
| FilterValue |
string |
||
| AdvanceDataPolicies |
array<object> |
The details of the data backup policy. |
|
|
object |
The details of the policy. |
||
| PolicyId |
string |
The ID of the advanced policy. |
71930ac2e9f15e41615e10627c****** |
| FilterType |
string |
The filter type for the advanced policy. Valid values:
|
crontab |
| FilterKey |
string |
The schedule type. Valid values:
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 |
| DumpAction |
string |
The dump policy. Valid values:
|
copy |
| RetentionType |
string |
The retention period type for the backup set. Valid values:
|
delay |
| RetentionValue |
string |
The number of days before expiration. |
7 |
| SrcType |
string |
The source type of the backup policy. Valid values:
|
db |
| SrcRegion |
string |
The source region of the backup policy. |
cn-beijing |
| DestType |
string |
The destination type of the backup policy. Valid values:
|
level1 |
| DestRegion |
string |
The destination region of the backup policy. |
cn-beijing |
| BakType |
string |
The backup type. Valid values:
|
F |
| AutoCreated |
boolean |
Specifies whether the backup policy is automatically generated by the system. Valid values:
|
true |
| StorageClass |
string |
||
| AdvanceIncPolicies |
array<object> |
||
|
object |
|||
| PolicyId |
string |
||
| FilterType |
string |
||
| FilterKey |
string |
||
| FilterValue |
string |
||
| DumpAction |
string |
||
| RetentionType |
string |
||
| RetentionValue |
string |
||
| SrcType |
string |
||
| SrcRegion |
string |
||
| DestType |
string |
||
| DestRegion |
string |
||
| BakType |
string |
||
| AutoCreated |
boolean |
||
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| Code |
string |
The status code. |
Success |
| Success |
string |
Specifies whether the request was successful. Valid values:
|
true |
| ErrCode |
string |
The error code. |
Success |
Examples
Success response
JSON format
{
"RequestId": "54A63B3B-AA10-1CC3-A6BB-6CCE98D19628",
"Message": "instanceName can not be empty.",
"Data": {
"PreferredBackupDate": "1010101",
"PreferredBackupWindowBegin": "23:00Z",
"PreferredBackupWindow": "23:00Z-24:00Z",
"BackupRetentionPeriod": 7,
"BackupRetentionPolicyOnClusterDeletion": "LATEST",
"HighFrequencyBakInterval": 120,
"BackupPriority": 0,
"EnableLogBackup": 1,
"LogBackupRetention": 7,
"LogBackupLocalRetentionNumber": "10",
"EnableBackup": 1,
"LocalLogRetentionSpace": 30,
"HighSpaceUsageProtection": "Enable",
"Category": "Standard",
"IncBackupInterval": -1,
"EnableIncBackup": 0,
"BackupMethod": "Physical",
"AdvanceLogPolicies": [
{
"PolicyId": "dc13b153acc91141789122c23835****",
"SrcType": "level1",
"SrcRegion": "cn-beijing",
"DestType": "level1",
"DestRegion": "cn-shanghai",
"EnableLogBackup": 1,
"LogRetentionType": "delay",
"LogRetentionValue": "3",
"FilterType": "",
"FilterKey": "",
"FilterValue": ""
}
],
"AdvanceDataPolicies": [
{
"PolicyId": "71930ac2e9f15e41615e10627c******",
"FilterType": "crontab",
"FilterKey": "dayOfWeek",
"FilterValue": "1,2,3,4,5,6,7",
"DumpAction": "copy",
"RetentionType": "delay",
"RetentionValue": "7",
"SrcType": "db",
"SrcRegion": "cn-beijing",
"DestType": "level1",
"DestRegion": "cn-beijing",
"BakType": "F",
"AutoCreated": true,
"StorageClass": ""
}
],
"AdvanceIncPolicies": [
{
"PolicyId": "",
"FilterType": "",
"FilterKey": "",
"FilterValue": "",
"DumpAction": "",
"RetentionType": "",
"RetentionValue": "",
"SrcType": "",
"SrcRegion": "",
"DestType": "",
"DestRegion": "",
"BakType": "",
"AutoCreated": false
}
]
},
"ErrMessage": "The specified parameter %s value is not valid. ",
"Code": "Success",
"Success": "true",
"ErrCode": "Success"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Request.Forbidden | Have no Permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.