Modifies the backup policy of a PolarDB instance.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dbs:ModifyBackupPolicy | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionCode | string | No | The region in which backup sets reside. | cn-shanghai |
PreferredBackupWindowBegin | string | No | The start time of a basic backup. | 17:00Z |
InstanceName | string | No | The ID of the PolarDB instance. | pc-2ze3nrr64c5**** |
AdvanceDataPolicies | array<object> | No | The information about the data backup policy. | |
object | No | |||
ActionType | string | No | The type of the operation. Valid values:
| UPDATE |
PolicyId | string | No | The ID of the advanced backup policy. You can call the DescribeBackupPolicy operation to query the ID. | 6s67c7i3y8f8p72808p****** |
FilterType | string | No | The scheduling mode of the advanced backup policy. Valid values:
| crontab |
FilterKey | string | No | The scheduling cycle. Valid values:
Note
This parameter takes effect only when FilterType is set to crontab.
| backupInterval |
FilterValue | string | No | The backup cycle. | 180 |
RetentionType | string | No | The retention type of backup sets. Valid values:
| delay |
RetentionValue | string | No | The retention period. Unit: day. | 4 |
SrcType | string | No | The type of the data source of the backup policy. Valid values:
| db |
SrcRegion | string | No | The region in which the data source of the backup policy resides. | cn-shanghai |
DestType | string | No | The storage method of backup files. Valid values:
| level1 |
DestRegion | string | No | The region in which backup files are stored. | cn-shanghai |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D570F209-A166-50C6-98A3-155A20B218B7",
"Message": "instanceName can not be empty.",
"Data": {
"PreferredBackupWindowBegin": "17:00Z",
"PreferredBackupWindow": "17:00Z-18:00Z",
"AdvanceDataPolicies": [
{
"PolicyId": "dc13b153acc91141789122c23835****",
"FilterType": "crontab",
"FilterKey": "backupInterval",
"FilterValue": "180",
"DumpAction": "copy",
"RetentionType": "delay",
"RetentionValue": "4",
"SrcType": "db",
"SrcRegion": "cn-shanghai",
"DestType": "level1",
"DestRegion": "cn-shanghai",
"BakType": "F",
"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 |
---|---|---|
403 | Request.Forbidden | Have no Permissions |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-24 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2024-05-28 | The internal configuration of the API is changed, but the call is not affected | View Change Details |