shutdown-delete.asciidoc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. regardless of the shutdown type.
  21. [[delete-shutdown-api-path-params]]
  22. ==== {api-path-parms-title}
  23. `<node-id>`::
  24. (Optional, string)
  25. The ID of a node that you prepared for shut down.
  26. [[delete-shutdown-api-params]]
  27. ==== {api-query-parms-title}
  28. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  29. [[delete-shutdown-api-example]]
  30. ==== {api-examples-title}
  31. Prepare a node to be restarted:
  32. [source,console]
  33. --------------------------------------------------
  34. PUT /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown
  35. {
  36. "type": "restart",
  37. "reason": "Demonstrating how the node shutdown API works"
  38. }
  39. --------------------------------------------------
  40. // TEST[setup:node]
  41. // TEST[s/USpTGYaBSIKbgSUJR2Z9lg/\$node_name/]
  42. Cancel the shutdown preparations or clear the shutdown request
  43. after restarting:
  44. [source,console]
  45. --------------------------------------------------
  46. DELETE /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown
  47. --------------------------------------------------
  48. // TEST[continued]
  49. // TEST[s/USpTGYaBSIKbgSUJR2Z9lg/\$node_name/]
  50. Which returns the following response:
  51. [source,console-result]
  52. --------------------------------------------------
  53. {
  54. "acknowledged": true
  55. }
  56. --------------------------------------------------