stop.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[ilm-stop]]
  4. === Stop {ilm} API
  5. ++++
  6. <titleabbrev>Stop {ilm}</titleabbrev>
  7. ++++
  8. Stop the {ilm} ({ilm-init}) plugin.
  9. ==== Request
  10. `POST /_ilm/stop`
  11. ==== Description
  12. Halts all lifecycle management operations and stops the {ilm-init} plugin. This
  13. is useful when you are performing maintenance on the cluster and need to prevent
  14. {ilm-init} from performing any actions on your indices.
  15. The API returns as soon as the stop request has been acknowledged, but the
  16. plugin might continue to run until in-progress operations complete and the plugin
  17. can be safely stopped. Use the <<ilm-get-status, Get ILM Status>> API to see
  18. if {ilm-init} is running.
  19. ==== Request Parameters
  20. include::{docdir}/rest-api/timeoutparms.asciidoc[]
  21. ==== Authorization
  22. You must have the `manage_ilm` cluster privilege to use this API.
  23. For more information, see {stack-ov}/security-privileges.html[Security Privileges].
  24. ==== Examples
  25. The following example stops the ILM plugin.
  26. //////////////////////////
  27. [source,js]
  28. --------------------------------------------------
  29. PUT _ilm/policy/my_policy
  30. {
  31. "policy": {
  32. "phases": {
  33. "warm": {
  34. "min_age": "10d",
  35. "actions": {
  36. "forcemerge": {
  37. "max_num_segments": 1
  38. }
  39. }
  40. },
  41. "delete": {
  42. "min_age": "30d",
  43. "actions": {
  44. "delete": {}
  45. }
  46. }
  47. }
  48. }
  49. }
  50. PUT my_index
  51. --------------------------------------------------
  52. // CONSOLE
  53. // TEST
  54. //////////////////////////
  55. [source,js]
  56. --------------------------------------------------
  57. POST _ilm/stop
  58. --------------------------------------------------
  59. // CONSOLE
  60. // TEST[continued]
  61. If the request does not encounter errors, you receive the following result:
  62. [source,js]
  63. --------------------------------------------------
  64. {
  65. "acknowledged": true
  66. }
  67. --------------------------------------------------
  68. // CONSOLE
  69. // TESTRESPONSE
  70. //////////////////////////
  71. [source,js]
  72. --------------------------------------------------
  73. POST _ilm/start
  74. --------------------------------------------------
  75. // CONSOLE
  76. // TEST[continued]
  77. //////////////////////////