Call UpgradeEngineVersion to upgrade the Elasticsearch instance version or kernel patch version. You can only upgrade an instance from version 6.3 to Version 6.7.

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 header

This operation uses common request parameters only. For more information, see Common parameters.

Request syntax

POST /openapi/instances/[InstanceId]/actions/upgrade-version HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-n6w1o1x0w001c****

The ID of the instance.

clientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

A unique token generated by the client to guarantee the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

dryRun Boolean No false

Whether to perform pre-upgrade verification. True indicates verify, while false indicates no verify.

RequestBody

The following parameters must be set in RequestBody:

Field

Type

Required

Example

Description

version

String

Yes

6.7

Upgrade the version. Valid values: 6.7 and ali1.2.0. To set this parameter to 6.7, the type parameter must be set to engineVersion. To set this parameter to ali1.2.0, the type parameter must be set to aliVersion.

type

String

No

engineVersion

The type of the update. Valid values: engineVersion (version update, default value) and aliVersion (patch update).

Example:


{
  "version": "ali1.2.0",
  "type": "aliVersion"
}
            

Response parameters

Parameter Type Example Description
RequestId String F99407AB-2FA9-489E-A259-40CF6DC*****

The ID of the request.

Result Struct

The return results.

status String success

Check is passed. Success indicates that the request passes, and failed indicates that the request fails.

validateResult Struct

Check information.

errorCode String ClusterStatusNotHealth

The error code.

errorMsg String The cluster status is not health

The error message.

errorType String clusterStatus

The type of the error that occurred. Supports:

  • clusterStatus: the cluster health status
  • clusterConfigYml: the cluster YML files
  • clusterConfigPlugins: the cluster configuration file
  • clusterResource: cluster resources
  • clusterSnapshot: cluster snapshots
validateType String checkClusterHealth

The verification type. Supports:

  • checkClusterHealth: cluster health status
  • checkConfigCompatible: configuration compatibility
  • checkClusterResource: resource space status
  • checkClusterSnapshot: whether a snapshot exists

Examples

Sample requests

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/upgrade-version HTTP/1.1
Common request parameters
{
  "version": "ali1.2.0",
  "type": "aliVersion"
}

Sample success responses

XML format

<Result>
    <validateType>checkClusterHealth</validateType>
    <status>failed</status>
    <validateResult>
        <errorType>clusterStatus</errorType>
        <errorCode>ClusterStatusNotHealth</errorCode>
        <errorMsg>ClusterStatusNotHealth</errorMsg>
    </validateResult>
</Result>
<Result>
    <validateType>checkConfigCompatible</validateType>
    <status>failed</status>
    <validateResult>
        <errorType>clusterConfigYml</errorType>
        <errorCode>ClusterYamlNotCompatible</errorCode>
        <errorMsg>ClusterYamlNotCompatible</errorMsg>
    </validateResult>
    <validateResult>
        <errorType>clusterConfigPlugins</errorType>
        <errorCode>ClusterPluginsNotSupport</errorCode>
        <errorMsg>ClusterPluginsNotSupport</errorMsg>
    </validateResult>
</Result>
<Result>
    <validateType>checkClusterResource</validateType>
    <status>failed</status>
    <validateResult>
        <errorType>clusterResource</errorType>
        <errorCode>ClusterResourceNotEnough</errorCode>
        <errorMsg>ClusterResourceNotEnough</errorMsg>
    </validateResult>
</Result>
<Result>
    <validateType>checkClusterSnapshot</validateType>
    <status>failed</status>
    <validateResult>
        <errorType>clusterSnapshot</errorType>
        <errorCode>ClusterSnapshotNotAvaild</errorCode>
        <errorMsg>ClusterSnapshotNotAvaild</errorMsg>
    </validateResult>
</Result>
<RequestId>F99407AB-2FA9-489E-A259-40CF6DC****</RequestId>

JSON format

{
    "Result":[
        {
            "validateType":"checkClusterHealth",
            "status":"failed",
            "validateResult":[
                {
                    "errorType":"clusterStatus",
                    "errorCode":"ClusterStatusNotHealth",
                    "errorMsg":"ClusterStatusNotHealth"
                }
            ]
        },
        {
            "validateType":"checkConfigCompatible",
            "status":"failed",
            "validateResult":[
                {
                    "errorType":"clusterConfigYml",
                    "errorCode":"ClusterYamlNotCompatible",
                    "errorMsg":"ClusterYamlNotCompatible"
                },
                {
                    "errorType":"clusterConfigPlugins",
                    "errorCode":"ClusterPluginsNotSupport",
                    "errorMsg":"ClusterPluginsNotSupport"
                }
            ]
        },
        {
            "validateType":"checkClusterResource",
            "status":"failed",
            "validateResult":[
                {
                    "errorType":"clusterResource",
                    "errorCode":"ClusterResourceNotEnough",
                    "errorMsg":"ClusterResourceNotEnough"
                }
            ]
        },
        {
            "validateType":"checkClusterSnapshot",
            "status":"failed",
            "validateResult":[
                {
                    "errorType":"clusterSnapshot",
                    "errorCode":"ClusterSnapshotNotAvaild",
                    "errorMsg":"ClusterSnapshotNotAvaild"
                }
            ]
        }
    ],
"RequestId":"F99407AB-2FA9-489E-A259-40CF6DC****"
}

Error codes

HttpCode Error code Error message Description
400 InstanceNotFound The instanceId provided does not exist. The error message returned because the specified instance cannot be found. Check the instance status.

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