update-dfanalytics.asciidoc 3.0 KB

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