This operation creates a Database Backup (DBS) backup plan.
Operation description
For the corresponding operation in the console, see Purchase a backup plan.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:CreateBackupPlan |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Region |
string |
No |
The ID of the region where the DBS instance resides. This parameter is required. To view the regions supported by DBS, call the DescribeRegions operation. Note
For more information, see Endpoints. |
cn-hangzhou |
| InstanceClass |
string |
Yes |
The instance class. Valid values:
Note
A larger instance class provides better performance for backup and recovery. For more information, see Instance classes. |
micro |
| DatabaseType |
string |
Yes |
The database type. Valid values:
|
MySQL |
| BackupMethod |
string |
Yes |
The backup method. Valid values:
|
logical |
| Period |
string |
No |
The billing cycle of the subscription instance. Valid values:
|
Month |
| UsedTime |
integer |
No |
The subscription duration. Valid values:
|
1 |
| PayType |
string |
No |
The payment method. Valid values: prepay: subscription |
prepay |
| DatabaseRegion |
string |
No |
The region where the source database resides. |
cn-hangzhou |
| StorageRegion |
string |
No |
The storage region. |
cn-hangzhou |
| InstanceType |
string |
No |
The type of the database instance. Valid values:
|
RDS |
| StorageType |
string |
No |
This parameter is not yet available. |
无 |
| FromApp |
string |
No |
The source of the request. The default value is OpenAPI. You do not need to set this parameter. |
OpenAPI |
| ClientToken |
string |
No |
A client token that is used to ensure the idempotence of the request. Enter a unique string. |
KJSAHKJFHKJSHFKASHFKJADFHKDXXXX |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-aekzecovzti**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the return value. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
7BCF6D62-885F-5A4A-91A1-679760E7**** |
| ErrCode |
string |
The error code. |
Param.NotFound |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| BackupPlanId |
string |
The backup plan ID. |
dbsrhahrsu2**** |
| OrderId |
string |
The order ID. |
21437345592**** |
Examples
Success response
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 |
Description |
|---|---|---|---|
| 403 | Request.Forbidden | Have no Permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.