All Products
Search
Document Center

Elasticsearch:CreatePipelines

Last Updated:Feb 10, 2025

Creates a pipeline in a Logstash cluster.

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

This operation does not have operation-specific request headers and uses only common request headers. For more information, see the "Common request headers" section of the "Common parameters" topic.

Request syntax

POST /openapi/logstashes/{InstanceId}/pipelines HTTP/1.1

Request parameters

Parameter Type Location Required Example Description
InstanceId String Path Yes ls-cn-oew1qbgl****

The ID of the Logstash cluster.

trigger Boolean Query No false

Specifies whether to save the settings and deploy the pipeline. Valid values:

  • true: saves the settings and deploys the pipeline.
  • false (default): saves the settings only.
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 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.

Array Body No

The request body parameters that are used to specify the information about the pipeline. For more information, see logstash.yml.

pipelineId String Body Yes pipeline-test

The ID of the pipeline.

description String Body No this is a test

The description of the pipeline.

config String Body Yes input { } filter { } output { }

The configurations of the pipeline.

workers Integer Body No 2

The number of worker threads for the pipeline. The default value of this parameter is the number of vCPUs.

batchSize Integer Body No 125

The batch size of the pipeline. Default value: 125.

batchDelay Integer Body No 50

The batch delay of the pipeline. Default value: 50. Unit: milliseconds.

queueType String Body No MEMORY

The type of queue. Valid values:

  • MEMORY: traditional memory-based queue.
  • PERSISTED: disk-based ACKed queue, which is a persistent queue.
queueMaxBytes Integer Body No 1024

The total capacity of the queue. Default value: 1024. Unit: MB.

queueCheckPointWrites Integer Body No 1024

The number of queue checkpoint writes. Default value: 1024.

Response parameters

Parameter Type Example Description
Result Boolean true

Indicates whether the pipeline is created. Valid values:

  • true
  • false
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The request ID.

Examples

Sample requests

POST /openapi/logstashes/ls-cn-oew1qbgl****/pipelines?trigger=false&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

[ {
  "pipelineId" : "pipeline-test",
  "description" : "this is a test",
  "config" : "input { } filter { } output { }",
  "workers" : 2,
  "batchSize" : 125,
  "batchDelay" : 50,
  "queueType" : "MEMORY",
  "queueMaxBytes" : 1024,
  "queueCheckPointWrites" : 1024
} ]

Sample success responses

JSON format

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

{
  "Result" : true,
  "RequestId" : "732A60FB-1899-4466-83D2-E96DA455****"
}

Error codes

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