修改PolarDB实例备份策略。
接口说明
适用引擎
PolarDB MySQL 版
当前该接口仅针对特定客户开放使用,如有需求,请到 DBS 客户咨询群(钉钉群号:35585947)申请使用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dbs:ModifyBackupPolicy |
update |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
RegionCode |
string |
否 |
备份集所在地域。 |
cn-shanghai |
PreferredBackupWindowBegin |
string |
否 |
基础备份窗口开始时间。 |
17:00Z |
InstanceName |
string |
否 |
PolarDB 实例 ID。 |
pc-2ze3nrr64c5**** |
Category |
string |
否 |
备份类型
|
Flash |
AdvanceLogPolicies |
array<object> |
否 |
||
object |
否 |
|||
LogRetentionType |
string |
否 |
||
DestType |
string |
否 |
||
FilterType |
string |
否 |
||
ActionType |
string |
否 |
||
SrcRegion |
string |
否 |
||
EnableLogBackup |
integer |
否 |
||
SrcType |
string |
否 |
||
LogRetentionValue |
string |
否 |
||
PolicyId |
string |
否 |
||
FilterKey |
string |
否 |
||
DestRegion |
string |
否 |
||
FilterValue |
string |
否 |
||
AdvanceDataPolicies |
array<object> |
否 |
数据备份策略详情。 |
|
object |
否 |
策略详情。 |
||
DestType |
string |
否 |
备份策略目标类型,取值如下:
|
level1 |
FilterType |
string |
否 |
高级策略筛选类型,取值如下:
|
crontab |
ActionType |
string |
否 |
操作类型,取值如下:
|
UPDATE |
SrcRegion |
string |
否 |
备份策略源地域。 |
cn-shanghai |
SrcType |
string |
否 |
备份策略源类型,取值如下:
|
db |
OnlyPreserveOneEachDay |
boolean |
否 |
一天之前的高频备份集,是否只保留每天一个 |
|
RetentionValue |
string |
否 |
过期天数。 |
4 |
PolicyId |
string |
否 |
高级策略 ID,可调用 DescribeBackupPolicy 查看。 |
6s67c7i3y8f8p72808p****** |
FilterKey |
string |
否 |
调度类型,取值如下:
说明
仅当 FilterType 为 crontab 时,返回该参数。 |
backupInterval |
DestRegion |
string |
否 |
备份策略目标地域。 |
cn-shanghai |
FilterValue |
string |
否 |
备份周期。 |
180 |
RetentionType |
string |
否 |
备份集保留周期类型,取值如下:
|
delay |
StorageClass |
string |
否 |
||
AdvanceIncPolicies |
array<object> |
否 |
||
object |
否 |
|||
DestType |
string |
否 |
||
FilterType |
string |
否 |
||
ActionType |
string |
否 |
||
SrcRegion |
string |
否 |
||
SrcType |
string |
否 |
||
OnlyPreserveOneEachDay |
boolean |
否 |
||
RetentionValue |
string |
否 |
||
PolicyId |
string |
否 |
||
FilterKey |
string |
否 |
||
DestRegion |
string |
否 |
||
FilterValue |
string |
否 |
||
RetentionType |
string |
否 |
||
BackupRetentionPolicyOnClusterDeletion |
string |
否 |
||
BackupMethod |
string |
否 |
||
BackupPriority |
integer |
否 |
||
EnableIncBackup |
boolean |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
返回参数详情。 |
||
RequestId |
string |
请求 ID。 |
D570F209-A166-50C6-98A3-155A20B218B7 |
Message |
string |
返回信息。 |
instanceName can not be empty. |
Data |
object |
备份策略详情。 |
|
PreferredBackupWindowBegin |
string |
基础备份窗口开始时间。 |
17:00Z |
PreferredBackupWindow |
string |
基础备份窗口。 |
17:00Z-18:00Z |
Category |
string |
是否开启秒级备份,返回值如下:
说明
该参数仅对 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> |
数据备份策略详情。 |
|
object |
策略详情。 |
||
RetentionValue |
string |
过期天数。 |
4 |
BakType |
string |
备份类型,返回值如下:
|
F |
FilterKey |
string |
调度类型,返回值如下:
说明
仅当 FilterType 为 crontab 时,返回该参数。 |
backupInterval |
FilterValue |
string |
备份周期。 |
180 |
DestType |
string |
备份策略目标类型,返回值如下:
|
level1 |
FilterType |
string |
高级策略筛选类型,返回值如下:
|
crontab |
SrcRegion |
string |
备份策略源地域。 |
cn-shanghai |
AutoCreated |
boolean |
是否为系统自动生成的备份策略,返回值如下:
|
false |
SrcType |
string |
备份策略源类型,返回值如下:
|
db |
OnlyPreserveOneEachDay |
boolean |
onlyPreserveOneEachDay
|
true |
DumpAction |
string |
转储策略详情,返回值如下:
|
copy |
PolicyId |
string |
高级策略 ID。 |
dc13b153acc91141789122c23835**** |
DestRegion |
string |
备份策略目标地域。 |
cn-shanghai |
RetentionType |
string |
备份集保留周期类型,返回值如下:
|
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 specified parameter %s value is not valid. |
Code |
string |
状态码。 |
Success |
Success |
string |
请求是否成功,返回值如下:
|
true |
ErrCode |
string |
错误码。 |
Success |
示例
正常返回示例
JSON
格式
{
"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": true,
"SrcType": "",
"OnlyPreserveOneEachDay": true,
"DumpAction": "",
"PolicyId": "",
"DestRegion": "",
"RetentionType": ""
}
],
"BackupRetentionPolicyOnClusterDeletion": "",
"BackupMethod": "",
"BackupPriority": 0,
"EnableIncBackup": true
},
"ErrMessage": "The specified parameter %s value is not valid.",
"Code": "Success",
"Success": "true",
"ErrCode": "Success"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
403 | Request.Forbidden | Have no Permissions | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。