Browse Source

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

Dan Hermann 4 years ago
parent
commit
a23f58f809
2 changed files with 11 additions and 5 deletions
  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
 
 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]
 ----

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

@@ -48,8 +48,12 @@ PUT _ingest/pipeline/my-pipeline-id
 [[put-pipeline-api-query-params]]
 ==== {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]]
 ==== {api-request-body-title}
@@ -77,8 +81,8 @@ Processors run sequentially in the order specified.
 (Optional, integer)
 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`::
 (Optional, object)