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 uses only common request headers. For more information, refer to the documentation of common request parameters.

Request syntax

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

Request parameters

Parameter Type Position Required Example Message
InstanceId String Path Yes ls-cn-oew1qbgl****

The ID of the Logstash instance.

trigger Boolean Query No false

Whether to save and deploy the pipeline. Valid values:

  • true: Save and deploy
  • false: saves only the data. This is the default value.
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 ensure that the value 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 parameter that specifies the pipeline information. For more information, see logstash.yml.

pipelineId String Body Yes pipeline-test

The ID of the MPS queue to which the analysis job is submitted.

description String Body No this is a test

The description of the pipeline.

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

The specific configuration of the pipeline.

workers Integer Body No 2

The number of pipeline workers. The default value of this parameter is the number of vCPUs.

batchSize Integer Body No 125

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

batchDelay Integer Body No 50

Pipeline batch delay. Unit: milliseconds. Default value: 50.

queueType String Body No MEMORY

The type of the queue. Valid values:

  • MEMORY: a traditional memory-based queue.
  • PERSISTED: disk-based ACKed queue (persistent queue).
queueMaxBytes Integer Body No 1024

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

queueCheckPointWrites Integer Body No 1024

Number of queue checkpoint writes. Default value: 1024

Response parameters

Parameter Type Example Message
Result Boolean true

Indicates whether the pipeline is created. Valor:

  • true: The task is created.
  • false: The instance failed to be created.
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The ID of the request.

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 Code

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