Skip to content

Commit 038792b

Browse files
Auto-generated API code
1 parent e66c39c commit 038792b

35 files changed

+1317
-816
lines changed

elasticsearch/_async/client/__init__.py

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

elasticsearch/_async/client/cat.py

Lines changed: 466 additions & 24 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/cluster.py

Lines changed: 13 additions & 3 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",
@@ -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/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)