Upgrades the major version of an ApsaraDB for Redis instance.

For more information about how to perform the corresponding operation in the console, see Upgrade the major version.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyInstanceMajorVersion

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

MajorVersion String Yes 5.0

The major version to which you want to upgrade the instance. Valid values: 4.0 and 5.0.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

EffectiveTime String No Immediately

The time when the major version is upgraded. Valid values:

  • Immediately: immediately upgrades the major version. This is the default value.
  • MaintainTime: upgrades the major version in the maintenance window.
Note You can call the ModifyInstanceMaintainTime operation to modify the maintenance window of an ApsaraDB for Redis instance.

Response parameters

Parameter Type Example Description
RequestId String AA587FB2-2593-4DFE-BE13-2494C2DF****

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.