Call CreateLogstash to create a Logstash instance.

Before you call an interface, note the following:

  • Make sure that you fully understand the payment methods and prices of Logstash before calling this operation.

  • 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

POST /openapi/logstashes

Request syntax

POST /openapi/logstashes HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
clientToken String Query No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

This parameter 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 contain only ASCII characters and cannot exceed 64 characters in length.

RequestBody

Enter the following parameters in RequestBody to specify the information of the Logstash instance to be created.

Parameter

Type

Example

Description

paymentType

String

prepaid

The payment mode of the instance. Valid values: prepaid (subscription) and postpaid (pay-as-you-go).

version

String

6.7.0_with_X-Pack

The version of the instance. Currently, only 6.7_with_X-Pack and 7.4_with_X-Pack are supported.

nodeAmount

Integer

2

The number of nodes in the instance.

nodeSpec

Struct

The configuration of the data node.

└disk

Integer

50

The disk size of a node.

└diskType

String

cloud_ssd

The disk type for the instance. Value Options: cloud_ssd and cloud_efficiency.

└spec

String

elasticsearch.sn2ne.large

The specifications of the instance.

networkConfig

Struct

The network configurations.

└type

String

vpc

The type of the network. Currently, only Virtual Private Cloud is supported.

└vpcId

String

vpc-bp16k1dvzxtmagcva****

The ID of the VPC.

└vswitchId

String

vsw-bp1k4ec6s7sjdbudw****

The ID of the vSwitch.

└vsArea

String

cn-hangzhou-i

The zone where the cluster resides.

Note └ indicates a child parameter.

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE*****

The ID of the request.

Result Struct

The return results.

instanceId String ls-cn-n6w1o5jq****

The ID of the instance.

Examples

Sample requests

https://elasticsearch.cn-hangzhou.aliyuncs.com/openapi/logstashes
common request header
{
  "paymentType": "postpaid",
  "version": "6.7_with_X-Pack",
  "nodeAmount": "2",
  "networkConfig": {
    "type": "vpc",
    "vpcId": "vpc-bp16k1dvzxtmagcva****",
    "vsArea": "cn-hangzhou-i",
    "vswitchId": "vsw-bp1k4ec6s7sjdbudw****"
  },
  "nodeSpec": {
    "disk": "20",
    "spec": "elasticsearch.sn1ne.large",
    "diskType": "cloud_ssd"
  }
}

Sample success responses

JSON format

{
  "Result": {
    "instanceId": "ls-cn-7g1umu96oit2e****"
  },
  "RequestId": "2E6C4DA1-F8E4-4C64-8F07-6D03D6D7553D"
}

Error code

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