Creates a backup schedule.
Operation description
For more information about how to create a backup schedule in the Database Backup (DBS) console, see Purchase a backup schedule.
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:CreateBackupPlan | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Region | string | No | The ID of the region in which you want to store the backup data. You can query the supported regions of Database Backup (DBS) by calling the DescribeRegions operation. Note
For more information, see Endpoints .
| cn-hangzhou |
InstanceClass | string | Yes | The type of the backup schedule. Valid values:
Note
A backup schedule type with higher specifications offers higher backup and restoration performance. For more information, see Select a backup schedule type.
| micro |
DatabaseType | string | Yes | The type of the source database. Valid values:
| MySQL |
BackupMethod | string | Yes | The backup method of the backup schedule. Valid values:
| logical |
Period | string | No | The unit of the subscription period. Valid values:
| Month |
UsedTime | integer | No | The subscription period. Valid values:
| 1 |
PayType | string | No | The billing method of the backup schedule. Valid values:
Note
The default value is prepay. If the BackupMethod parameter is set to duplication, postpay is supported.
| prepay |
DatabaseRegion | string | No | The region in which the database you want to back up resides. Note
This parameter is required if the PayType parameter is set to postpay.
| cn-hangzhou |
StorageRegion | string | No | The region in which you want to store the backup data. Note
This parameter is required if the PayType parameter is set to postpay.
| cn-hangzhou |
InstanceType | string | No | The type of the source database instance. Valid values:
Note
If PayType is set to postpay, this parameter is required.
| RDS |
StorageType | string | No | This parameter is unavailable. | N/A |
FromApp | string | No | The source of the request. The default value is OpenAPI and cannot be changed. | OpenAPI |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. | KJSAHKJFHKJSHFKASHFKJADFHKDXXXX |
ResourceGroupId | string | No | The ID of the resource group. | rg-aekzecovzti**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"HttpStatusCode": 200,
"RequestId": "7BCF6D62-885F-5A4A-91A1-679760E7****",
"ErrCode": "Param.NotFound",
"Success": true,
"ErrMessage": "The specified parameter %s value is not valid.",
"BackupPlanId": "dbsrhahrsu2****",
"OrderId": "21437345592****"
}
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 |
---|