You can call this operation to create an Elasticsearch instance.


  • Make sure that you have read and understand the billing and pricing standards of Alibaba Cloud Elasticsearch.
  • Make sure that your Alibaba Cloud account has passed real-name verification. For more information, see the corresponding real-name verification documentation.


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

POST /openapi/instances HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
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.

Response parameters

Parameter Type Example Description
RequestId String E9A685FC-8344-4765-A5A5-7B67CDD6BE2F

The ID of the request.

Result Struct

The returned result.

instanceId String es-cn-l99z2h20y9346****

The ID of the Elasticsearch instance.


Sample requests

POST /openapi/instances HTTP/1.1
Common request header

Sample success responses

XML format


JSON format

  "description": "es_java_sdk_cretest",
  "esAdminPassword": "<your_password>",
  "esVersion": "5.5.3_with_X-Pack",
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-bp16k1dvzxtmagcva****",
    "vsArea": "cn-hangzhou-i",
    "vswitchId": "vsw-bp1k4ec6s7sjdbudw****"
  "nodeAmount": 2,
  "nodeSpec": {
    "disk": 20,
    "spec": "elasticsearch.n4.small"
     "spec": "elasticsearch.n4.small",
      "amount": 1,
      "disk": 0
  "paymentType": "postpaid"

Error codes

HTTP status code Error code Error message Description
401 UserNotOpen Aliyun account is not open elasticsearch The error message returned because your account has not activated Alibaba Cloud Elasticsearch.
401 StsRoleAccountNoPermission Role account has no permission or expired The error message returned because your account role does not have the permission to create Elasticsearch instances or the authorization has expired. Please grant the required permission to the account role or update the authorization again.
401 SubAccountNoPermission Aliyun sub account has no permission, please authorize your sub account in Aliyun RAM The error message returned because the RAM user does not have the required permission. Please check the permissions of the RAM user.
401 UserUnauthorized Authentication required The error message returned because you are not authorized to perform the operation. Please log on to the console and check whether you have the required permission.

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