Skip to content

Commit 9793f18

Browse files
Auto-generated API code
1 parent e66c39c commit 9793f18

37 files changed

+1413
-862
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 40 additions & 197 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/cat.py

Lines changed: 393 additions & 25 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/cluster.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ async def allocation_explain(
5151
Get explanations for shard allocations in the cluster.
5252
For unassigned shards, it provides an explanation for why the shard is unassigned.
5353
For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.
54-
This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.</p>
54+
This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.
55+
Refer to the linked documentation for examples of how to troubleshoot allocation issues using this API.</p>
5556
5657
5758
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-cluster-allocation-explain>`_
@@ -290,6 +291,7 @@ async def get_component_template(
290291
local: t.Optional[bool] = None,
291292
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
292293
pretty: t.Optional[bool] = None,
294+
settings_filter: t.Optional[t.Union[str, t.Sequence[str]]] = None,
293295
) -> ObjectApiResponse[t.Any]:
294296
"""
295297
.. raw:: html
@@ -310,6 +312,8 @@ async def get_component_template(
310312
:param master_timeout: Period to wait for a connection to the master node. If
311313
no response is received before the timeout expires, the request fails and
312314
returns an error.
315+
:param settings_filter: Filter out results, for example to filter out sensitive
316+
information. Supports wildcards or full settings keys
313317
"""
314318
__path_parts: t.Dict[str, str]
315319
if name not in SKIP_IN_PATH:
@@ -335,6 +339,8 @@ async def get_component_template(
335339
__query["master_timeout"] = master_timeout
336340
if pretty is not None:
337341
__query["pretty"] = pretty
342+
if settings_filter is not None:
343+
__query["settings_filter"] = settings_filter
338344
__headers = {"accept": "application/json"}
339345
return await self.perform_request( # type: ignore[return-value]
340346
"GET",
@@ -441,7 +447,7 @@ async def health(
441447
wait_for_no_relocating_shards: t.Optional[bool] = None,
442448
wait_for_nodes: t.Optional[t.Union[int, str]] = None,
443449
wait_for_status: t.Optional[
444-
t.Union[str, t.Literal["green", "red", "yellow"]]
450+
t.Union[str, t.Literal["green", "red", "unavailable", "unknown", "yellow"]]
445451
] = None,
446452
) -> ObjectApiResponse[t.Any]:
447453
"""
@@ -731,6 +737,7 @@ async def put_component_template(
731737
*,
732738
name: str,
733739
template: t.Optional[t.Mapping[str, t.Any]] = None,
740+
cause: t.Optional[str] = None,
734741
create: t.Optional[bool] = None,
735742
deprecated: t.Optional[bool] = None,
736743
error_trace: t.Optional[bool] = None,
@@ -774,6 +781,7 @@ async def put_component_template(
774781
update settings API.
775782
:param template: The template to be applied which includes mappings, settings,
776783
or aliases configuration.
784+
:param cause: User defined reason for create the component template.
777785
:param create: If `true`, this request cannot replace or update existing component
778786
templates.
779787
:param deprecated: Marks this index template as deprecated. When creating or
@@ -798,6 +806,8 @@ async def put_component_template(
798806
__path = f'/_component_template/{__path_parts["name"]}'
799807
__query: t.Dict[str, t.Any] = {}
800808
__body: t.Dict[str, t.Any] = body if body is not None else {}
809+
if cause is not None:
810+
__query["cause"] = cause
801811
if create is not None:
802812
__query["create"] = create
803813
if error_trace is not None:
@@ -870,9 +880,9 @@ async def put_settings(
870880
871881
:param flat_settings: Return settings in flat format (default: false)
872882
:param master_timeout: Explicit operation timeout for connection to master node
873-
:param persistent:
883+
:param persistent: The settings that persist after the cluster restarts.
874884
:param timeout: Explicit operation timeout
875-
:param transient:
885+
:param transient: The settings that do not persist after the cluster restarts.
876886
"""
877887
__path_parts: t.Dict[str, str] = {}
878888
__path = "/_cluster/settings"

elasticsearch/_async/client/eql.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ async def search(
204204
allow_partial_search_results: t.Optional[bool] = None,
205205
allow_partial_sequence_results: t.Optional[bool] = None,
206206
case_sensitive: t.Optional[bool] = None,
207+
ccs_minimize_roundtrips: t.Optional[bool] = None,
207208
error_trace: t.Optional[bool] = None,
208209
event_category_field: t.Optional[str] = None,
209210
expand_wildcards: t.Optional[
@@ -250,7 +251,9 @@ async def search(
250251
251252
:param index: The name of the index to scope the operation
252253
:param query: EQL query you wish to run.
253-
:param allow_no_indices:
254+
:param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
255+
into no concrete indices. (This includes `_all` string or when no indices
256+
have been specified)
254257
:param allow_partial_search_results: Allow query execution also in case of shard
255258
failures. If true, the query will keep running and will return results based
256259
on the available shards. For sequences, the behavior can be further refined
@@ -261,9 +264,12 @@ async def search(
261264
If false, the sequence query will return successfully, but will always have
262265
empty results.
263266
:param case_sensitive:
267+
:param ccs_minimize_roundtrips: Indicates whether network round-trips should
268+
be minimized as part of cross-cluster search requests execution
264269
:param event_category_field: Field containing the event classification, such
265270
as process, file, or network.
266-
:param expand_wildcards:
271+
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
272+
that are open, closed or both.
267273
:param fetch_size: Maximum number of events to search at a time for sequence
268274
queries.
269275
:param fields: Array of wildcard (*) patterns. The response returns values for
@@ -298,6 +304,8 @@ async def search(
298304
__body: t.Dict[str, t.Any] = body if body is not None else {}
299305
if allow_no_indices is not None:
300306
__query["allow_no_indices"] = allow_no_indices
307+
if ccs_minimize_roundtrips is not None:
308+
__query["ccs_minimize_roundtrips"] = ccs_minimize_roundtrips
301309
if error_trace is not None:
302310
__query["error_trace"] = error_trace
303311
if expand_wildcards is not None:

elasticsearch/_async/client/esql.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class EsqlClient(NamespacedClient):
3131
"columnar",
3232
"filter",
3333
"include_ccs_metadata",
34+
"keep_alive",
35+
"keep_on_completion",
3436
"locale",
3537
"params",
3638
"profile",
@@ -145,10 +147,6 @@ async def async_query(
145147
__query["format"] = format
146148
if human is not None:
147149
__query["human"] = human
148-
if keep_alive is not None:
149-
__query["keep_alive"] = keep_alive
150-
if keep_on_completion is not None:
151-
__query["keep_on_completion"] = keep_on_completion
152150
if pretty is not None:
153151
__query["pretty"] = pretty
154152
if not __body:
@@ -160,6 +158,10 @@ async def async_query(
160158
__body["filter"] = filter
161159
if include_ccs_metadata is not None:
162160
__body["include_ccs_metadata"] = include_ccs_metadata
161+
if keep_alive is not None:
162+
__body["keep_alive"] = keep_alive
163+
if keep_on_completion is not None:
164+
__body["keep_on_completion"] = keep_on_completion
163165
if locale is not None:
164166
__body["locale"] = locale
165167
if params is not None:
@@ -242,6 +244,14 @@ async def async_query_get(
242244
drop_null_columns: t.Optional[bool] = None,
243245
error_trace: t.Optional[bool] = None,
244246
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
247+
format: t.Optional[
248+
t.Union[
249+
str,
250+
t.Literal[
251+
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
252+
],
253+
]
254+
] = None,
245255
human: t.Optional[bool] = None,
246256
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
247257
pretty: t.Optional[bool] = None,
@@ -267,6 +277,7 @@ async def async_query_get(
267277
will be removed from the `columns` and `values` portion of the results. If
268278
`true`, the response will include an extra section under the name `all_columns`
269279
which has the name of all the columns.
280+
:param format: A short version of the Accept header, for example `json` or `yaml`.
270281
:param keep_alive: The period for which the query and its results are stored
271282
in the cluster. When this period expires, the query and its results are deleted,
272283
even if the query is still ongoing.
@@ -287,6 +298,8 @@ async def async_query_get(
287298
__query["error_trace"] = error_trace
288299
if filter_path is not None:
289300
__query["filter_path"] = filter_path
301+
if format is not None:
302+
__query["format"] = format
290303
if human is not None:
291304
__query["human"] = human
292305
if keep_alive is not None:

0 commit comments

Comments
 (0)