shutdown-delete.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [[delete-shutdown]]
  2. === Delete shutdown API
  3. NOTE: {cloud-only}
  4. Cancels shutdown preparations or clears a shutdown request
  5. so a node can resume normal operations.
  6. [[delete-shutdown-api-request]]
  7. ==== {api-request-title}
  8. `DELETE _nodes/<node-id>/shutdown`
  9. [[delete-shutdown-api-prereqs]]
  10. ==== {api-prereq-title}
  11. * If the {es} {security-features} are enabled, you must have the `manage`
  12. <<privileges-list-cluster,cluster privilege>> to use this API.
  13. * If the <<operator-privileges,{operator-feature}>> is enabled,
  14. you must be an operator to use this API.
  15. [[delete-shutdown-api-desc]]
  16. ==== {api-description-title}
  17. Enables a node to resume normal operations following a
  18. <<put-shutdown, put shutdown>> request.
  19. You must explicitly clear the shutdown request when a node rejoins the cluster,
  20. or when a node has permanently left the cluster. Shutdown requests are never
  21. removed automatically by {es}.
  22. [[delete-shutdown-api-path-params]]
  23. ==== {api-path-parms-title}
  24. `<node-id>`::
  25. (Optional, string)
  26. The ID of a node that you prepared for shut down.
  27. [[delete-shutdown-api-params]]
  28. ==== {api-query-parms-title}
  29. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  30. [[delete-shutdown-api-example]]
  31. ==== {api-examples-title}
  32. Prepare a node to be restarted:
  33. [source,console]
  34. --------------------------------------------------
  35. PUT /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown
  36. {
  37. "type": "restart",
  38. "reason": "Demonstrating how the node shutdown API works"
  39. }
  40. --------------------------------------------------
  41. // TEST[setup:node]
  42. // TEST[s/USpTGYaBSIKbgSUJR2Z9lg/\$node_name/]
  43. Cancel the shutdown preparations or clear the shutdown request
  44. after restarting:
  45. [source,console]
  46. --------------------------------------------------
  47. DELETE /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown
  48. --------------------------------------------------
  49. // TEST[continued]
  50. // TEST[s/USpTGYaBSIKbgSUJR2Z9lg/\$node_name/]
  51. Which returns the following response:
  52. [source,console-result]
  53. --------------------------------------------------
  54. {
  55. "acknowledged": true
  56. }
  57. --------------------------------------------------