stop-transform.asciidoc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[stop-data-frame-transform]]
  4. === Stop {dataframe-transforms} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Stop {dataframe-transforms}</titleabbrev>
  8. ++++
  9. Stops one or more {dataframe-transforms}.
  10. beta[]
  11. [[stop-data-frame-transform-request]]
  12. ==== {api-request-title}
  13. `POST _data_frame/transforms/<data_frame_transform_id>/_stop` +
  14. `POST _data_frame/transforms/<data_frame_transform_id1>,<data_frame_transform_id2>/_stop` +
  15. `POST _data_frame/transforms/_all/_stop`
  16. [[stop-data-frame-transform-prereq]]
  17. ==== {api-prereq-title}
  18. * If the {es} {security-features} are enabled, you must have
  19. `manage_data_frame_transforms` cluster privileges to use this API. The built-in
  20. `data_frame_transforms_admin` role has these privileges. For more information,
  21. see {stack-ov}/security-privileges.html[Security privileges] and
  22. {stack-ov}/built-in-roles.html[Built-in roles].
  23. [[stop-data-frame-transform-desc]]
  24. ==== {api-description-title}
  25. You can stop multiple {dataframe-transforms} in a single API request by using a
  26. comma-separated list of {dataframe-transforms} or a wildcard expression.
  27. All {dataframe-transforms} can be stopped by using `_all` or `*` as the
  28. `<data_frame_transform_id>`.
  29. [[stop-data-frame-transform-path-parms]]
  30. ==== {api-path-parms-title}
  31. `<data_frame_transform_id>`::
  32. (Required, string) Identifier for the {dataframe-transform}. This identifier
  33. can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
  34. underscores. It must start and end with alphanumeric characters.
  35. [[stop-data-frame-transform-query-parms]]
  36. ==== {api-query-parms-title}
  37. `allow_no_match`::
  38. (Optional, boolean) Specifies what to do when the request:
  39. +
  40. --
  41. * Contains wildcard expressions and there are no {dataframe-transforms} that match.
  42. * Contains the `_all` string or no identifiers and there are no matches.
  43. * Contains wildcard expressions and there are only partial matches.
  44. The default value is `true`, which returns a successful acknowledgement message
  45. when there are no matches. When there are only partial matches, the API stops
  46. the appropriate {dataframe-transforms}. For example, if the request contains
  47. `test-id1*,test-id2*` as the identifiers and there are no {dataframe-transforms}
  48. that match `test-id2*`, the API nonetheless stops the {dataframe-transforms}
  49. that match `test-id1*`.
  50. If this parameter is `false`, the request returns a `404` status code when there
  51. are no matches or only partial matches.
  52. --
  53. `timeout`::
  54. (Optional, time value) If `wait_for_completion=true`, the API blocks for (at
  55. maximum) the specified duration while waiting for the transform to stop. If
  56. more than `timeout` time has passed, the API throws a timeout exception. Even
  57. if a timeout exception is thrown, the stop request is still processing and
  58. eventually moves the transform to `STOPPED`. The timeout simply means the API
  59. call itself timed out while waiting for the status change. Defaults to `30s`
  60. `wait_for_completion`::
  61. (Optional, boolean) If set to `true`, causes the API to block until the indexer
  62. state completely stops. If set to `false`, the API returns immediately and the
  63. indexer will be stopped asynchronously in the background. Defaults to `false`.
  64. [[stop-data-frame-transform-response-codes]]
  65. ==== {api-response-codes-title}
  66. `404` (Missing resources)::
  67. If `allow_no_match` is `false`, this code indicates that there are no
  68. resources that match the request or only partial matches for the request.
  69. [[stop-data-frame-transform-example]]
  70. ==== {api-examples-title}
  71. [source,js]
  72. --------------------------------------------------
  73. POST _data_frame/transforms/ecommerce_transform/_stop
  74. --------------------------------------------------
  75. // CONSOLE
  76. // TEST[skip:set up kibana samples]
  77. When the {dataframe-transform} stops, you receive the following results:
  78. [source,console-result]
  79. ----
  80. {
  81. "acknowledged" : true
  82. }
  83. ----