You can call this operation to create an Elasticsearch instance.

Note the following before calling the operation:

  • 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 the real-name authentication.

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 header

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

Request structure

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. 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.

RequestBody

Set the following parameters for the RequestBody:

Parameter

Type

Required

Example

Description

paymentType

String

Yes

postpaid

The billing method of the read-only ApsaraDB RDS for MySQL instance. Valid values: postpaid and prepaid.

period

Int

No

1

If the paymentType parameter is set to prepaid, you must specify the subscription period. Valid values: 1,2,3,4,5,6,7,8,9,12,24, and 36. Unit: month.

nodeAmount

int

Yes

3

The number of data nodes.

instanceCategory

String

No

advanced

Version type. advanced (advanced Edition) and x-pack (commercial edition) are supported. When you set the billing method to advanced, you must purchase Master nodes and CPFS shared storage.

esAdminPassword

String

Yes

es_password

The password of the Elasticsearch instance. Requirements: uppercase letters, lowercase letters, digits, and special characters. Valid values:&*()_+-=) and 8 to 32 characters.

esVersion

String

Yes

5.5.3_with_X-Pack

The version of the Elasticsearch instance. Valid values: 5.5.3 _with_X-Pack, 6.3 _with_X-Pack, and 6.7 _with_X-Pack.

nodeSpec

Map

Yes

The configuration of data nodes.

└spec

String

Yes

elasticsearch.sn2ne.xlarge

The name of the specification.

└disk

String

Yes

20

The disk size per data node. Unit: GB.

└diskType

String

Yes

cloud_ssd

The type of the hard disk. Valid values: cloud_ssd (standard SSD) and cloud_efficiency (ultra disk)

advancedDedicateMaster

Boolean

No

false

Specifies whether to create dedicated master nodes. This parameter is required if the master node is deployed in multiple zones.

masterConfiguration

Map

No

The configuration of dedicated master nodes. This parameter is required when advancedDedicateMaster is set to true.

└spec

String

Yes

elasticsearch.sn2ne.xlarge

The name of the specification.

└amount

int

Yes

3

Quantity, currently fixed to 3.

└disk

int

Yes

20

The disk size of the dedicated master node. Unit: GB. Currently, only 20GB is supported.

└diskType

String

Yse

cloud_ssd

The disk type of the dedicated master node. Currently, only cloud_ssd(SSD) is supported.

warmNode

Boolean

No

false

Whether to purchase warm nodes.

warmNodeConfiguration

Map

No

Configure warm nodes. This parameter is required when warmNode is set to true.

└spec

String

Yse

elasticsearch.ic5.large

The name of the specification.

└amount

Integer

Yes

env

The number of messages consumed.

└diskType

String

Yse

cloud_efficiency

The type of the disk.

└disk

Integer

Yes

500 GB

The size of the disk.

└diskEncryption

Boolean

No

true

Indicates whether the disk is encrypted.

haveClientNode

Boolean

No

false

Whether to purchase client nodes.

clientNodeConfiguration

Map

No

Client node configuration. This parameter is required when haveClientNode is set to true.

└spec

String

Yse

elasticsearch.ic5.large

The name of the specification.

└amount

Integer

Yes

env

The number of messages consumed.

└diskType

String

Yse

cloud_efficiency

The type of the disk.

└disk

Integer

Yes

20g

The size of the disk.

haveKibana

Boolean

No

true

Whether to purchase kibana nodes.

kibanaConfiguration

Map

No

The configuration of kibana nodes. This parameter is required when haveKibana is set to true.

└spec

String

Yes

elasticsearch.n4.small

The name of the specification.

└amount

Integer

Yes

1

Quantity, currently fixed to 1.

└disk

Integer

Yes

0

Storage size. Currently, the value is fixed to 0.

networkConfig

Map

Yes

The network configuration.

└type

String

Yse

VPC

The network type of the storage instance. Currently, only Virtual Private Cloud (VPC) is supported.

└vpcId

String

Yse

vpc-bp16k1dvzxtmagcva****

The ID of the VPC network.

└vsArea

String

Yse

cn-hangzhou-i

The ID of the zone to which the VSwitch belongs.

└vswitchId

String

Yse

vsw-bp1k4ec6s7sjdbudw****

The ID of the VSwitch associated with the specified VPC.

Note Optional represents a child parameter.

Example:


{
    "paymentType": "postpaid",
    "nodeAmount": "3",
    "instanceCategory": "x-pack",
    "esAdminPassword": "es_password",
    "esVersion": "6.7_with_X-Pack",
    "nodeSpec": {
        "spec": "elasticsearch.sn2ne.xlarge",
        "disk": "20",
        "diskType": "cloud_ssd"     
    },
    "networkConfig": {
        "type": "vpc",
        "vpcId": "vpc-bp16k1dvzxtmagcva****",
        "vsArea": "cn-hangzhou-i",
        "vswitchId": "vsw-bp1k4ec6s7sjdbudw****"
    }
}
            

Response parameters

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

The ID of the request.

Result Struct

The returned results.

instanceId String es-cn-t57p81n7ai89v****

An array that consists of instance IDs.

Examples

Sample requests

POST /openapi/instances HTTP/1.1
Common request header

Sample success responses

XML format

<Result>
    <instanceId>es-cn-t57p81n7ai89v****</instanceId>
</Result>
<RequestId>838D9D11-8EEF-46D8-BF0D-BC8FC2B0****</RequestId>

JSON format

{
    "Result": {
        "instanceId": "es-cn-t57p81n7ai89v****"
    },
    "RequestId": "838D9D11-8EEF-46D8-BF0D-BC8FC2B0****"
}

Error codes

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