Skip to content

Commit 525182a

Browse files
Auto-generated API code
1 parent f04755d commit 525182a

37 files changed

+2264
-889
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 762 additions & 232 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/cat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2494,7 +2494,7 @@ async def tasks(
24942494
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>
24952495
24962496
2497-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
2497+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-tasks.html>`_
24982498
24992499
:param actions: The task action names, which are used to limit the response.
25002500
:param detailed: If `true`, the response includes detailed information about

elasticsearch/_async/client/ccr.py

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -301,17 +301,16 @@ async def follow_stats(
301301
"""
302302
.. raw:: html
303303
304-
<p>Get follower stats.
305-
Get cross-cluster replication follower stats.
304+
<p>Get follower stats.</p>
305+
<p>Get cross-cluster replication follower stats.
306306
The API returns shard-level stats about the &quot;following tasks&quot; associated with each shard for the specified indices.</p>
307307
308308
309309
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_
310310
311-
:param index: A comma-separated list of index patterns; use `_all` to perform
312-
the operation on all indices
313-
:param timeout: Period to wait for a response. If no response is received before
314-
the timeout expires, the request fails and returns an error.
311+
:param index: A comma-delimited list of index patterns.
312+
:param timeout: The period to wait for a response. If no response is received
313+
before the timeout expires, the request fails and returns an error.
315314
"""
316315
if index in SKIP_IN_PATH:
317316
raise ValueError("Empty value passed for parameter 'index'")
@@ -437,15 +436,18 @@ async def get_auto_follow_pattern(
437436
"""
438437
.. raw:: html
439438
440-
<p>Get auto-follow patterns.
441-
Get cross-cluster replication auto-follow patterns.</p>
439+
<p>Get auto-follow patterns.</p>
440+
<p>Get cross-cluster replication auto-follow patterns.</p>
442441
443442
444443
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_
445444
446-
:param name: Specifies the auto-follow pattern collection that you want to retrieve.
447-
If you do not specify a name, the API returns information for all collections.
448-
:param master_timeout: Period to wait for a connection to the master node.
445+
:param name: The auto-follow pattern collection that you want to retrieve. If
446+
you do not specify a name, the API returns information for all collections.
447+
:param master_timeout: The period to wait for a connection to the master node.
448+
If the master node is not available before the timeout expires, the request
449+
fails and returns an error. It can also be set to `-1` to indicate that the
450+
request should never timeout.
449451
"""
450452
__path_parts: t.Dict[str, str]
451453
if name not in SKIP_IN_PATH:
@@ -489,8 +491,8 @@ async def pause_auto_follow_pattern(
489491
"""
490492
.. raw:: html
491493
492-
<p>Pause an auto-follow pattern.
493-
Pause a cross-cluster replication auto-follow pattern.
494+
<p>Pause an auto-follow pattern.</p>
495+
<p>Pause a cross-cluster replication auto-follow pattern.
494496
When the API returns, the auto-follow pattern is inactive.
495497
New indices that are created on the remote cluster and match the auto-follow patterns are ignored.</p>
496498
<p>You can resume auto-following with the resume auto-follow pattern API.
@@ -500,9 +502,11 @@ async def pause_auto_follow_pattern(
500502
501503
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_
502504
503-
:param name: The name of the auto follow pattern that should pause discovering
504-
new indices to follow.
505-
:param master_timeout: Period to wait for a connection to the master node.
505+
:param name: The name of the auto-follow pattern to pause.
506+
:param master_timeout: The period to wait for a connection to the master node.
507+
If the master node is not available before the timeout expires, the request
508+
fails and returns an error. It can also be set to `-1` to indicate that the
509+
request should never timeout.
506510
"""
507511
if name in SKIP_IN_PATH:
508512
raise ValueError("Empty value passed for parameter 'name'")
@@ -543,18 +547,20 @@ async def pause_follow(
543547
"""
544548
.. raw:: html
545549
546-
<p>Pause a follower.
547-
Pause a cross-cluster replication follower index.
550+
<p>Pause a follower.</p>
551+
<p>Pause a cross-cluster replication follower index.
548552
The follower index will not fetch any additional operations from the leader index.
549553
You can resume following with the resume follower API.
550554
You can pause and resume a follower index to change the configuration of the following task.</p>
551555
552556
553557
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_
554558
555-
:param index: The name of the follower index that should pause following its
556-
leader index.
557-
:param master_timeout: Period to wait for a connection to the master node.
559+
:param index: The name of the follower index.
560+
:param master_timeout: The period to wait for a connection to the master node.
561+
If the master node is not available before the timeout expires, the request
562+
fails and returns an error. It can also be set to `-1` to indicate that the
563+
request should never timeout.
558564
"""
559565
if index in SKIP_IN_PATH:
560566
raise ValueError("Empty value passed for parameter 'index'")
@@ -765,17 +771,19 @@ async def resume_auto_follow_pattern(
765771
"""
766772
.. raw:: html
767773
768-
<p>Resume an auto-follow pattern.
769-
Resume a cross-cluster replication auto-follow pattern that was paused.
774+
<p>Resume an auto-follow pattern.</p>
775+
<p>Resume a cross-cluster replication auto-follow pattern that was paused.
770776
The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster.
771777
Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.</p>
772778
773779
774780
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_
775781
776-
:param name: The name of the auto follow pattern to resume discovering new indices
777-
to follow.
778-
:param master_timeout: Period to wait for a connection to the master node.
782+
:param name: The name of the auto-follow pattern to resume.
783+
:param master_timeout: The period to wait for a connection to the master node.
784+
If the master node is not available before the timeout expires, the request
785+
fails and returns an error. It can also be set to `-1` to indicate that the
786+
request should never timeout.
779787
"""
780788
if name in SKIP_IN_PATH:
781789
raise ValueError("Empty value passed for parameter 'name'")
@@ -934,15 +942,18 @@ async def stats(
934942
"""
935943
.. raw:: html
936944
937-
<p>Get cross-cluster replication stats.
938-
This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>
945+
<p>Get cross-cluster replication stats.</p>
946+
<p>This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>
939947
940948
941949
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_
942950
943-
:param master_timeout: Period to wait for a connection to the master node.
944-
:param timeout: Period to wait for a response. If no response is received before
945-
the timeout expires, the request fails and returns an error.
951+
:param master_timeout: The period to wait for a connection to the master node.
952+
If the master node is not available before the timeout expires, the request
953+
fails and returns an error. It can also be set to `-1` to indicate that the
954+
request should never timeout.
955+
:param timeout: The period to wait for a response. If no response is received
956+
before the timeout expires, the request fails and returns an error.
946957
"""
947958
__path_parts: t.Dict[str, str] = {}
948959
__path = "/_ccr/stats"
@@ -983,18 +994,23 @@ async def unfollow(
983994
"""
984995
.. raw:: html
985996
986-
<p>Unfollow an index.
987-
Convert a cross-cluster replication follower index to a regular index.
997+
<p>Unfollow an index.</p>
998+
<p>Convert a cross-cluster replication follower index to a regular index.
988999
The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
9891000
The follower index must be paused and closed before you call the unfollow API.</p>
990-
<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>
1001+
<blockquote>
1002+
<p>info
1003+
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>
1004+
</blockquote>
9911005
9921006
9931007
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_
9941008
995-
:param index: The name of the follower index that should be turned into a regular
996-
index.
997-
:param master_timeout: Period to wait for a connection to the master node.
1009+
:param index: The name of the follower index.
1010+
:param master_timeout: The period to wait for a connection to the master node.
1011+
If the master node is not available before the timeout expires, the request
1012+
fails and returns an error. It can also be set to `-1` to indicate that the
1013+
request should never timeout.
9981014
"""
9991015
if index in SKIP_IN_PATH:
10001016
raise ValueError("Empty value passed for parameter 'index'")

elasticsearch/_async/client/cluster.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -920,9 +920,16 @@ async def remote_info(
920920
"""
921921
.. raw:: html
922922
923-
<p>Get remote cluster information.
924-
Get all of the configured remote cluster information.
925-
This API returns connection and endpoint information keyed by the configured remote cluster alias.</p>
923+
<p>Get remote cluster information.</p>
924+
<p>Get information about configured remote clusters.
925+
The API returns connection and endpoint information keyed by the configured remote cluster alias.</p>
926+
<blockquote>
927+
<p>info
928+
This API returns information that reflects current state on the local cluster.
929+
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.
930+
Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster.
931+
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>
932+
</blockquote>
926933
927934
928935
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-remote-info.html>`_

elasticsearch/_async/client/eql.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def delete(
4343
The API also deletes results for the search.</p>
4444
4545
46-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/eql-search-api.html>`_
46+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-eql-delete>`_
4747
4848
:param id: Identifier for the search to delete. A search ID is provided in the
4949
EQL search API's response for an async search. A search ID is also provided
@@ -251,8 +251,15 @@ async def search(
251251
:param index: The name of the index to scope the operation
252252
:param query: EQL query you wish to run.
253253
:param allow_no_indices:
254-
:param allow_partial_search_results:
255-
:param allow_partial_sequence_results:
254+
:param allow_partial_search_results: Allow query execution also in case of shard
255+
failures. If true, the query will keep running and will return results based
256+
on the available shards. For sequences, the behavior can be further refined
257+
using allow_partial_sequence_results
258+
:param allow_partial_sequence_results: This flag applies only to sequences and
259+
has effect only if allow_partial_search_results=true. If true, the sequence
260+
query will return results based on the available shards, ignoring the others.
261+
If false, the sequence query will return successfully, but will always have
262+
empty results.
256263
:param case_sensitive:
257264
:param event_category_field: Field containing the event classification, such
258265
as process, file, or network.

elasticsearch/_async/client/esql.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,61 @@ async def async_query_get(
298298
path_parts=__path_parts,
299299
)
300300

301+
@_rewrite_parameters()
302+
async def async_query_stop(
303+
self,
304+
*,
305+
id: str,
306+
drop_null_columns: t.Optional[bool] = None,
307+
error_trace: t.Optional[bool] = None,
308+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
309+
human: t.Optional[bool] = None,
310+
pretty: t.Optional[bool] = None,
311+
) -> ObjectApiResponse[t.Any]:
312+
"""
313+
.. raw:: html
314+
315+
<p>Stop async ES|QL query.</p>
316+
<p>This API interrupts the query execution and returns the results so far.
317+
If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.</p>
318+
319+
320+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-stop-api.html>`_
321+
322+
:param id: The unique identifier of the query. A query ID is provided in the
323+
ES|QL async query API response for a query that does not complete in the
324+
designated time. A query ID is also provided when the request was submitted
325+
with the `keep_on_completion` parameter set to `true`.
326+
:param drop_null_columns: Indicates whether columns that are entirely `null`
327+
will be removed from the `columns` and `values` portion of the results. If
328+
`true`, the response will include an extra section under the name `all_columns`
329+
which has the name of all the columns.
330+
"""
331+
if id in SKIP_IN_PATH:
332+
raise ValueError("Empty value passed for parameter 'id'")
333+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
334+
__path = f'/_query/async/{__path_parts["id"]}/stop'
335+
__query: t.Dict[str, t.Any] = {}
336+
if drop_null_columns is not None:
337+
__query["drop_null_columns"] = drop_null_columns
338+
if error_trace is not None:
339+
__query["error_trace"] = error_trace
340+
if filter_path is not None:
341+
__query["filter_path"] = filter_path
342+
if human is not None:
343+
__query["human"] = human
344+
if pretty is not None:
345+
__query["pretty"] = pretty
346+
__headers = {"accept": "application/json"}
347+
return await self.perform_request( # type: ignore[return-value]
348+
"POST",
349+
__path,
350+
params=__query,
351+
headers=__headers,
352+
endpoint_id="esql.async_query_stop",
353+
path_parts=__path_parts,
354+
)
355+
301356
@_rewrite_parameters(
302357
body_fields=(
303358
"query",

elasticsearch/_async/client/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def reset_features(
102102
<p>IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.</p>
103103
104104
105-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
105+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/reset-features-api.html>`_
106106
107107
:param master_timeout: Period to wait for a connection to the master node.
108108
"""

elasticsearch/_async/client/fleet.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ async def global_checkpoints(
4848
"""
4949
.. raw:: html
5050
51-
<p>Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.</p>
51+
<p>Get global checkpoints.</p>
52+
<p>Get the current global checkpoints for an index.
53+
This API is designed for internal use by the Fleet server project.</p>
5254
5355
5456
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-global-checkpoints.html>`_
@@ -141,6 +143,8 @@ async def msearch(
141143
supports the wait_for_checkpoints parameter.</p>
142144
143145
146+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/fleet-multi-search.html>`_
147+
144148
:param searches:
145149
:param index: A single target to search. If the target is an index alias, it
146150
must resolve to a single index.
@@ -388,6 +392,8 @@ async def search(
388392
after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
389393
390394
395+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/fleet-search.html>`_
396+
391397
:param index: A single target to search. If the target is an index alias, it
392398
must resolve to a single index.
393399
:param aggregations:

elasticsearch/_async/client/ilm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ async def get_status(
214214
"""
215215
.. raw:: html
216216
217-
<p>Get the ILM status.
218-
Get the current index lifecycle management status.</p>
217+
<p>Get the ILM status.</p>
218+
<p>Get the current index lifecycle management status.</p>
219219
220220
221221
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-get-status.html>`_

0 commit comments

Comments
 (0)