全部產品
Search
文件中心

Elasticsearch:UpdatePipelines

更新時間:Jan 16, 2025

調用UpdatePipelines,更新Logstash管道資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

要求標頭

該介面使用公用要求標頭,無特殊要求標頭。請參見公用請求參數文檔。

請求文法

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

請求參數

名稱 類型 位置 是否必選 樣本值 描述
InstanceId String Path ls-cn-oew1qbgl****

Logstash執行個體ID。

trigger Boolean Query false

是否立即部署。

clientToken String Query 5A2CFF0E-5718-45B5-9D4D-70B3FF****

用於保證請求的等冪性。由用戶端產生該參數值,要保證在不同請求間唯一,最大不超過64個ASCII字元。

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

指定更新的管道資訊。

RequestBody

RequestBody中還需填入JSON格式的pipeline數組,用來指定更新的管道資訊。

名稱

類型

是否必選

樣本值

描述

pipelineId

String

pipeline-test

待更新的管道的ID。

description

String

this is a test

管道描述。

config

String

input { } filter { } output { }

管道具體配置。

workers

Integer

2

管道背景工作執行緒數。

batchSize

Integer

125

管道批大小。

batchDelay

Integer

50

管道批延遲。單位ms。

queueType

String

MEMORY

隊列類型。支援MEMORY和PERSISTED。

pipelineStatus

String

RUNNING

管道狀態,trigger為true時必填。支援NOT_DEPLOYED、RUNNING和DELETED。

queueMaxBytes

Integer

1024

隊列最大位元組數。

queueCheckPointWrites

Integer

1024

隊列檢查點寫入數。

樣本如下。


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

返回資料

名稱 類型 樣本值 描述
Result Boolean true

返回結果:

  • true:更新成功
  • false:更新失敗
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

請求ID。

樣本

請求樣本

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

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

正常返回樣本

JSON格式

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

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

錯誤碼

訪問錯誤中心查看更多錯誤碼。