Modifies the backup policy for a PolarDB instance.
Operation description
Applicable engines
PolarDB for MySQL
This API is available only to specific customers. To request access, you can join the DBS customer DingTalk group (ID: 35585947).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:ModifyBackupPolicy |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionCode |
string |
No |
The region where the backup set is located. |
cn-shanghai |
| PreferredBackupWindowBegin |
string |
No |
The start time of the backup window. |
17:00Z |
| InstanceName |
string |
No |
The ID of the PolarDB instance. |
pc-2ze3nrr64c5**** |
| Category |
string |
No |
The backup type.
|
Flash |
| AdvanceLogPolicies |
array<object> |
No |
||
|
object |
No |
|||
| LogRetentionType |
string |
No |
||
| DestType |
string |
No |
||
| FilterType |
string |
No |
||
| ActionType |
string |
No |
||
| SrcRegion |
string |
No |
||
| EnableLogBackup |
integer |
No |
||
| SrcType |
string |
No |
||
| LogRetentionValue |
string |
No |
||
| PolicyId |
string |
No |
||
| FilterKey |
string |
No |
||
| DestRegion |
string |
No |
||
| FilterValue |
string |
No |
||
| AdvanceDataPolicies |
array<object> |
No |
The details of the data backup policy. |
|
|
object |
No |
The details of the policy. |
||
| DestType |
string |
No |
The destination type of the backup policy. Valid values:
|
level1 |
| FilterType |
string |
No |
The filter type for the advanced policy. Valid values:
|
crontab |
| ActionType |
string |
No |
The operation type. Valid values:
|
UPDATE |
| SrcRegion |
string |
No |
The source region of the backup policy. |
cn-shanghai |
| SrcType |
string |
No |
The source type of the backup policy. Valid values:
|
db |
| OnlyPreserveOneEachDay |
boolean |
No |
Specifies whether to retain only one backup set per day for high-frequency backups that are more than one day old. |
|
| RetentionValue |
string |
No |
The retention period in days. |
4 |
| PolicyId |
string |
No |
The ID of the advanced policy. For more information, see DescribeBackupPolicy. |
6s67c7i3y8f8p72808p****** |
| FilterKey |
string |
No |
The scheduling type. Valid values:
Note
This parameter is returned only when FilterType is set to crontab. |
backupInterval |
| DestRegion |
string |
No |
The destination region of the backup policy. |
cn-shanghai |
| FilterValue |
string |
No |
The backup cycle. |
180 |
| RetentionType |
string |
No |
The retention period type for the backup set. Valid values:
|
delay |
| StorageClass |
string |
No |
||
| AdvanceIncPolicies |
array<object> |
No |
||
|
object |
No |
|||
| DestType |
string |
No |
||
| FilterType |
string |
No |
||
| ActionType |
string |
No |
||
| SrcRegion |
string |
No |
||
| SrcType |
string |
No |
||
| OnlyPreserveOneEachDay |
boolean |
No |
||
| RetentionValue |
string |
No |
||
| PolicyId |
string |
No |
||
| FilterKey |
string |
No |
||
| DestRegion |
string |
No |
||
| FilterValue |
string |
No |
||
| RetentionType |
string |
No |
||
| BackupRetentionPolicyOnClusterDeletion |
string |
No |
||
| BackupMethod |
string |
No |
||
| BackupPriority |
integer |
No |
||
| EnableIncBackup |
boolean |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the returned parameters. |
||
| RequestId |
string |
The request ID. |
D570F209-A166-50C6-98A3-155A20B218B7 |
| Message |
string |
The returned message. |
instanceName can not be empty. |
| Data |
object |
The details of the backup policy. |
|
| PreferredBackupWindowBegin |
string |
The start time of the backup window. |
17:00Z |
| PreferredBackupWindow |
string |
The backup window. |
17:00Z-18:00Z |
| Category |
string |
Indicates whether second-level backup is enabled. Returned values:
Note
This parameter is valid only for MySQL. |
Standard |
| AdvanceLogPolicies |
array<object> |
||
|
object |
|||
| LogRetentionType |
string |
||
| DestType |
string |
||
| FilterType |
string |
||
| SrcRegion |
string |
||
| EnableLogBackup |
integer |
||
| SrcType |
string |
||
| PolicyId |
string |
||
| DestRegion |
string |
||
| LogRetentionValue |
string |
||
| FilterKey |
string |
||
| FilterValue |
string |
||
| AdvanceDataPolicies |
array<object> |
The details of the data backup policy. |
|
|
object |
The details of the policy. |
||
| RetentionValue |
string |
The retention period in days. |
4 |
| BakType |
string |
The backup type. Returned values:
|
F |
| FilterKey |
string |
The scheduling type. Returned values:
Note
This parameter is returned only when FilterType is set to crontab. |
backupInterval |
| FilterValue |
string |
The backup cycle. |
180 |
| DestType |
string |
The destination type of the backup policy. Returned values:
|
level1 |
| FilterType |
string |
The filter type for the advanced policy. Returned values:
|
crontab |
| SrcRegion |
string |
The source region of the backup policy. |
cn-shanghai |
| AutoCreated |
boolean |
Indicates whether the backup policy is automatically generated by the system. Returned values:
|
false |
| SrcType |
string |
The source type of the backup policy. Returned values:
|
db |
| OnlyPreserveOneEachDay |
boolean |
Indicates whether to retain only one backup per day.
|
true |
| DumpAction |
string |
The details of the dump policy. Returned values:
|
copy |
| PolicyId |
string |
The ID of the advanced policy. |
dc13b153acc91141789122c23835**** |
| DestRegion |
string |
The destination region of the backup policy. |
cn-shanghai |
| RetentionType |
string |
The retention period type for the backup set. Returned values:
|
delay |
| StorageClass |
string |
||
| AdvanceIncPolicies |
array<object> |
||
|
object |
|||
| RetentionValue |
string |
||
| BakType |
string |
||
| FilterKey |
string |
||
| FilterValue |
string |
||
| DestType |
string |
||
| FilterType |
string |
||
| SrcRegion |
string |
||
| AutoCreated |
boolean |
||
| SrcType |
string |
||
| OnlyPreserveOneEachDay |
boolean |
||
| DumpAction |
string |
||
| PolicyId |
string |
||
| DestRegion |
string |
||
| RetentionType |
string |
||
| BackupRetentionPolicyOnClusterDeletion |
string |
||
| BackupMethod |
string |
||
| BackupPriority |
integer |
||
| EnableIncBackup |
boolean |
||
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| Code |
string |
The status code. |
Success |
| Success |
string |
Indicates whether the request was successful. Returned values:
|
true |
| ErrCode |
string |
The error code. |
Success |
Examples
Success response
JSON format
{
"RequestId": "D570F209-A166-50C6-98A3-155A20B218B7",
"Message": "instanceName can not be empty.",
"Data": {
"PreferredBackupWindowBegin": "17:00Z",
"PreferredBackupWindow": "17:00Z-18:00Z",
"Category": "Standard",
"AdvanceLogPolicies": [
{
"LogRetentionType": "",
"DestType": "",
"FilterType": "",
"SrcRegion": "",
"EnableLogBackup": 0,
"SrcType": "",
"PolicyId": "",
"DestRegion": "",
"LogRetentionValue": "",
"FilterKey": "",
"FilterValue": ""
}
],
"AdvanceDataPolicies": [
{
"RetentionValue": "4",
"BakType": "F",
"FilterKey": "backupInterval",
"FilterValue": "180",
"DestType": "level1",
"FilterType": "crontab",
"SrcRegion": "cn-shanghai",
"AutoCreated": false,
"SrcType": "db",
"OnlyPreserveOneEachDay": true,
"DumpAction": "copy",
"PolicyId": "dc13b153acc91141789122c23835****",
"DestRegion": "cn-shanghai",
"RetentionType": "delay",
"StorageClass": ""
}
],
"AdvanceIncPolicies": [
{
"RetentionValue": "",
"BakType": "",
"FilterKey": "",
"FilterValue": "",
"DestType": "",
"FilterType": "",
"SrcRegion": "",
"AutoCreated": false,
"SrcType": "",
"OnlyPreserveOneEachDay": false,
"DumpAction": "",
"PolicyId": "",
"DestRegion": "",
"RetentionType": ""
}
],
"BackupRetentionPolicyOnClusterDeletion": "",
"BackupMethod": "",
"BackupPriority": 0,
"EnableIncBackup": 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.