删除关闭 API
编辑删除关闭 API
编辑此功能旨在由 Elasticsearch Service、Elastic Cloud Enterprise 和 Elastic Cloud on Kubernetes 间接使用。不支持直接使用。
取消关闭准备工作或清除关闭请求,以便节点可以恢复正常操作。
请求
编辑DELETE _nodes/<node-id>/shutdown
路径参数
编辑-
<node-id>
- (可选,字符串) 已准备好关闭的节点的 ID。
示例
编辑准备重启节点
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" }
取消关闭准备工作或在重启后清除关闭请求
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
这将返回以下响应
{ "acknowledged": true }