Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›REST APIs ›Node lifecycle APIs

Delete shutdown API

This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.

New API reference

For the most up-to-date API details, refer to Node lifecycle APIs.

Cancels shutdown preparations or clears a shutdown request so a node can resume normal operations.

Request

DELETE _nodes/<node-id>/shutdown

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the manage cluster privilege to use this API.
  • If the operator privileges feature is enabled, you must be an operator to use this API.

Description

Enables a node to resume normal operations following a put shutdown request. You must explicitly clear the shutdown request when a node rejoins the cluster, or when a node has permanently left the cluster. Shutdown requests are never removed automatically by Elasticsearch.

Path parameters

<node-id>
(Optional, string) The ID of a node that you prepared for shut down.

Query parameters

master_timeout
(Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to 30s. Can also be set to -1 to indicate that the request should never timeout.

Examples

Prepare a node to be restarted:

resp = client.shutdown.put_node(
    node_id="USpTGYaBSIKbgSUJR2Z9lg",
    type="restart",
    reason="Demonstrating how the node shutdown API works",
)
print(resp)
response = client.shutdown.put_node(
  node_id: 'USpTGYaBSIKbgSUJR2Z9lg',
  body: {
    type: 'restart',
    reason: 'Demonstrating how the node shutdown API works'
  }
)
puts response
const response = await client.shutdown.putNode({
  node_id: "USpTGYaBSIKbgSUJR2Z9lg",
  type: "restart",
  reason: "Demonstrating how the node shutdown API works",
});
console.log(response);
PUT /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown
{
  "type": "restart",
  "reason": "Demonstrating how the node shutdown API works"
}

Cancel the shutdown preparations or clear the shutdown request after restarting:

resp = client.shutdown.delete_node(
    node_id="USpTGYaBSIKbgSUJR2Z9lg",
)
print(resp)
response = client.shutdown.delete_node(
  node_id: 'USpTGYaBSIKbgSUJR2Z9lg'
)
puts response
const response = await client.shutdown.deleteNode({
  node_id: "USpTGYaBSIKbgSUJR2Z9lg",
});
console.log(response);
DELETE /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown

Which returns the following response:

{
    "acknowledged": true
}

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-shutdown.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API