createInstance
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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:CreateInstance |
create |
*Instance
|
|
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:
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:
|
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 |
|
| 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 |
|
| 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 |
| 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 |
For the list of node specifications supported by Alibaba Cloud Elasticsearch, go to the Alibaba Cloud Elasticsearch console.
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.
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 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
| Name | Type | Example | Description |
| RequestId | String | 838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3 | The request ID. |
| Result | object | The returned result. | |
| └instanceId | string | es-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.