You can call this operation to change the cluster configuration.

When you call this operation, take note of the following items:

  • If the instance is in the active (activating), invalid (invalid), and inactive (inactive) state, the configuration cannot be changed.
  • You can change the configurations of only one type of node (data node, dedicated master node, cold data node, coordination node, Kibana node, and elastic node) at a time. For more information, see Upgrade a cluster.
  • For the sake of the health and stability of your cluster, since May 2021, the sales features of the 1-core 2 GB specification, 2-core 2 GB specification for dedicated master nodes, and 7.4 version instances have been Alibaba Cloud Elasticsearch disabled. If you have confirmed that the purchased specifications no longer support sales, you need to complete the following operations first:
    • For the above 1-core 2 GB and 2-core 2 GB specifications, we recommend that you upgrade them to the stable sales specifications open on the buy page in advance. For more information about the specifications available on the buy page, see Purchase page parameters.
    • For 7.4 versions, we recommend that you purchase an instance of the 7.10 version again and then migrate data.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request parameters

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

Request syntax

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

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes es-cn-n6w1ptcb30009****

The ID of the instance.

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

This parameter is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ignoreStatus Boolean Query No true

Whether to ignore the cluster status when you change the cluster configuration:

  • true
  • false
orderActionType String Query No upgrade

The type of the configuration change. Valid values:

  • downgrade: downgrade
  • upgrade: upgrade

RequestBody

You also need to specify the change items in the RequestBody. Example:


{
  "nodeSpec": {
      "disk": 40
    }
}
            

Response parameters

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

The ID of the request.

Result Struct

The returned results.

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 of DictList

The configuration of the IK dictionary.

fileSize Long 1000

The size of the dictionary file. Unit: bytes.

name String test.dic

The name of the dictionary file.

sourceType String ORIGIN

The source type of the dictionary file.

type String MAIN

The type of the IK dictionary. Valid values:

  • STOP: stop word
  • MAIN: main dictionary
  • SYNONYMS: Synonym Dictionary
  • ALI_WS: Alibaba Dictionary
domain String es-cn-abc.elasticsearch.aliyuncs.com

The private domain name 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 Elasticsearch instance.

kibanaConfiguration Struct

The configuration of Kibana nodes.

amount Integer 1

The number of DRDS server nodes.

disk Integer 20

The size of the node storage space.

diskType String cloud_ssd

The storage type of the node. This parameter can be ignored.

spec String elasticsearch.n4.small

The specification of data nodes.

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

Kibana private network access domain name.

kibanaPort Integer 5061

The Kibana port.

masterConfiguration Struct

The configuration of dedicated master nodes.

amount Integer 3

The number of cores.

disk Integer 20

The storage space of the node. Unit: GB.

diskType String cloud_ssd

The storage type of the node. Only cloud_ssd(SSD) is supported.

spec String elasticsearch.sn2ne.large

The node specification.

networkConfig Struct

The network configuration.

type String vpc

The network type. Only Virtual Private Cloud (VPC) is supported.

vpcId String vpc-abc

The ID of the virtual private cloud (VPC).

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 Struct

The configuration of data nodes.

disk Integer 40

The storage space of the node. Unit: GB.

diskType String cloud_ssd

The storage type of the node. Valid values:

  • cloud_ssd: SSD.
  • cloud_efficiency: ultra disk.
spec String elasticsearch.sn2ne.xlarge

The specification of data nodes.

paymentType String postpaid

The billing method of the instance. Valid values:

  • prepaid: subscription
  • postpaid: pay-as-you-go
publicDomain String es-cn-abc.elasticsearch.aliyuncs.com

The Internet access domain name of the instance.

publicPort Integer 8033

The public access port of the instance.

status String active

The status of the instance. Valid values:

  • active: normal
  • activating: taking effect
  • inactive: frozen
  • invalid: invalid
synonymsDicts Array of SynonymsDicts

The configuration of the synonym dictionary.

fileSize Long 100

The size of the dictionary file. Unit: bytes.

name String dicts.txt

The name of the dictionary file.

sourceType String ORIGIN

The source of the synonym dictionary file.

type String MAIN

The type of the dictionary file. Valid values:

  • STOP: stop word
  • MAIN: main dictionary
  • SYNONYMS: Synonym Dictionary
  • ALI_WS: Alibaba Dictionary
updatedAt String 2018-07-18T10:10:04.484Z

The time when the instance was last updated.

