stop-dfanalytics.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[stop-dfanalytics]]
  4. === Stop {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Stop {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Stops one or more {dfanalytics-jobs}.
  10. experimental[]
  11. [[ml-stop-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `POST _ml/data_frame/analytics/<data_frame_analytics_id>/_stop` +
  14. `POST _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>/_stop` +
  15. `POST _ml/data_frame/analytics/_all/_stop`
  16. [[ml-stop-dfanalytics-prereq]]
  17. ==== {api-prereq-title}
  18. * You must have `machine_learning_admin` built-in role to use this API. For more
  19. information, see <<security-privileges>> and <<built-in-roles>>.
  20. [[ml-stop-dfanalytics-desc]]
  21. ==== {api-description-title}
  22. A {dfanalytics-job} can be started and stopped multiple times throughout its
  23. lifecycle.
  24. You can stop multiple {dfanalytics-jobs} in a single API request by using a
  25. comma-separated list of {dfanalytics-jobs} or a wildcard expression. You can
  26. stop all {dfanalytics-job} by using _all or by specifying * as the
  27. <data_frame_analytics_id>.
  28. [[ml-stop-dfanalytics-path-params]]
  29. ==== {api-path-parms-title}
  30. `<data_frame_analytics_id>`::
  31. (Required, string) Identifier for the {dfanalytics-job}. This identifier can
  32. contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
  33. underscores. It must start and end with alphanumeric characters.
  34. [[ml-stop-dfanalytics-query-params]]
  35. ==== {api-query-parms-title}
  36. `allow_no_match`::
  37. (Optional, boolean) If `false` and the `data_frame_analytics_id` does not
  38. match any {dfanalytics-job} an error will be returned. The default value is
  39. `true`.
  40. `force`::
  41. (Optional, boolean) If true, the {dfanalytics-job} is stopped forcefully.
  42. `timeout`::
  43. (Optional, time) Controls the amount of time to wait until the
  44. {dfanalytics-job} stops. The default value is 20 seconds.
  45. [[ml-stop-dfanalytics-example]]
  46. ==== {api-examples-title}
  47. The following example stops the `loganalytics` {dfanalytics-job}:
  48. [source,console]
  49. --------------------------------------------------
  50. POST _ml/data_frame/analytics/loganalytics/_stop
  51. --------------------------------------------------
  52. // TEST[skip:TBD]
  53. When the {dfanalytics-job} stops, you receive the following results:
  54. [source,console-result]
  55. ----
  56. {
  57. "stopped" : true
  58. }
  59. ----