update-dfanalytics.asciidoc 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[update-dfanalytics]]
  4. = Update {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Update {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Updates an existing {dfanalytics-job}.
  10. [[ml-update-dfanalytics-request]]
  11. == {api-request-title}
  12. `POST _ml/data_frame/analytics/<data_frame_analytics_id>/_update`
  13. [[ml-update-dfanalytics-prereq]]
  14. == {api-prereq-title}
  15. If the {es} {security-features} are enabled, you must have the following
  16. built-in roles and privileges:
  17. * `machine_learning_admin`
  18. * source indices: `read`, `view_index_metadata`
  19. * destination index: `read`, `create_index`, `manage` and `index`
  20. For more information, see <<built-in-roles>>, <<security-privileges>>, and
  21. {ml-docs-setup-privileges}.
  22. NOTE: The {dfanalytics-job} remembers which roles the user who updated it had at
  23. the time of the update. When you start the job, it performs the analysis using
  24. those same roles. If you provide
  25. <<http-clients-secondary-authorization,secondary authorization headers>>,
  26. those credentials are used instead.
  27. [[ml-update-dfanalytics-desc]]
  28. == {api-description-title}
  29. This API updates an existing {dfanalytics-job} that performs an analysis on the source
  30. indices and stores the outcome in a destination index.
  31. [[ml-update-dfanalytics-path-params]]
  32. == {api-path-parms-title}
  33. `<data_frame_analytics_id>`::
  34. (Required, string)
  35. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-define]
  36. [role="child_attributes"]
  37. [[ml-update-dfanalytics-request-body]]
  38. == {api-request-body-title}
  39. `allow_lazy_start`::
  40. (Optional, Boolean)
  41. Specifies whether this job can start when there is insufficient {ml} node
  42. capacity for it to be immediately assigned to a node. The default is `false`; if
  43. a {ml} node with capacity to run the job cannot immediately be found, the API
  44. returns an error. However, this is also subject to the cluster-wide
  45. `xpack.ml.max_lazy_ml_nodes` setting. See <<advanced-ml-settings>>. If this
  46. option is set to `true`, the API does not return an error and the job waits in
  47. the `starting` state until sufficient {ml} node capacity is available.
  48. `description`::
  49. (Optional, string)
  50. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=description-dfa]
  51. `max_num_threads`::
  52. (Optional, integer)
  53. The maximum number of threads to be used by the analysis.
  54. The default value is `1`. Using more threads may decrease the time
  55. necessary to complete the analysis at the cost of using more CPU.
  56. Note that the process may use additional threads for operational
  57. functionality other than the analysis itself.
  58. `model_memory_limit`::
  59. (Optional, string)
  60. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=model-memory-limit-dfa]
  61. [[ml-update-dfanalytics-example]]
  62. == {api-examples-title}
  63. [[ml-update-dfanalytics-example-preprocess]]
  64. === Updating model memory limit example
  65. The following example shows how to update the model memory limit for the existing {dfanalytics} configuration.
  66. [source,console]
  67. --------------------------------------------------
  68. POST _ml/data_frame/analytics/model-flight-delays/_update
  69. {
  70. "model_memory_limit": "200mb"
  71. }
  72. --------------------------------------------------
  73. // TEST[skip:setup kibana sample data]