CreateApp
To create an Elasticsearch Serverless application, call the CreateApp API.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
es-serverless:CreateApp |
create |
*All Resource
|
None | None |
Request syntax
POST /openapi/es-serverless/instances HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| appName |
string |
Yes |
The application name. |
test |
| description |
string |
No |
The application description. |
test |
| network |
array<object> |
No |
The public network settings. |
|
|
array<object> |
No |
The public network configuration. |
||
| type |
string |
No |
The type of the IP whitelist. Valid values:
|
PUBLIC_ES |
| enabled |
boolean |
No |
Specifies whether to enable public access. |
true |
| domain |
string |
No |
The domain name. |
test-123.serverless.cn-hangzhou.elasticsearch.aliyuncs.com |
| port |
integer |
No |
The port. |
9200 |
| whiteIpGroup |
array<object> |
No |
The list of IP whitelist groups. |
|
|
object |
No |
An IP whitelist group. |
||
| groupName |
string |
No |
The name of the IP whitelist group. This parameter is required if you specify the |
default |
| ips |
array |
No |
The IP addresses in the whitelist group. |
|
|
string |
No |
An IP address or a CIDR block. |
127.0.0.1 |
|
| authentication |
object |
Yes |
The authentication settings. |
|
| basicAuth |
array<object> |
No |
The basic authentication settings. |
|
|
object |
No |
The credentials for basic authentication. |
||
| username |
string |
No |
The username. This parameter is not configurable. The system automatically uses the application ID as the username. |
test-123 |
| password |
string |
No |
The password. |
****** |
| regionId |
string |
No |
The region where the application is deployed. |
cn-hangzhou |
| version |
string |
No |
The application version. Currently, you can create only Elasticsearch 8.17 applications. |
8.17 |
| chargeType |
string |
Yes |
The billing method. Only Pay-As-You-Go ( |
POSTPAY |
| quotaInfo |
object |
No |
The quota settings. |
|
| cu |
integer |
No |
(Deprecated) The upper limit of Capacity Units (CUs) for a single application. |
6 |
| storage |
integer |
No |
The maximum index storage space for the application, in GB. This value is automatically determined by the |
24 |
| appType |
string |
No |
The application type. Valid value:
|
STANDARD |
| minCu |
integer |
No |
The minimum number of CUs. For a Search-enhanced application, valid values are 2, 4, 6, 8, and 16. |
2 |
| elastic |
boolean |
No |
Specifies whether to enable autoscaling.
|
true |
| privateNetwork |
array<object> |
No |
The private network settings. |
|
|
array<object> |
No |
The private network configuration. |
||
| type |
string |
No |
The type of the IP whitelist. Valid values:
|
PRIVATE_ES |
| enabled |
boolean |
No |
Specifies whether to enable private access. |
true |
| whiteIpGroup |
array<object> |
No |
The list of IP whitelist groups. |
|
|
object |
No |
An IP whitelist group. |
||
| groupName |
string |
No |
The name of the IP whitelist group. This parameter is required if you specify the |
default |
| ips |
array |
No |
The IP addresses in the whitelist group. |
|
|
string |
No |
An IP address or a CIDR block. |
127.0.0.1 |
|
| vpcId |
string |
No |
The ID of the Virtual Private Cloud (VPC) to which the endpoint belongs. |
vpc-bp1jy348ibzulk6hn**** |
| pvlEndpointId |
string |
No |
The endpoint ID. |
ep-bp1id41dd116e52e**** |
| scenario |
string |
No |
The application scenario. Valid value:
|
GENERAL |
| tags |
array<object> |
No |
The tags to add to the application. |
|
|
object |
No |
A tag. |
||
| key |
string |
No |
The tag key. |
|
| value |
string |
No |
The tag value. |
|
| dryRun |
boolean |
No |
Specifies whether to perform a dry run. The default value is false.
|
false |
| clientToken |
string |
No |
A client token to ensure request idempotence. You must ensure that the token is unique for each request. The token must be an ASCII string with a maximum length of 64 characters. |
00000000-0000-4000-8000-000000000001 |
The following is an example of a complete request body for creating an application:
{
"appName": "esserverlesstest",
"description": "test",
"network": [
{
"type": "PUBLIC_ES",
"enabled": true,
"whiteIpGroup": [
{
"groupName": "test",
"ips": [
"127.0.0.1"
]
}
]
}
],
"authentication": {
"basicAuth": [
{
"password": "Admin113"
}
]
},
"version": "8.17",
"chargeType": "POSTPAY",
"quotaInfo": {
"appType": "STANDARD",
"minCu": 2,
"elastic": true
},
"scenario": "GENERAL"
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The structure of the response body. |
||
| requestId |
string |
The request ID. |
2C5DAA30-****-5181-9B87-9D6181016197 |
| result |
object |
The result. |
|
| instaneId |
string |
The ID of the application instance. |
es-serverless-cn-xxx |
| appId |
string |
demo-search-a1b |
Examples
Success response
JSON format
{
"requestId": "2C5DAA30-****-5181-9B87-9D6181016197",
"result": {
"instaneId": "es-serverless-cn-xxx",
"appId": "demo-search-a1b"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.