Upgrades the version or kernel of an Elasticsearch cluster.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
POST /openapi/instances/{InstanceId}/actions/upgrade-version HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
InstanceId | String | Path | Yes | es-cn-n6w1o1x0w001c**** |
The ID of the instance. |
clientToken | String | Query | No | 5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
dryRun | Boolean | Query | No | false |
Indicates whether to perform pre-upgrade verification:
Warning Version upgrade verification involves checking the cluster YML, plug-in configurations,
cluster status, indexes, and resources. We strongly recommend that you perform pre-verification
before the upgrade. Otherwise, upgrade issues may occur.
|
Object | Body | No |
The body of the request. |
||
version | String | Body | No | 6.7 |
The latest version. If type is set to engineVersion, the value is the instance version, for example, 6.7. If type is set to aliVersion, the value is the kernel version, for example, ali1.2.0. |
type | String | Body | No | engineVersion |
The type of the upgrade. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | F99407AB-2FA9-489E-A259-40CF6DC***** |
The ID of the request. |
Result | Array of Result |
The moderation results. |
|
validateType | String | checkClusterHealth |
The monitoring type. Valid values:
|
validateResult | Array of validateResult |
The verification information. |
|
errorType | String | clusterStatus |
The type of the error. Valid values:
|
errorCode | String | ClusterStatusNotHealth |
The error code returned if the request failed. |
errorMsg | String | The cluster status is not health |
The error message returned. |
status | String | success |
The verification is passed. Valid values:
|
Examples
Sample requests
POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/upgrade-version?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF****&dryRun=false HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"version" : "6.7",
"type" : "engineVersion"
}
Sample success response
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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
For a list of error codes, visit the API Error Center.