createInstance

Updated at:

Creates an Elasticsearch instance.

Operation description

Precautions

  • Before calling this operation, ensure that you fully understand the billing methods and pricing of Elasticsearch. For more information, see Billing rules of Alibaba Cloud Elasticsearch.

  • To create an instance, you must pass real-name verification. For more information, see Real-name verification.

  • You do not need to specify a zone when creating an instance. By default, the instance is deployed in the same zone as the selected VPC.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:CreateInstance

create

*Instance

acs:elasticsearch:{#regionId}:{#accountId}:instances/*

  • elasticsearch:DataNodeDiskEncryption
  • elasticsearch:WarmNodeDiskEncryption
None

Request syntax

POST /openapi/instances HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

clientToken

string

No

Ensures the idempotence of the request. The value is generated by the client and must be unique across different requests. The value can be up to 64 ASCII characters in length.

5A2CFF0E-5718-45B5-9D4D-70B3FF****

body

object

No

The request body parameters.

{ "description": "xpack-hot-cold", "nodeAmount": 2, "esVersion": "7.10_with_X-Pack", "instanceCategory": "x-pack", "nodeSpec": { "spec": "elasticsearch.sn2ne.xlarge", "disk": 20, "diskType": "cloud_ssd" }, "warmNodeConfiguration": { "spec": "elasticsearch.sn1ne.xlarge", "amount": 3, "diskType": "cloud_efficiency", "disk": 500 }, "networkConfig": { "type": "vpc", "vpcId": "vpc-8vbfu74bmw4m7m84a****", "vswitchId": "vsw-8vbnk6cmurbpump2f****", "vsArea": "cn-zhangjiakou-c" }, "paymentType": "postpaid", "esAdminPassword": "yourPassword", "kibanaConfiguration": { "spec": "elasticsearch.sn1ne.large" } }

clientNodeConfiguration ClientNodeConfiguration

No

The configuration of the client node.

description

string

No

The name of the instance.

es

elasticDataNodeConfiguration ElasticDataNodeConfiguration

No

The configuration of the elastic node.

esAdminPassword

string

Yes

The access password of the instance. The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include !@#$%^&*()_+-=.

Es_password

esVersion

string

Yes

The version of the instance. Valid values:

  • 8.5.1_with_X-Pack

  • 7.10_with_X-Pack

  • 6.7_with_X-Pack

  • 7.7_with_X-Pack

  • 6.8_with_X-Pack

  • 6.3_with_X-Pack

  • 5.6_with_X-Pack

  • 5.5.3_with_X-Pack

Note

The preceding versions may not include all versions supported by Elasticsearch instances. To view the actually supported versions, call the GetRegionConfiguration operation.

5.5.3_with_X-Pack

indexNodeConfiguration IndexNodeConfiguration

No

The configuration of the index node. This parameter is supported only for instances that use the AI engine.

instanceCategory

string

No

The edition type. Valid values:

  • x-pack: creates a Commercial Edition instance or an Advanced Edition instance with Indexing Service and OpenStore disabled.

  • IS: creates an Advanced Edition instance with Indexing Service or OpenStore enabled.

advanced

kibanaConfiguration KibanaNodeConfiguration

No

The configuration of the Kibana node.

Note

We strongly recommend that you enable the Kibana node.

masterConfiguration MasterNodeConfiguration

No

The configuration of the dedicated master node.

Note

In the China (Beijing), China (Shanghai), China (Hangzhou), and China (Shenzhen) regions, when you call the createInstance operation to create an instance with a next-generation cloud disk-based dedicated master node, you must specify the instance family with the .new suffix, such as elasticsearch.sn1ne.large.new.

networkConfig NetworkConfig

Yes

The network configuration.

Note

You cannot specify an IP address whitelist when creating an instance.

nodeAmount

integer

Yes

The number of data nodes. Valid values: 2 to 50.

3

nodeSpec NodeSpec

No

The configuration of the data node.

Note

In the China (Beijing), China (Shanghai), China (Hangzhou), and China (Shenzhen) regions, when you call the createInstance operation to create an instance with a next-generation cloud disk-based data node, you must specify the instance family with the .new suffix, such as elasticsearch.sn1ne.large.new.

paymentInfo PaymentInfo

No

The billing details of the subscription instance. This parameter is required when you create a subscription instance.

paymentType

string

No

The billing method. Valid values:

  • postpaid: pay-as-you-go billing method

  • prepaid: subscription

postpaid

resourceGroupId

string

No

The ID of the resource group to which the instance belongs.

rg-aekzu7tsu4n****

searchNodeConfiguration SearchNodeConfiguration

No

The configuration of the search node. This parameter is supported only for instances that use the AI engine.

tags

array<object>

No

The instance label group.

object

No

The instance label.

tagKey

string

No

The key of the tag.

KeyTest

tagValue

string

No

The value of the tag.

KeyValue

warmNodeConfiguration WarmNodeConfiguration

No

The configuration of the warm data node.

zoneCount

integer

No

The number of zones for the instance. Valid values: 1, 2, and 3. Default value: 1.

2

Note
  • The diskType parameter specifies the storage type of the node. This parameter is required for standard cloud disk specifications and optional for local disk specifications.

The following examples show the request body parameters:

  • Create a general-purpose Commercial Edition instance that includes both warm and hot nodes.

{
  "description": "xpack-hot-cold",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "x-pack",
  "nodeSpec": {
    "spec": "elasticsearch.sn2ne.xlarge",
    "disk": 20,
    "diskType": "cloud_ssd"
  },
  "warmNodeConfiguration": {
    "spec": "elasticsearch.sn1ne.xlarge",
    "amount": 3,
    "diskType": "cloud_efficiency",
    "disk": 500
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create an Indexing Service instance that includes only hot nodes.

{
  "description": "is-hot",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "IS",
  "nodeSpec": {
    "spec": "elasticsearch.sn1ne.xlarge",
    "disk": 20,
    "diskType": "cloud_ssd"
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create an Indexing Service instance that includes only warm nodes.

{
  "description": "is-cold",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "IS",
  "warmNodeConfiguration": {
    "spec": "group.c6.large.500",
    "amount": 3,
    "disk": 300
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create an Indexing Service instance that includes both warm and hot nodes.

{
  "description": "is-hot-cold",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "IS",
  "nodeSpec": {
    "spec": "elasticsearch.sn2ne.xlarge",
    "disk": 50,
    "diskType": "cloud_ssd"
  },
  "warmNodeConfiguration": {
    "spec": "group.c6.large.500",
    "amount": 3,
    "disk": 300
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create an Indexing Service instance with OpenStore enabled that includes both warm and hot nodes.

{
  "description": "os-1",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "IS",
  "nodeSpec": {
    "spec": "elasticsearch.sn2ne.xlarge",
    "disk": 50,
    "diskType": "cloud_ssd"
  },
  "warmNodeConfiguration": {
    "spec": "openstore.i2g.4xlarge",
    "amount": 3
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create an Indexing Service instance with OpenStore enabled that includes warm-hot shared nodes.

{
  "description": "os-2",
  "nodeAmount": 2,
  "esVersion": "7.10_with_X-Pack",
  "instanceCategory": "IS",
  "nodeSpec": {
    "spec": "openstore.i2g.4xlarge",
    "disk": 50,
    "diskType": "cloud_ssd"
  },
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-8vbfu74bmw4m7m84a****",
    "vswitchId": "vsw-8vbnk6cmurbpump2f****",
    "vsArea": "cn-zhangjiakou-c"
  },
  "paymentType": "postpaid",
  "esAdminPassword": "yourPassword",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn1ne.large"
  }
}
  • Create a general-purpose Commercial Edition instance of version 7.10 and enable auto-renewal.

Note

Set paymentType to prepaid to specify the subscription billing method. Auto-renewal is configured in the paymentInfo parameter.

{
 "description": "Auto-renewal",
 "nodeAmount": 3,
 "instanceCategory": "x-pack",
 "esVersion": "7.10_with_X-Pack",
 "nodeSpec": {
 "spec": "elasticsearch.sn2ne.xlarge",
 "disk": 50,
 "diskType": "cloud_ssd"
 },
 "kibanaConfiguration": {
 "spec": "elasticsearch.sn1ne.large"
 },
 "networkConfig": {
 "type": "vpc",
 "vpcId": "vpc-8vbfu74bmw4m7m84a****",
 "vswitchId": "vsw-8vbnk6cmurbpump2f****",
 "vsArea": "cn-zhangjiakou-c"
 },
 "paymentType": "prepaid",
 "paymentInfo": {
 "duration": 1,
 "pricingCycle": "Month",
 "isAutoRenew": true,
 "autoRenewDuration": 1
 },
 "esAdminPassword": "yourPassword"
}
  • Create a 9.X (Agent engine) instance.

Note

Note that the Elasticsearch version is 9.99. The Agent engine supports search nodes, index nodes, Kibana nodes, and master nodes. It does not support data nodes, warm nodes, or client nodes.

{
  "esAdminPassword": "******",
  "esVersion": "9.99",
  "indexNodeConfiguration": {
    "amount": 2,
    "disk": 200,
    "diskType": "cloud_essd",
    "performanceLevel": "PL0",
    "spec": "elasticsearch.turbo2.cae.large"
  },
  "instanceCategory": "x-pack",
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-****",
    "vsArea": "cn-hangzhou-k",
    "vswitchId": "vsw-***"
  },
  "nodeAmount": 0,
  "searchNodeConfiguration": {
    "amount": 2,
    "disk": 200,
    "diskType": "cloud_essd",
    "performanceLevel": "PL0",
    "spec": "elasticsearch.turbo2.cae.large"
  },
  "zoneCount": 1,
  "paymentType": "postpaid",
  "kibanaConfiguration": {
    "spec": "elasticsearch.sn2ne.large"
  }
}

Response elements

Element

Type

Description

Example

None defined.

Response parameters

NameTypeExampleDescription
RequestIdString838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3The request ID.
ResultobjectThe returned result.
└instanceIdstringes-is-0u2ecp69tt****The instance ID.

Examples

Success response

JSON format

{}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.