Alibaba Cloud Elasticsearch offers a powerful and flexible solution for managing and analyzing vast amounts of data in real-time. This tutorial will guide you through the process of creating an Elasticsearch instance, from understanding the prerequisites to executing API requests.
Before delving into the technical details of creating an Elasticsearch instance, ensure that:
The createInstance
operation does not require operation-specific headers but uses common request headers. For more information, see Common Request Headers.
The base syntax for creating an instance is as follows:
POST /openapi/instances HTTP/1.1
Below are some essential parameters you'll need for the request:
Parameter | Type | Required | Description |
---|---|---|---|
clientToken | String | No | Unique token to ensure idempotence of the request. |
nodeAmount | Integer | Yes | The number of data nodes. Valid values: 2 to 50. |
instanceCategory | String | No | Type of instance, e.g., advanced. |
esAdminPassword | String | Yes | Password for accessing the cluster, must be 8 to 32 characters long and include at least three types of characters. |
esVersion | String | Yes | Version of the Elasticsearch instance. |
networkConfig | NetworkConfig | Yes | The network configurations. |
paymentType | String | No | Billing method, either postpaid or prepaid . |
description | String | No | The name or description of the instance. |
nodeSpec | NodeSpec | No | Configurations of data nodes. Example: {"spec":"elasticsearch.sn2ne.xlarge", "disk":50, "diskType":"cloud_ssd"} . |
warmNodeConfig | WarmNodeConfig | No | Configurations of warm nodes. |
kibanaConfig | KibanaNodeConfig | No | Configurations of Kibana nodes' settings. |
For a detailed list of parameters, refer to the Full API Documentation.
{
"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"
}
}
{
"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"
}
}
Upon successful execution, the response will include:
RequestId
: A unique ID for the request.Result.instanceId
: The ID of the created Elasticsearch instance.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>
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId": "838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3",
"Result": {
"instanceId": "es-is-0u2ecp69tt****"
}
}
Creating an Elasticsearch instance on Alibaba Cloud is a streamlined process, ensuring that you can efficiently manage and scale your data analytics capabilities. By following the guidelines and examples provided in this article, you should be well-equipped to get started.
Ready to start your journey with Elasticsearch on Alibaba Cloud? Explore our tailored Cloud solutions and services to take the first step towards transforming your data into a visual masterpiece.
Click here to embark on Your 30-Day Free Trialn
Mastering Elasticsearch with Java Low Level REST Client (5.x)
Mastering Elasticsearch on Alibaba Cloud: Configuration and Troubleshooting Tips
Data Geek - July 10, 2024
Data Geek - June 5, 2024
Data Geek - July 23, 2024
Data Geek - July 25, 2024
Data Geek - July 2, 2024
Alibaba Cloud Community - April 15, 2024
Alibaba Cloud Elasticsearch helps users easy to build AI-powered search applications seamlessly integrated with large language models, and featuring for the enterprise: robust access control, security monitoring, and automatic updates.
Learn MoreAlibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.
Learn MoreFully managed, locally deployed Alibaba Cloud infrastructure and services with consistent user experience and management APIs with Alibaba Cloud public cloud.
Learn MoreMore Posts by Data Geek
Santhakumar Munuswamy August 5, 2024 at 6:56 am
Thanks for the sharing