Shutdown

class elasticsearch.client.ShutdownClient(client)
Parameters:

client (BaseClient) –

delete_node(*, node_id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

https://www.elastic.co/guide/en/elasticsearch/reference/current

Parameters:
  • node_id (str) – The node id of node to be removed from the shutdown state

  • master_timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

Return type:

ObjectApiResponse[Any]

get_node(*, node_id=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

https://www.elastic.co/guide/en/elasticsearch/reference/current

Parameters:
  • node_id (str | Sequence[str] | None) – Which node for which to retrieve the shutdown status

  • master_timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

Return type:

ObjectApiResponse[Any]

put_node(*, node_id, reason=None, type=None, allocation_delay=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, target_node_name=None, timeout=None, body=None)

Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

https://www.elastic.co/guide/en/elasticsearch/reference/current

Parameters:
  • node_id (str) – The node id of node to be shut down

  • reason (str | None) – A human-readable reason that the node is being shut down. This field provides information for other cluster operators; it does not affect the shut down process.

  • type (Literal['remove', 'replace', 'restart'] | str | None) – Valid values are restart, remove, or replace. Use restart when you need to temporarily shut down a node to perform an upgrade, make configuration changes, or perform other maintenance. Because the node is expected to rejoin the cluster, data is not migrated off of the node. Use remove when you need to permanently remove a node from the cluster. The node is not marked ready for shutdown until data is migrated off of the node Use replace to do a 1:1 replacement of a node with another node. Certain allocation decisions will be ignored (such as disk watermarks) in the interest of true replacement of the source node with the target node. During a replace-type shutdown, rollover and index creation may result in unassigned shards, and shrink may fail until the replacement is complete.

  • allocation_delay (str | None) – Only valid if type is restart. Controls how long Elasticsearch will wait for the node to restart and join the cluster before reassigning its shards to other nodes. This works the same as delaying allocation with the index.unassigned.node_left.delayed_timeout setting. If you specify both a restart allocation delay and an index-level allocation delay, the longer of the two is used.

  • master_timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • target_node_name (str | None) – Only valid if type is replace. Specifies the name of the node that is replacing the node being shut down. Shards from the shut down node are only allowed to be allocated to the target node, and no other data will be allocated to the target node. During relocation of data certain allocation rules are ignored, such as disk watermarks or user attribute filtering rules.

  • timeout (Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's'] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

  • body (Dict[str, Any] | None) –

Return type:

ObjectApiResponse[Any]