Help Center/ Distributed Cache Service/ API Reference/ API V2/ Instance Management/ Upgrading the Major Version of an Instance
Updated on 2026-09-02 GMT+08:00

Upgrading the Major Version of an Instance

Function

This API is used to upgrade the major version of an instance.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v2/{project_id}/instances/{instance_id}/major-version/upgrade

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

major_version

No

String

Definition

Target major version.

Constraints

The target major version must be later than the major version of the current instance.

Range

4.0, 5.0, 6.0, or 7.0

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

task_id

String

Definition

Background task ID.

Range

N/A

order_id

String

Definition

Order ID, which is returned only when the major version of a yearly/monthly DCS Redis 3.0 instance is upgraded.

Range

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is not returned.

Range

N/A

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is not returned.

Range

N/A

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is not returned.

Range

N/A

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is not returned.

Range

N/A

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Definition

Extended error information. This parameter is not used currently and is not returned.

Range

N/A

Example Requests

{
  "major_version" : "6.0"
}

Example Responses

Status code: 200

Successfully submitted the upgrade task.

{
  "task_id" : "8abf6e1e9eefae99019ef22e895815f0"
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4062",
  "error_msg" : "Invalid instance_id parameter in the request."
}

Status Codes

Status Code

Description

200

Successfully submitted the upgrade task.

400

Invalid request.

401

Invalid authentication information.

403

Request denied.

404

The requested resource could not be found.

500

Internal error.

Error Codes

See Error Codes.