update-dfanalytics.asciidoc 3.5 KB

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