All Products
Search
Document Center

Elasticsearch:CreateLogstash

Last Updated:Jul 02, 2024

Creates a Logstash cluster.

Before you call this operation, take note of the following information:

  • You fully understand the billing methods and pricing of Logstash.
  • You have passed 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****

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

Object Body Yes

The request parameters.

paymentType String Body No prepaid

The billing method of the cluster. Valid values:

  • prepaid: subscription
  • postpaid: pay-as-you-go
version String Body Yes 6.7_with_X-Pack

The version of the instance. Valid values:

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

The number of nodes in the cluster.

nodeSpec Object Body Yes

The configurations of data nodes.

disk Long Body No 50

The disk size per node. Unit: GB.

diskType String Body No cloud_ssd

The disk type. Valid values:

  • cloud_ssd
  • cloud_efficiency
spec String Body Yes elasticsearch.ic5.2xlarge

The specification category. For more information, see Product specifications.

networkConfig Object Body Yes

The network configurations.

type String Body No vpc

The network type. Set the value to vpc.

vpcId String Body Yes vpc-bp16k1dvzxtmagcva****

The VPC ID.

vswitchId String Body Yes vsw-bp1k4ec6s7sjdbudw****

The vSwitch ID.

vsArea String Body Yes cn-hangzhou-i

Select a zone for the NLB instance.

paymentInfo Object Body No

The billing details. This parameter is required when you create a subscription cluster.

duration Long Body No 1

The subscription duration. Unit: 1~9 months, 1~3 years.

pricingCycle String Body No Month

The subscription unit. Valid values:

  • Year
  • Month
isAutoRenew Boolean Body No false

Indicates whether auto-renewal is enabled. Valid values:

  • true
  • false
autoRenewDuration Long Body No 3

The auto-renewal duration. Unit: month. This parameter is required when isAutoRenew is set to true. The value range is the same as that on the buy page.

description String Body No ls-cn-abc

The name of the cloud phone.

resourceGroupId String Body No rg-acfmxxkk2p7****

The ID of the resource group to which the new ECS instance belongs.

Response parameters

Parameter

Type

Sample value

Description

RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE*****

The request ID.

Result Logstash

The response parameters.

Examples

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_with_X-Pack",
  "nodeAmount" : 2,
  "nodeSpec" : {
    "disk" : 50,
    "diskType" : "cloud_ssd",
    "spec" : "logstash.n4.small"
  },
  "networkConfig" : {
    "type" : "vpc",
    "vpcId" : "vpc-bp16k1dvzxtmagcva****",
    "vswitchId" : "vsw-bp1k4ec6s7sjdbudw****",
    "vsArea" : "cn-hangzhou-i"
  },
  "paymentInfo" : {
    "duration" : 1,
    "pricingCycle" : "Month",
    "isAutoRenew" : false,
    "autoRenewDuration" : 3
  },
  "description" : "ls-cn-abc"
}

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_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 code

For a list of error codes, see Service error codes.