You can call this operation to modify the configuration of a specified Elasticsearch instance. For example, you can modify the number of nodes, instance quota, instance name, or storage.

Before you call this operation, pay close attention to the following limits:

  • When the instance is in the activating, invalid, or inactive state, you cannot modify its configuration.
  • You can change only one instance property in each request. For example, you cannot send a request to change the instance specification and disk size at the same time.

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 only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

PUT /openapi/instances/[InstanceId] HTTP/1.1

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-xxx

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. The maximum length of the token is 64 ASCII characters.

You must specify request body parameters. For more information, see Sample requests.

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The ID of the request.

Result

The configuration of the instance.

createdAt String 2018-07-13T03:58:07.253Z

The time when the instance was created.

description String test

The name of the instance.

dictList Array

The configuration of the IK dictionaries.

dictList

The configuration of the IK dictionary.

fileSize Long 1000

The size of the IK dictionary file. Unit: bytes.

name String test.dic

The name of the IK dictionary file.

sourceType String ORIGIN

The source of the IK dictionary file.

type String MAIN

The type of the IK dictionary. Valid values: MAIN (main dictionary) and STOP (stopword list).

domain String es-cn-abc.elasticsearch.aliyuncs.com

The private network endpoint of the instance.

esVersion String 5.5.3_with_X-Pack

The version of the instance.

instanceId String es-cn-abc

The ID of the instance.

kibanaConfiguration

The configuration of Kibana nodes.

amount Integer 1

The number of Kibana nodes. Only one Kibana node is supported.

disk Integer 0

The disk size per Kibana node.

diskType String cloud_ssd

The disk type of Kibana nodes. Please ignore this parameter.

spec String elasticsearch.n4.small

The specification of Kibana nodes.

kibanaDomain String es-cn-abc.kibana.elasticsearch.aliyuncs.com

The private network endpoint of the Kibana node.

kibanaPort Integer 5061

The port of the Kibana node.

masterConfiguration

The configuration of dedicated master nodes.

amount Integer 3

The number of dedicated master nodes.

disk Integer 20

The disk size per dedicated master node. Unit: GB.

diskType String cloud_ssd

The disk type of dedicated master nodes. cloud_ssd: standard SSD.

spec String elasticsearch.sn2ne.large

The specification of dedicated master nodes.

networkConfig

The network configuration.

type String vpc

The type of the network. Only VPC networks are supported.

vpcId String vpc-abc

The ID of the VPC network.

vsArea String cn-hangzhou-a

The zone where the instance is deployed.

vswitchId String vsw-abc

The ID of the VSwitch.

nodeAmount Integer 2

The number of data nodes.

nodeSpec

The configuration of data nodes.

disk Integer 40

The disk size per data node. Unit: GB.

diskType String cloud_ssd

The disk type of data nodes. cloud_ssd: standard SSD.

spec String elasticsearch.sn2ne.xlarge

The specification of data nodes.

paymentType String postpaid

The billing method of the instance. Valid values: prepaid (subscription) and postpaid (pay-as-you-go).

publicDomain String es-cn-abc.elasticsearch.aliyuncs.com

The public network endpoint of the instance.

publicPort Integer 8033

The public network port of the instance.

status String active

The status of the instance. Valid values: active (normal), activating (initializing), inactive (blocked), and invalid (expired).

synonymsDicts Array

The configuration of the synonym dictionaries.

synonymsDicts

The configuration of the synonym dictionary.

fileSize Long 100

The size of the synonym dictionary file. Unit: bytes.

name String dicts.txt

The name of the synonym dictionary file.

sourceType String ORIGIN

The source of the synonym dictionary file.

type String MAIN

The type of the synonym dictionary. Valid values: MAIN (main dictionary) and STOP (stopword list).

updatedAt String 2018-07-18T10:10:04.484Z

The time when the instance was last updated.

Examples

Sample requests

PUT /openapi/instances/[InstanceId] HTTP/1.1
Common request header
{
  "InstanceId": "es-cn-xxx"
}

Request body

Sample request body:
{
  "nodeSpec": {
      "disk": 40
    }
}

Sample success responses

XML format

<Result>
    <instanceId>es-cn-abc</instanceId>
    <domain>es-cn-abc.elasticsearch.aliyuncs.com</domain>
    <description>test</description>
    <nodeAmount>2</nodeAmount>
    <paymentType>postpaid</paymentType>
    <paymentInfo/>
    <status>active</status>
    <port>9200</port>
    <esVersion>5.5.3_with_X-Pack</esVersion>
    <esConfig>
        <action.destructive_requires_name>true</action.destructive_requires_name>
        <xpack.security.audit.outputs>logfile</xpack.security.audit.outputs>
        <xpack.watcher.enabled>false</xpack.watcher.enabled>
        <action.auto_create_index>+.*,-*</action.auto_create_index>
    </esConfig>
    <kibanaDomain>es-cn-abc.kibana.elasticsearch.aliyuncs.com</kibanaDomain>
    <publicDomain/>
    <enablePublic>false</enablePublic>
    <nodeSpec>
        <spec>elasticsearch.n4.small</spec>
        <disk>40</disk>
    </nodeSpec>
    <networkConfig>
        <vpcId>vpc-abc</vpcId>
        <vswitchId>vsw-abc</vswitchId>
        <vsArea>cn-hangzhou-b</vsArea>
        <type>vpc</type>
    </networkConfig>
    <createdAt>2018-07-20T06:20:18.665Z</createdAt>
    <updatedAt>2018-07-20T06:37:29.266Z</updatedAt>
    <inited>true</inited>
    <dedicateMaster>false</dedicateMaster>
    <commodityCode>elasticsearch</commodityCode>
    <endTime>4687776000000</endTime>
</Result>
<RequestId>9FCBC546-3868-44B8-A102-5493C8C5****</RequestId>

JSON format

{
	"Result":{
		"port":9200,
		"nodeAmount":2,
		"kibanaIPWhitelist":[],
		"esVersion":"5.5.3_with_X-Pack",
		"enablePublic":false,
		"endTime":4687776000000,
		"nodeSpec":{
			"spec":"elasticsearch.n4.small",
			"disk":40
		},
		"inited":true,
		"description":"test",
		"kibanaDomain":"es-cn-abc.kibana.elasticsearch.aliyuncs.com",
		"createdAt":"2018-07-20T06:20:18.665Z",
		"dictList":[],
		"domain":"es-cn-abc.elasticsearch.aliyuncs.com",
		"dedicateMaster":false,
		"publicIpWhitelist":[],
		"esConfig":{
			"xpack.watcher.enabled":"false",
			"action.destructive_requires_name":"true",
			"xpack.security.audit.outputs":"logfile",
			"action.auto_create_index":"+.*,-*"
		},
		"status":"active",
		"paymentType":"postpaid",
		"instanceId":"es-cn-abc",
		"esIPWhitelist":[],
		"updatedAt":"2018-07-20T06:37:29.266Z",
		"esIPBlacklist":[],
		"networkConfig":{
			"vpcId":"vpc-abc",
			"vswitchId":"vsw-abc",
			"vsArea":"cn-hangzhou-b",
			"type":"vpc"
		},
		"commodityCode":"elasticsearch"
	},
	"RequestId":"9FCBC546-3868-44B8-A102-5493C8C5****"
}

Error codes

HTTP status code Error code Error message Description
400 InstanceNotFound The instanceId provided does not exist The error message returned because the specified instance cannot be found. Please check the status of the instance.

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