Upgrades the database version of an ApsaraDB for MongoDB instance.
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.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpgradeDBInstanceEngineVersion |
The operation that you want to perform. The operation that you want to perform. Set the value to UpgradeDBInstanceEngineVersion. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
DBInstanceId | String | Yes | dds-bpxxxxxxxx |
The ID of the instance. |
EngineVersion | String | Yes | 4.0 |
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.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C4907B00-A208-4E0C-A636-AA85140E406C |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=UpgradeDBInstanceEngineVersion
&EngineVersion=4.0
&DBInstanceId=dds-bpxxxxxxxx
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<UpgradeDBInstanceEngineVersionResponse>
<RequestId>C4907B00-A208-4E0C-A636-AA85140E406C</RequestId>
</UpgradeDBInstanceEngineVersionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C4907B00-A208-4E0C-A636-AA85140E406C"
}
Error codes
For a list of error codes, visit the API Error Center.