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. |
|
| PreferredBackupWindowBegin |
string |
No |
The start time of the backup window. |
|
| InstanceName |
string |
No |
The ID of the PolarDB instance. |
|
| Category |
string |
No |
The backup type.
|
|
| 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:
|
|
| FilterType |
string |
No |
The filter type for the advanced policy. Valid values:
|
|
| ActionType |
string |
No |
The operation type. Valid values:
|
|
| SrcRegion |
string |
No |
The source region of the backup policy. |
|
| SrcType |
string |
No |
The source type of the backup policy. Valid values:
|
|
| 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. |
|
| PolicyId |
string |
No |
The ID of the advanced policy. For more information, see DescribeBackupPolicy. |
|
| FilterKey |
string |
No |
The scheduling type. Valid values:
Note
This parameter is returned only when FilterType is set to crontab. |
|
| DestRegion |
string |
No |
The destination region of the backup policy. |
|
| FilterValue |
string |
No |
The backup cycle. |
|
| RetentionType |
string |
No |
The retention period type for the backup set. Valid values:
|
|
| 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. |
|
| Message |
string |
The returned message. |
|
| Data |
object |
The details of the backup policy. |
|
| PreferredBackupWindowBegin |
string |
The start time of the backup window. |
|
| PreferredBackupWindow |
string |
The backup window. |
|
| Category |
string |
Indicates whether second-level backup is enabled. Returned values:
Note
This parameter is valid only for MySQL. |
|
| 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. |
|
| BakType |
string |
The backup type. Returned values:
|
|
| FilterKey |
string |
The scheduling type. Returned values:
Note
This parameter is returned only when FilterType is set to crontab. |
|
| FilterValue |
string |
The backup cycle. |
|
| DestType |
string |
The destination type of the backup policy. Returned values:
|
|
| FilterType |
string |
The filter type for the advanced policy. Returned values:
|
|
| SrcRegion |
string |
The source region of the backup policy. |
|
| AutoCreated |
boolean |
Indicates whether the backup policy is automatically generated by the system. Returned values:
|
|
| SrcType |
string |
The source type of the backup policy. Returned values:
|
|
| OnlyPreserveOneEachDay |
boolean |
Indicates whether to retain only one backup per day.
|
|
| DumpAction |
string |
The details of the dump policy. Returned values:
|
|
| PolicyId |
string |
The ID of the advanced policy. |
|
| DestRegion |
string |
The destination region of the backup policy. |
|
| RetentionType |
string |
The retention period type for the backup set. Returned values:
|
|
| 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. |
|
| Code |
string |
The status code. |
|
| Success |
string |
Indicates whether the request was successful. Returned values:
|
|
| ErrCode |
string |
The error code. |
Examples
Success response
JSON format
{
"RequestId": "",
"Message": "",
"Data": {
"PreferredBackupWindowBegin": "",
"PreferredBackupWindow": "",
"Category": "",
"AdvanceLogPolicies": [
{
"LogRetentionType": "",
"DestType": "",
"FilterType": "",
"SrcRegion": "",
"EnableLogBackup": 0,
"SrcType": "",
"PolicyId": "",
"DestRegion": "",
"LogRetentionValue": "",
"FilterKey": "",
"FilterValue": ""
}
],
"AdvanceDataPolicies": [
{
"RetentionValue": "",
"BakType": "",
"FilterKey": "",
"FilterValue": "",
"DestType": "",
"FilterType": "",
"SrcRegion": "",
"AutoCreated": true,
"SrcType": "",
"OnlyPreserveOneEachDay": true,
"DumpAction": "",
"PolicyId": "",
"DestRegion": "",
"RetentionType": "",
"StorageClass": ""
}
],
"AdvanceIncPolicies": [
{
"RetentionValue": "",
"BakType": "",
"FilterKey": "",
"FilterValue": "",
"DestType": "",
"FilterType": "",
"SrcRegion": "",
"AutoCreated": true,
"SrcType": "",
"OnlyPreserveOneEachDay": true,
"DumpAction": "",
"PolicyId": "",
"DestRegion": "",
"RetentionType": ""
}
],
"BackupRetentionPolicyOnClusterDeletion": "",
"BackupMethod": "",
"BackupPriority": 0,
"EnableIncBackup": true
},
"ErrMessage": "",
"Code": "",
"Success": "",
"ErrCode": ""
}
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.