You can call this operation to upgrade 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

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
InstanceId String Yes r-bp1xxxxxxxxxxxxx

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

MajorVersion String Yes 4.0

The target major version. Currently, 4.0 is supported.

Action String No ModifyInstanceMajorVersion

The operation that you want to perform. Set this parameter to ModifyInstanceMajorVersion.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

EffectTime String No 0

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

  • 0: upgrades the major version immediately.
  • 1: upgrades the major version in the maintenance window.
Note Default value: 0.

Response parameters

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

The ID of the request.

Examples

Sample request


https://r-kvstore.aliyuncs.com/
? Action=ModifyInstanceMajorVersion
&InstanceId=r-bp1xxxxxxxxxxxxx
&MajorVersion=4.0
&EffectTime=0
&<Common request parameters>

Sample success response

XML format

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

JSON format

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

Error codes

View error codes.