Note In the following return example, this article only guarantees that the parameters in the return data list are included, and the parameters not mentioned are for reference only. The program cannot force to rely on obtaining these parameters.

Examples

Sample requests

PUT /openapi/instances/es-cn-n6w1ptcb30009**** HTTP/1.1
Common request headers
{
  "nodeSpec": {
      "disk": 40
    }
}

Sample success responses

JSON format

{
    "Result": {
        "instanceId": "es-cn-n6w1ptcb30009****",
        "version": "5.5.3_with_X-Pack",
        "description": "es-cn-n6w1ptcb30009****",
        "nodeAmount": 3,
        "paymentType": "postpaid",
        "status": "active",
        "privateNetworkIpWhiteList": [
            "0.0.0.0/0"
        ],
        "enablePublic": true,
        "nodeSpec": {
            "spec": "elasticsearch.n4.small",
            "disk": 40,
            "diskType": "cloud_ssd",
            "diskEncryption": false
        },
        "networkConfig": {
            "vpcId": "vpc-bp16k1dvzxtmagcva****",
            "vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
            "vsArea": "cn-hangzhou-i",
            "type": "vpc"
        },
        "createdAt": "2020-06-28T08:25:52.895Z",
        "updatedAt": "2020-06-28T08:25:52.895Z",
        "commodityCode": "elasticsearch",
        "extendConfigs": [
            {
                "configType": "usageScenario",
                "value": "general"
            },
            {
                "configType": "maintainTime",
                "maintainStartTime": "02:00Z",
                "maintainEndTime": "06:00Z"
            }
        ],
        "endTime": 4749033600000,
        "clusterTasks": [],
        "vpcInstanceId": "es-cn-n6w1ptcb30009****-worker",
        "resourceGroupId": "rg-acfm2h5vbzd****",
        "zoneCount": 1,
        "protocol": "HTTP",
        "zoneInfos": [
            {
                "zoneId": "cn-hangzhou-i",
                "status": "NORMAL"
            }
        ],
        "instanceType": "elasticsearch",
        "inited": true,
        "tags": [],
        "domain": "es-cn-n6w1ptcb30009****.elasticsearch.aliyuncs.com",
        "port": 9200,
        "esVersion": "5.5.3_with_X-Pack",
        "esConfig": {
            "action.destructive_requires_name": "true",
            "xpack.security.audit.outputs": "index",
            "xpack.watcher.enabled": "false",
            "xpack.security.audit.enabled": "false",
            "action.auto_create_index": "true"
        },
        "esIPWhitelist": [
            "0.0.0.0/0"
        ],
        "esIPBlacklist": [],
        "kibanaIPWhitelist": [
            "0.0.0.0/0",
            "::/0"
        ],
        "kibanaPrivateIPWhitelist": [],
        "publicIpWhitelist": [
            "::1",
            "0.0.0.0/0"
        ],
        "kibanaDomain": "es-cn-n6w1ptcb30009****.kibana.elasticsearch.aliyuncs.com",
        "kibanaPort": 5601,
        "publicPort": 9200,
        "publicDomain": "es-cn-n6w1ptcb30009****.public.elasticsearch.aliyuncs.com",
        "haveKibana": true,
        "instanceCategory": "x-pack",
        "dedicateMaster": false,
        "advancedDedicateMaster": false,
        "masterConfiguration": {},
        "haveClientNode": false,
        "warmNode": false,
        "warmNodeConfiguration": {},
        "clientNodeConfiguration": {},
        "kibanaConfiguration": {
            "spec": "elasticsearch.n4.small",
            "amount": 1,
            "disk": 0
        },
        "dictList": [
            {
                "name": "SYSTEM_MAIN.dic",
                "fileSize": 3058510,
                "sourceType": "ORIGIN",
                "type": "MAIN"
            },
            {
                "name": "SYSTEM_STOPWORD.dic",
                "fileSize": 164,
                "sourceType": "ORIGIN",
                "type": "STOP"
            }
        ],
        "synonymsDicts": [],
        "ikHotDicts": [],
        "aliwsDicts": [],
        "haveGrafana": false,
        "haveCerebro": false,
        "enableKibanaPublicNetwork": true,
        "enableKibanaPrivateNetwork": false,
        "advancedSetting": {
            "gcName": "CMS"
        }
    },
    "RequestId": "B5246080-9C30-4B6A-8F8A-8C705405****"
}

Error codes

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