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.

Debugging

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 No ModifyInstanceMajorVersion

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance for which you want to upgrade the major version.

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 region ID of the resource.

EffectiveTime String No 0

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

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

Response parameters

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

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=ModifyInstanceMajorVersion
&InstanceId=r-bp1zxszhcgatnx****
&MajorVersion=5.0
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceMajorVersionResponse>  
      <RequestId>AA587FB2-2593-4DFE-BE13-2494C2DF0CBF</RequestId>
</ModifyInstanceMajorVersionResponse>

JSON format

{
    "RequestId":"AA587FB2-2593-4DFE-BE13-2494C2DF0CBF"
}

Error codes

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