Creates a backup for a MongoDB instance.
Operation description
The instance must be in the Running state.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:CreateBackup |
create |
*dbinstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
d-bp2235**** |
| BackupMethod |
string |
No |
The backup method. Valid values:
Note
|
Logical |
| BackupRetentionPeriod |
integer |
No |
The backup retention period in days. This parameter applies only to replica set and sharded cluster instances that use cloud disks. Note
If you do not specify this parameter, the retention period from the default backup policy is used. You can set this parameter to one of the following values:
|
30 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| BackupId |
string |
The backup ID. Note
This parameter is deprecated. To obtain the backup ID, call the DescribeBackups operation. |
5664**** |
| RequestId |
string |
The request ID. |
7016B12F-7F64-40A4-BAFF-013F02AC82FC |
| BackupJobId |
string |
The backup job ID. |
775051 |
Examples
Success response
JSON format
{
"BackupId": "5664****",
"RequestId": "7016B12F-7F64-40A4-BAFF-013F02AC82FC",
"BackupJobId": "775051"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidBackupMethod.ValueNotSupport | The specified parameter BackupMethod is not valid. | |
| 403 | OperationDenied.BackupJobExists | The operation is not permitted due to backup job exist. | A backup task is in progress. Try again later. |
| 403 | OperationDenied.NoDatabase | The operation is not permitted due to no database. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.