浏览代码

[DOCS] `if_version` parameter for OCC on pipeline updates (#79640)

Dan Hermann 4 年之前
父节点
当前提交
a23f58f809
共有 2 个文件被更改,包括 11 次插入5 次删除
  1. 4 2
      docs/reference/ingest.asciidoc
  2. 7 3
      docs/reference/ingest/apis/put-pipeline.asciidoc

+ 4 - 2
docs/reference/ingest.asciidoc

@@ -91,8 +91,10 @@ PUT _ingest/pipeline/my-pipeline
 === Manage pipeline versions
 === Manage pipeline versions
 
 
 When you create or update a pipeline, you can specify an optional `version`
 When you create or update a pipeline, you can specify an optional `version`
-integer. {es} doesn't use this `version` number internally, but you can use it
-to track changes to a pipeline.
+integer. You can use this version number with the
+<<put-pipeline-api-query-params,`if_version`>> parameter to conditionally
+update the pipeline. When the `if_version` parameter is specified, a successful
+update increments the pipeline's version.
 
 
 [source,console]
 [source,console]
 ----
 ----

+ 7 - 3
docs/reference/ingest/apis/put-pipeline.asciidoc

@@ -48,8 +48,12 @@ PUT _ingest/pipeline/my-pipeline-id
 [[put-pipeline-api-query-params]]
 [[put-pipeline-api-query-params]]
 ==== {api-query-parms-title}
 ==== {api-query-parms-title}
 
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
+`if_version`::
+(Optional, integer) Perform the operation only if the pipeline has this
+version. If specified and the update is successful, the pipeline's
+version is incremented.
 
 
+include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
 
 
 [[put-pipeline-api-request-body]]
 [[put-pipeline-api-request-body]]
 ==== {api-request-body-title}
 ==== {api-request-body-title}
@@ -77,8 +81,8 @@ Processors run sequentially in the order specified.
 (Optional, integer)
 (Optional, integer)
 Version number used by external systems to track ingest pipelines.
 Version number used by external systems to track ingest pipelines.
 +
 +
-This parameter is intended for external systems only. {es} does not use or
-validate pipeline version numbers.
+See the <<put-pipeline-api-query-params,`if_version`>> parameter above for
+how the version attribute is used.
 
 
 `_meta`::
 `_meta`::
 (Optional, object)
 (Optional, object)