You can call this operation to upgrade the database version of a MongoDB instance.

This operation is applicable to replica set instances and sharded cluster instances. UpgradeDBInstanceEngineVersion cannot be performed on standalone instances.

The instance must be in the running state when you call this operation.


  • The storage engine of the instance is binding on the selection of database versions. For more information, see Version and storage engines.
  • The database version cannot be downgraded after the database version is upgraded.
  • The instance will be automatically restarted for two to three times during the upgrade process. Make sure that the instance is executed during off-peak hours.


OpenAPI Explorer simplifies API usage. You can use OpenAPI Explorer to perform debugging operations, such as retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
EngineVersion String Yes 4.0

The target database version to be upgraded to. Valid values: 3.4 and 4.0.

Note The target database version must be later than the current database version of the instance.
DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Action String No UpgradeDBInstanceEngineVersion

The operation that you want to perform. Set the value to UpgradeDBInstanceEngineVersion.

AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
RequestId String C4907B00-A208-4E0C-A636-AA85140E406C

The ID of the request.


Sample requests

http(s):// Action=UpgradeDBInstanceEngineVersion
&<Common request parameters>

Successful response examples

XML format


JSON format


Error codes

View error codes