Creates a Logstash cluster.

Before you call the API operation, note that:

  • Make sure that you have fully understood the payment method and price of Logstash before you call 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****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Object Body No

The body of the HTTP request.

paymentType String Body No prepaid

The billing method of the instance. Default value: no. Valid values:

  • prepaid: subscription
  • postpaid: pay-as-you-go
version String Body No 6.7.0_with_X-Pack

The version of the read-only instance. Default value: no. Valid values:

  • 6.7_with_X-Pack
  • 7.4_with_X-Pack
nodeAmount Integer Body No 2

The number of nodes that the instance contains.

nodeSpec Object Body No

The configuration of data nodes.

disk Long Body No 50

The disk size of the node.

diskType String Body No cloud_ssd

The disk type of the node. Default value: no. Valid values:

  • cloud_ssd
  • cloud_efficiency
spec String Body No logstash.n4.small

The instance type of the node.

networkConfig Object Body No

The network configurations.

type String Body No vpc

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

vpcId String Body No vpc-bp16k1dvzxtmagcva****

The VPC ID of the instance.

vswitchId String Body No vsw-bp1k4ec6s7sjdbudw****

The ID of the vSwitch

vsArea String Body No cn-hangzhou-i

The zone where the cluster resides.

paymentInfo Object Body No

The payment details of a subscription instance. This parameter is required when you create a subscription instance.

duration Long Body No 1

The purchase duration. Monthly and yearly purchases are supported. Unit: 1 to September, 1 to 3 years.

pricingCycle String Body No Month

The unit of subscription. Valid values:

  • Year
  • Month
isAutoRenew Boolean Body No false

Indicates whether auto-renewal is enabled. Valid values:

  • true: The job files are decompressed.
  • false: no
autoRenewDuration Long Body No 3

The auto-renewal period. Unit: month. This parameter is required if the isAutoRenew parameter is set to true. The optional range of parameter values is the same as that on the Sales page.

description String Body No ls-cn-abc

The name of the instance.

Response parameters

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

The ID of the request.

Result Logstash

The returned results.

Example

Sample requests

POST /openapi/logstashes?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

{
  "paymentType" : "prepaid",
  "version" : "6.7.0_with_X-Pack",
  "nodeAmount" : 2,
  "nodeSpec" : {
    "disk" : 50,
    "diskType" : "cloud_ssd",
    "spec" : "elasticsearch.sn2ne.large"
  },
  "networkConfig" : {
    "type" : "vpc",
    "vpcId" : "vpc-bp16k1dvzxtmagcva****",
    "vswitchId" : "vsw-bp1k4ec6s7sjdbudw****",
    "vsArea" : "cn-hangzhou-i"
  },
  "description" : "test"
}

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE*****",
  "Result" : [ {
    "instanceId" : "ls-cn-n6w1o5jq****",
    "version" : "6.7.0_with_X-Pack",
    "description" : "test",
    "nodeAmount" : 1,
    "paymentType" : "postpaid",
    "status" : "active",
    "enablePublic" : false,
    "nodeSpec" : {
      "spec" : "elasticsearch.sn1ne.large",
      "disk" : 20,
      "diskType" : "cloud_ssd"
    },
    "networkConfig" : {
      "vpcId" : "vpc-bp16k1dvzxtmagcva****",
      "vswitchId" : "vsw-bp1k4ec6s7sjdbudw****",
      "vsArea" : "cn-hangzhou-i",
      "type" : "vpc"
    },
    "createdAt" : "2020-05-27T01:30:15.947Z",
    "updatedAt" : "2020-05-27T01:40:51.333Z",
    "commodityCode" : "elasticsearch_logstash_post",
    "extendConfigs" : [ ],
    "endTime" : 4746268800000,
    "clusterTasks" : [ ],
    "resourceGroupId" : "rg-acfm2h5vbzd****",
    "zoneCount" : 1,
    "protocol" : "HTTP",
    "zoneInfos" : [ {
      "zoneId" : "cn-hangzhou-i",
      "status" : "NORMAL"
    } ],
    "instanceType" : "logstash",
    "inited" : true,
    "tags" : [ ],
    "config" : { },
    "endpointList" : [ {
      "host" : "172.16.**.**",
      "port" : 9600,
      "zoneId" : "cn-hangzhou-i"
    } ]
  } ]
}

Error codes

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