Updates a pipeline of 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, see Common request headers.

Request syntax

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

Request parameters

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

The ID of the Logstash cluster.

trigger Boolean Query None false

Specifies whether to deploy the application immediately after it is created.

clientToken String Query None 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.

String Body None [ { "pipelineId": "test", "config": "input {\n\n}\nfilter {\n\n}\noutput {\n \n}" } ]

Specifies the updated pipeline information.

RequestBody

You must also enter a pipeline array in the JSON format in the RequestBody parameter to specify the updated pipeline information.

Parameter

Type

Required

Example

Description

pipelineId

String

Yes

pipeline-test

The ID of the pipeline to be updated.

description

String

None

this is a test

The description of the pipeline.

config

String

Yes

input { } filter { } output { }

The configurations of the pipeline.

workers

Integer

No.

2

The number of worker threads for the pipeline.

batchSize

Integer

No.

125

The batch size of the pipeline.

batchDelay

Integer

No.

50

The batch delay of the pipeline. Unit: milliseconds.

queueType

String

None

MEMORY

The type of the queue. MEMORY and PERSISTED are supported.

pipelineStatus

String

None

RUNNING

The status of the pipeline. This parameter is required when the trigger parameter is set to true. Valid values: NOT_DEPLOYED, RUNNING, and DELETED.

queueMaxBytes

Integer

No.

1024

The maximum number of bytes in a queue.

queueCheckPointWrites

Integer

No.

1024

The number of queue checkpoint writes.

Sample statement:


[
    {
        "pipelineId": "test",
        "config": "input {\n\n}\nfilter {\n\n}\noutput {\n \n}"
    }
]

Response parameters

Parameter Type Example Description
Result Boolean true

Returned result:

  • true: The update was successful.
  • false: The update failed.
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The request ID.

Examples

Sample requests

PUT /openapi/logstashes/ls-cn-oew1qbgl****/pipelines?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF****&trigger=false HTTP/1.1
Common request parameters
[
{"pipelineId":"test", "config":"input {\n\n}\nfilter {\n\n}\noutput {\n \n}"},

{"pipelineId":"test1", "config":"input {\n\n}\nfilter {\n\n}\noutput {\n  \n}"}
]

Sample success responses

JSON format

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

{
  "Result" : true,
  "RequestId" : "734F9DEC-74AC-4D6E-B97F-FFDAA90B****"
}

HTTP status code

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