Creates an Elasticsearch cluster.

Before you call the API operation, note that:

  • Make sure that you have read and understand the billing and pricing standards of Alibaba Cloud Elasticsearch.

    For more information, see Alibaba Cloud Elasticsearch pricing.

  • Before you create an instance, you must complete real-name verification.

    .

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 headers

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

Request syntax

POST /openapi/instances HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
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 it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

Object Body No

The request body parameters.

zoneCount Integer Body No 2

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

paymentType String Body No postpaid

The billing method of the instance. Valid values:

  • postpaid: pay-as-you-go
  • prepaid: subscription
paymentInfo PaymentInfo Body No

Payment details of subscription instances. Required when creating a prepaid instance.

nodeAmount Integer Body No 3

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

instanceCategory String Body No advanced

Version type. Valid values:

  • x-pack: Business Edition instance
  • advanced: Enhanced Edition instance
  • IS: Enable an Enhanced Edition instance of Indexing Service
  • community: Basic Edition instance
Note To create an instance of an enhanced version of OpenStore, you need to enable the Indexing Service at the same time.
esAdminPassword String Body No es_password

The access password of the instance. Three of the following characters are required: uppercase letters, lowercase letters, digits, and special characters:! @#$%^&*()_+-=, which must be 8 to 32 bits in length.

esVersion String Body No 5.5.3_with_X-Pack

The edition of the dedicated KMS instance. Valid values:

  • 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 versions listed above may not include all versions supported by the Elasticsearch instance. You can call the GetRegionConfiguration operation to view the actual supported versions.
nodeSpec NodeSpec Body No

The configuration of the data node.

masterConfiguration MasterNodeConfiguration Body No

The configuration of the dedicated master node.

warmNodeConfiguration WarmNodeConfiguration Body No

Configure the cold data node.

clientNodeConfiguration ClientNodeConfiguration Body No

Coordination node configuration.

elasticDataNodeConfiguration ElasticDataNodeConfiguration Body No

The configuration of the elastic node.

kibanaConfiguration KibanaNodeConfiguration Body No

The configuration of Kibana nodes.

networkConfig NetworkConfig Body No

The network configurations.

Note For a list of Alibaba Cloud Elasticsearch supported node specifications, see Alibaba Cloud Elasticsearch pricing information and product specifications.

The following example shows the request body parameters:

  • Create a general-purpose commercial edition instance that contains both cold 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 Series instance that contains 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 Series instance that contains only cold 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 Series instance that contains both cold 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 series instance, enable OpenStore storage, and contain both cold 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 series instance, enable OpenStore storage, and include hot and cold 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"
      }
    }
                        

Response parameters

Parameter Type Example Description
RequestId String 838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3

The ID of the request.

Result Object

The returned result.

instanceId String es-is-0u2ecp69tt****

The ID of the instance.

Examples

Sample requests

POST /openapi/instances?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

{
  "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"
  }
}

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<createInstanceResponse>
    <RequestId>838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3</RequestId>
    <Result>
        <instanceId>es-is-0u2ecp69tt****</instanceId>
    </Result>
</createInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3",
  "Result" : {
    "instanceId" : "es-is-0u2ecp69tt****"
  }
}

Error codes

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