Upgrades the database version of an ApsaraDB for MongoDB instance.
Operation description
The instance must be in the running state when you call this operation.
The available database versions depend on the storage engine used by the instance. For more information, see Upgrades of MongoDB major versions. You can also call the DescribeAvailableEngineVersion operation to query the available database versions.
You cannot downgrade the MongoDB version of an instance after you upgrade it.
The instance is automatically restarted for two to three times during the upgrade process. Make sure that you upgrade the instance during off-peak hours.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:UpgradeDBInstanceEngineVersion |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The ID of the instance. |
dds-bpxxxxxxxx |
| EngineVersion |
string |
Yes |
The database version to which you want to upgrade. Valid values: 3.4, 4.0, and 4.2. Note
This database version must be later than the current database version of the instance. Valid values:
|
4.0 |
| SwitchMode |
integer |
No |
The time when to perform the upgrade. Valid values:
|
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
C4907B00-A208-4E0C-A636-AA85140E406C |
Examples
Success response
JSON format
{
"RequestId": "C4907B00-A208-4E0C-A636-AA85140E406C"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EngineVersion.ERROR | Target engineVersion must be greater than the current one. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.