Skip to content

Auto-generated code for 8.x #2777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,014 changes: 782 additions & 232 deletions elasticsearch/_async/client/__init__.py

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions elasticsearch/_async/client/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ async def get(
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_

:param id: A unique identifier for the async search.
:param keep_alive: Specifies how long the async search should be available in
the cluster. When not specified, the `keep_alive` set with the corresponding
:param keep_alive: The length of time that the async search should be available
in the cluster. When not specified, the `keep_alive` set with the corresponding
submit async request will be used. Otherwise, it is possible to override
the value and extend the validity of the request. When this period expires,
the search, if still running, is cancelled. If the search is completed, its
Expand Down Expand Up @@ -157,13 +157,17 @@ async def status(

<p>Get the async search status.</p>
<p>Get the status of a previously submitted async search request given its identifier, without retrieving search results.
If the Elasticsearch security features are enabled, use of this API is restricted to the <code>monitoring_user</code> role.</p>
If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:</p>
<ul>
<li>The user or API key that submitted the original async search request.</li>
<li>Users that have the <code>monitor</code> cluster privilege or greater privileges.</li>
</ul>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_

:param id: A unique identifier for the async search.
:param keep_alive: Specifies how long the async search needs to be available.
:param keep_alive: The length of time that the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this
period.
"""
Expand Down Expand Up @@ -270,6 +274,7 @@ async def submit(
ignore_throttled: t.Optional[bool] = None,
ignore_unavailable: t.Optional[bool] = None,
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
keep_on_completion: t.Optional[bool] = None,
knn: t.Optional[
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
Expand Down Expand Up @@ -384,6 +389,9 @@ async def submit(
:param ignore_unavailable: Whether specified concrete indices should be ignored
when unavailable (missing or closed)
:param indices_boost: Boosts the _score of documents from specified indices.
:param keep_alive: Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this
period.
:param keep_on_completion: If `true`, results are stored for later retrieval
when the search completes within the `wait_for_completion_timeout`.
:param knn: Defines the approximate kNN search to run.
Expand Down Expand Up @@ -510,6 +518,8 @@ async def submit(
__query["ignore_throttled"] = ignore_throttled
if ignore_unavailable is not None:
__query["ignore_unavailable"] = ignore_unavailable
if keep_alive is not None:
__query["keep_alive"] = keep_alive
if keep_on_completion is not None:
__query["keep_on_completion"] = keep_on_completion
if lenient is not None:
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@ async def tasks(
IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-tasks.html>`_

:param actions: The task action names, which are used to limit the response.
:param detailed: If `true`, the response includes detailed information about
Expand Down
113 changes: 67 additions & 46 deletions elasticsearch/_async/client/ccr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ async def delete_auto_follow_pattern(
"""
.. raw:: html

<p>Delete auto-follow patterns.
Delete a collection of cross-cluster replication auto-follow patterns.</p>
<p>Delete auto-follow patterns.</p>
<p>Delete a collection of cross-cluster replication auto-follow patterns.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-delete-auto-follow-pattern.html>`_

:param name: The name of the auto follow pattern.
:param master_timeout: Period to wait for a connection to the master node.
:param name: The auto-follow pattern collection to delete.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
Expand Down Expand Up @@ -251,16 +254,18 @@ async def follow_info(
"""
.. raw:: html

<p>Get follower information.
Get information about all cross-cluster replication follower indices.
<p>Get follower information.</p>
<p>Get information about all cross-cluster replication follower indices.
For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-info.html>`_

:param index: A comma-separated list of index patterns; use `_all` to perform
the operation on all indices
:param master_timeout: Period to wait for a connection to the master node.
:param index: A comma-delimited list of follower index patterns.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
Expand Down Expand Up @@ -301,17 +306,16 @@ async def follow_stats(
"""
.. raw:: html

<p>Get follower stats.
Get cross-cluster replication follower stats.
<p>Get follower stats.</p>
<p>Get cross-cluster replication follower stats.
The API returns shard-level stats about the &quot;following tasks&quot; associated with each shard for the specified indices.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_

:param index: A comma-separated list of index patterns; use `_all` to perform
the operation on all indices
:param timeout: Period to wait for a response. If no response is received before
the timeout expires, the request fails and returns an error.
:param index: A comma-delimited list of index patterns.
:param timeout: The period to wait for a response. If no response is received
before the timeout expires, the request fails and returns an error.
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
Expand Down Expand Up @@ -437,15 +441,18 @@ async def get_auto_follow_pattern(
"""
.. raw:: html

<p>Get auto-follow patterns.
Get cross-cluster replication auto-follow patterns.</p>
<p>Get auto-follow patterns.</p>
<p>Get cross-cluster replication auto-follow patterns.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_

:param name: Specifies the auto-follow pattern collection that you want to retrieve.
If you do not specify a name, the API returns information for all collections.
:param master_timeout: Period to wait for a connection to the master node.
:param name: The auto-follow pattern collection that you want to retrieve. If
you do not specify a name, the API returns information for all collections.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
__path_parts: t.Dict[str, str]
if name not in SKIP_IN_PATH:
Expand Down Expand Up @@ -489,8 +496,8 @@ async def pause_auto_follow_pattern(
"""
.. raw:: html

<p>Pause an auto-follow pattern.
Pause a cross-cluster replication auto-follow pattern.
<p>Pause an auto-follow pattern.</p>
<p>Pause a cross-cluster replication auto-follow pattern.
When the API returns, the auto-follow pattern is inactive.
New indices that are created on the remote cluster and match the auto-follow patterns are ignored.</p>
<p>You can resume auto-following with the resume auto-follow pattern API.
Expand All @@ -500,9 +507,11 @@ async def pause_auto_follow_pattern(

`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_

:param name: The name of the auto follow pattern that should pause discovering
new indices to follow.
:param master_timeout: Period to wait for a connection to the master node.
:param name: The name of the auto-follow pattern to pause.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
Expand Down Expand Up @@ -543,18 +552,20 @@ async def pause_follow(
"""
.. raw:: html

<p>Pause a follower.
Pause a cross-cluster replication follower index.
<p>Pause a follower.</p>
<p>Pause a cross-cluster replication follower index.
The follower index will not fetch any additional operations from the leader index.
You can resume following with the resume follower API.
You can pause and resume a follower index to change the configuration of the following task.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_

:param index: The name of the follower index that should pause following its
leader index.
:param master_timeout: Period to wait for a connection to the master node.
:param index: The name of the follower index.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
Expand Down Expand Up @@ -765,17 +776,19 @@ async def resume_auto_follow_pattern(
"""
.. raw:: html

<p>Resume an auto-follow pattern.
Resume a cross-cluster replication auto-follow pattern that was paused.
<p>Resume an auto-follow pattern.</p>
<p>Resume a cross-cluster replication auto-follow pattern that was paused.
The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster.
Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_

:param name: The name of the auto follow pattern to resume discovering new indices
to follow.
:param master_timeout: Period to wait for a connection to the master node.
:param name: The name of the auto-follow pattern to resume.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
Expand Down Expand Up @@ -934,15 +947,18 @@ async def stats(
"""
.. raw:: html

<p>Get cross-cluster replication stats.
This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>
<p>Get cross-cluster replication stats.</p>
<p>This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_

:param master_timeout: Period to wait for a connection to the master node.
:param timeout: Period to wait for a response. If no response is received before
the timeout expires, the request fails and returns an error.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
:param timeout: The period to wait for a response. If no response is received
before the timeout expires, the request fails and returns an error.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_ccr/stats"
Expand Down Expand Up @@ -983,18 +999,23 @@ async def unfollow(
"""
.. raw:: html

<p>Unfollow an index.
Convert a cross-cluster replication follower index to a regular index.
<p>Unfollow an index.</p>
<p>Convert a cross-cluster replication follower index to a regular index.
The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
The follower index must be paused and closed before you call the unfollow API.</p>
<p>NOTE: Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.</p>
<blockquote>
<p>info
Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.</p>
</blockquote>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_

:param index: The name of the follower index that should be turned into a regular
index.
:param master_timeout: Period to wait for a connection to the master node.
:param index: The name of the follower index.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. It can also be set to `-1` to indicate that the
request should never timeout.
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
Expand Down
21 changes: 14 additions & 7 deletions elasticsearch/_async/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ async def health(
"""
.. raw:: html

<p>Get the cluster health status.
You can also use the API to get the health status of only specified data streams and indices.
<p>Get the cluster health status.</p>
<p>You can also use the API to get the health status of only specified data streams and indices.
For data streams, the API retrieves the health status of the stream’s backing indices.</p>
<p>The cluster health status is: green, yellow or red.
On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.
Expand Down Expand Up @@ -850,8 +850,8 @@ async def put_settings(
"""
.. raw:: html

<p>Update the cluster settings.
Configure and update dynamic settings on a running cluster.
<p>Update the cluster settings.</p>
<p>Configure and update dynamic settings on a running cluster.
You can also configure dynamic settings locally on an unstarted or shut down node in <code>elasticsearch.yml</code>.</p>
<p>Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart.
You can also reset transient or persistent settings by assigning them a null value.</p>
Expand Down Expand Up @@ -920,9 +920,16 @@ async def remote_info(
"""
.. raw:: html

<p>Get remote cluster information.
Get all of the configured remote cluster information.
This API returns connection and endpoint information keyed by the configured remote cluster alias.</p>
<p>Get remote cluster information.</p>
<p>Get information about configured remote clusters.
The API returns connection and endpoint information keyed by the configured remote cluster alias.</p>
<blockquote>
<p>info
This API returns information that reflects current state on the local cluster.
The <code>connected</code> field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it.
Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster.
To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster">resolve cluster endpoint</a>.</p>
</blockquote>


`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-remote-info.html>`_
Expand Down
Loading