Skip to content

Commit 11efef1

Browse files
authored
Auto-generated code for 8.16 (#2721)
1 parent e79dd7d commit 11efef1

26 files changed

+242
-136
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ async def count(
872872
body: t.Optional[t.Dict[str, t.Any]] = None,
873873
) -> ObjectApiResponse[t.Any]:
874874
"""
875-
Returns number of documents matching a query.
875+
Count search results. Get the number of documents matching a query.
876876
877877
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-count.html>`_
878878
@@ -3079,6 +3079,7 @@ async def open_point_in_time(
30793079
*,
30803080
index: t.Union[str, t.Sequence[str]],
30813081
keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
3082+
allow_partial_search_results: t.Optional[bool] = None,
30823083
error_trace: t.Optional[bool] = None,
30833084
expand_wildcards: t.Optional[
30843085
t.Union[
@@ -3113,6 +3114,10 @@ async def open_point_in_time(
31133114
:param index: A comma-separated list of index names to open point in time; use
31143115
`_all` or empty string to perform the operation on all indices
31153116
:param keep_alive: Extends the time to live of the corresponding point in time.
3117+
:param allow_partial_search_results: If `false`, creating a point in time request
3118+
when a shard is missing or unavailable will throw an exception. If `true`,
3119+
the point in time will contain all the shards that are available at the time
3120+
of the request.
31163121
:param expand_wildcards: Type of index that wildcard patterns can match. If the
31173122
request can target data streams, this argument determines whether wildcard
31183123
expressions match hidden data streams. Supports comma-separated values, such
@@ -3135,6 +3140,8 @@ async def open_point_in_time(
31353140
__body: t.Dict[str, t.Any] = body if body is not None else {}
31363141
if keep_alive is not None:
31373142
__query["keep_alive"] = keep_alive
3143+
if allow_partial_search_results is not None:
3144+
__query["allow_partial_search_results"] = allow_partial_search_results
31383145
if error_trace is not None:
31393146
__query["error_trace"] = error_trace
31403147
if expand_wildcards is not None:

elasticsearch/_async/client/async_search.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ async def status(
145145
error_trace: t.Optional[bool] = None,
146146
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
147147
human: t.Optional[bool] = None,
148+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
148149
pretty: t.Optional[bool] = None,
149150
) -> ObjectApiResponse[t.Any]:
150151
"""
@@ -156,6 +157,9 @@ async def status(
156157
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
157158
158159
:param id: A unique identifier for the async search.
160+
:param keep_alive: Specifies how long the async search needs to be available.
161+
Ongoing async searches and any saved search results are deleted after this
162+
period.
159163
"""
160164
if id in SKIP_IN_PATH:
161165
raise ValueError("Empty value passed for parameter 'id'")
@@ -168,6 +172,8 @@ async def status(
168172
__query["filter_path"] = filter_path
169173
if human is not None:
170174
__query["human"] = human
175+
if keep_alive is not None:
176+
__query["keep_alive"] = keep_alive
171177
if pretty is not None:
172178
__query["pretty"] = pretty
173179
__headers = {"accept": "application/json"}
@@ -283,7 +289,6 @@ async def submit(
283289
routing: t.Optional[str] = None,
284290
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
285291
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
286-
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
287292
search_after: t.Optional[
288293
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
289294
] = None,
@@ -412,7 +417,6 @@ async def submit(
412417
These fields take precedence over mapped fields with the same name.
413418
:param script_fields: Retrieve a script evaluation (based on different fields)
414419
for each hit.
415-
:param scroll:
416420
:param search_after:
417421
:param search_type: Search operation type
418422
:param seq_no_primary_term: If true, returns sequence number and primary term
@@ -533,8 +537,6 @@ async def submit(
533537
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
534538
if routing is not None:
535539
__query["routing"] = routing
536-
if scroll is not None:
537-
__query["scroll"] = scroll
538540
if search_type is not None:
539541
__query["search_type"] = search_type
540542
if source_excludes is not None:

elasticsearch/_async/client/autoscaling.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ async def delete_autoscaling_policy(
3333
error_trace: t.Optional[bool] = None,
3434
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3535
human: t.Optional[bool] = None,
36+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3637
pretty: t.Optional[bool] = None,
38+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3739
) -> ObjectApiResponse[t.Any]:
3840
"""
3941
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
@@ -43,6 +45,11 @@ async def delete_autoscaling_policy(
4345
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-delete-autoscaling-policy.html>`_
4446
4547
:param name: the name of the autoscaling policy
48+
:param master_timeout: Period to wait for a connection to the master node. If
49+
no response is received before the timeout expires, the request fails and
50+
returns an error.
51+
:param timeout: Period to wait for a response. If no response is received before
52+
the timeout expires, the request fails and returns an error.
4653
"""
4754
if name in SKIP_IN_PATH:
4855
raise ValueError("Empty value passed for parameter 'name'")
@@ -55,8 +62,12 @@ async def delete_autoscaling_policy(
5562
__query["filter_path"] = filter_path
5663
if human is not None:
5764
__query["human"] = human
65+
if master_timeout is not None:
66+
__query["master_timeout"] = master_timeout
5867
if pretty is not None:
5968
__query["pretty"] = pretty
69+
if timeout is not None:
70+
__query["timeout"] = timeout
6071
__headers = {"accept": "application/json"}
6172
return await self.perform_request( # type: ignore[return-value]
6273
"DELETE",
@@ -74,6 +85,7 @@ async def get_autoscaling_capacity(
7485
error_trace: t.Optional[bool] = None,
7586
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
7687
human: t.Optional[bool] = None,
88+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
7789
pretty: t.Optional[bool] = None,
7890
) -> ObjectApiResponse[t.Any]:
7991
"""
@@ -91,6 +103,10 @@ async def get_autoscaling_capacity(
91103
use this information to make autoscaling decisions.
92104
93105
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
106+
107+
:param master_timeout: Period to wait for a connection to the master node. If
108+
no response is received before the timeout expires, the request fails and
109+
returns an error.
94110
"""
95111
__path_parts: t.Dict[str, str] = {}
96112
__path = "/_autoscaling/capacity"
@@ -101,6 +117,8 @@ async def get_autoscaling_capacity(
101117
__query["filter_path"] = filter_path
102118
if human is not None:
103119
__query["human"] = human
120+
if master_timeout is not None:
121+
__query["master_timeout"] = master_timeout
104122
if pretty is not None:
105123
__query["pretty"] = pretty
106124
__headers = {"accept": "application/json"}
@@ -121,6 +139,7 @@ async def get_autoscaling_policy(
121139
error_trace: t.Optional[bool] = None,
122140
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
123141
human: t.Optional[bool] = None,
142+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
124143
pretty: t.Optional[bool] = None,
125144
) -> ObjectApiResponse[t.Any]:
126145
"""
@@ -131,6 +150,9 @@ async def get_autoscaling_policy(
131150
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
132151
133152
:param name: the name of the autoscaling policy
153+
:param master_timeout: Period to wait for a connection to the master node. If
154+
no response is received before the timeout expires, the request fails and
155+
returns an error.
134156
"""
135157
if name in SKIP_IN_PATH:
136158
raise ValueError("Empty value passed for parameter 'name'")
@@ -143,6 +165,8 @@ async def get_autoscaling_policy(
143165
__query["filter_path"] = filter_path
144166
if human is not None:
145167
__query["human"] = human
168+
if master_timeout is not None:
169+
__query["master_timeout"] = master_timeout
146170
if pretty is not None:
147171
__query["pretty"] = pretty
148172
__headers = {"accept": "application/json"}
@@ -167,7 +191,9 @@ async def put_autoscaling_policy(
167191
error_trace: t.Optional[bool] = None,
168192
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
169193
human: t.Optional[bool] = None,
194+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
170195
pretty: t.Optional[bool] = None,
196+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
171197
) -> ObjectApiResponse[t.Any]:
172198
"""
173199
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
@@ -178,6 +204,11 @@ async def put_autoscaling_policy(
178204
179205
:param name: the name of the autoscaling policy
180206
:param policy:
207+
:param master_timeout: Period to wait for a connection to the master node. If
208+
no response is received before the timeout expires, the request fails and
209+
returns an error.
210+
:param timeout: Period to wait for a response. If no response is received before
211+
the timeout expires, the request fails and returns an error.
181212
"""
182213
if name in SKIP_IN_PATH:
183214
raise ValueError("Empty value passed for parameter 'name'")
@@ -196,8 +227,12 @@ async def put_autoscaling_policy(
196227
__query["filter_path"] = filter_path
197228
if human is not None:
198229
__query["human"] = human
230+
if master_timeout is not None:
231+
__query["master_timeout"] = master_timeout
199232
if pretty is not None:
200233
__query["pretty"] = pretty
234+
if timeout is not None:
235+
__query["timeout"] = timeout
201236
__body = policy if policy is not None else body
202237
__headers = {"accept": "application/json", "content-type": "application/json"}
203238
return await self.perform_request( # type: ignore[return-value]

elasticsearch/_async/client/enrich.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def execute_policy(
7777
wait_for_completion: t.Optional[bool] = None,
7878
) -> ObjectApiResponse[t.Any]:
7979
"""
80-
Creates the enrich index for an existing enrich policy.
80+
Run an enrich policy. Create the enrich index for an existing enrich policy.
8181
8282
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/execute-enrich-policy-api.html>`_
8383

elasticsearch/_async/client/eql.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ async def delete(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Deletes an async EQL search or a stored synchronous EQL search. The API also
40-
deletes results for the search.
39+
Delete an async EQL search. Delete an async EQL search or a stored synchronous
40+
EQL search. The API also deletes results for the search.
4141
4242
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/eql-search-api.html>`_
4343
@@ -83,8 +83,8 @@ async def get(
8383
] = None,
8484
) -> ObjectApiResponse[t.Any]:
8585
"""
86-
Returns the current status and available results for an async EQL search or a
87-
stored synchronous EQL search.
86+
Get async EQL search results. Get the current status and available results for
87+
an async EQL search or a stored synchronous EQL search.
8888
8989
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-async-eql-search-api.html>`_
9090
@@ -134,8 +134,8 @@ async def get_status(
134134
pretty: t.Optional[bool] = None,
135135
) -> ObjectApiResponse[t.Any]:
136136
"""
137-
Returns the current status for an async EQL search or a stored synchronous EQL
138-
search without returning results.
137+
Get the async EQL status. Get the current status for an async EQL search or a
138+
stored synchronous EQL search without returning results.
139139
140140
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-async-eql-status-api.html>`_
141141
@@ -223,7 +223,9 @@ async def search(
223223
body: t.Optional[t.Dict[str, t.Any]] = None,
224224
) -> ObjectApiResponse[t.Any]:
225225
"""
226-
Returns results matching a query expressed in Event Query Language (EQL)
226+
Get EQL search results. Returns search results for an Event Query Language (EQL)
227+
query. EQL assumes each document in a data stream or index corresponds to an
228+
event.
227229
228230
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/eql-search-api.html>`_
229231

elasticsearch/_async/client/esql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ async def query(
6868
body: t.Optional[t.Dict[str, t.Any]] = None,
6969
) -> ObjectApiResponse[t.Any]:
7070
"""
71-
Executes an ES|QL request
71+
Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query language)
72+
query.
7273
7374
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/esql-rest.html>`_
7475

elasticsearch/_async/client/graph.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ async def explore(
4545
body: t.Optional[t.Dict[str, t.Any]] = None,
4646
) -> ObjectApiResponse[t.Any]:
4747
"""
48-
Extracts and summarizes information about the documents and terms in an Elasticsearch
49-
data stream or index.
48+
Explore graph analytics. Extract and summarize information about the documents
49+
and terms in an Elasticsearch data stream or index. The easiest way to understand
50+
the behavior of this API is to use the Graph UI to explore connections. An initial
51+
request to the `_explore` API contains a seed query that identifies the documents
52+
of interest and specifies the fields that define the vertices and connections
53+
you want to include in the graph. Subsequent requests enable you to spider out
54+
from one more vertices of interest. You can exclude vertices that have already
55+
been returned.
5056
5157
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/graph-explore-api.html>`_
5258

elasticsearch/_async/client/indices.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ async def exists_index_template(
13541354
pretty: t.Optional[bool] = None,
13551355
) -> HeadApiResponse:
13561356
"""
1357-
Returns information about whether a particular index template exists.
1357+
Check index templates. Check whether index templates exist.
13581358
13591359
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/index-templates.html>`_
13601360
@@ -3698,8 +3698,8 @@ async def resolve_index(
36983698
pretty: t.Optional[bool] = None,
36993699
) -> ObjectApiResponse[t.Any]:
37003700
"""
3701-
Resolves the specified name(s) and/or index patterns for indices, aliases, and
3702-
data streams. Multiple patterns and remote clusters are supported.
3701+
Resolve indices. Resolve the names and/or index patterns for indices, aliases,
3702+
and data streams. Multiple patterns and remote clusters are supported.
37033703
37043704
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-resolve-index-api.html>`_
37053705

elasticsearch/_async/client/inference.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,12 @@
2020
from elastic_transport import ObjectApiResponse
2121

2222
from ._base import NamespacedClient
23-
from .utils import (
24-
SKIP_IN_PATH,
25-
Stability,
26-
_quote,
27-
_rewrite_parameters,
28-
_stability_warning,
29-
)
23+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
3024

3125

3226
class InferenceClient(NamespacedClient):
3327

3428
@_rewrite_parameters()
35-
@_stability_warning(Stability.EXPERIMENTAL)
3629
async def delete(
3730
self,
3831
*,
@@ -100,7 +93,6 @@ async def delete(
10093
)
10194

10295
@_rewrite_parameters()
103-
@_stability_warning(Stability.EXPERIMENTAL)
10496
async def get(
10597
self,
10698
*,
@@ -159,7 +151,6 @@ async def get(
159151
@_rewrite_parameters(
160152
body_fields=("input", "query", "task_settings"),
161153
)
162-
@_stability_warning(Stability.EXPERIMENTAL)
163154
async def inference(
164155
self,
165156
*,
@@ -246,7 +237,6 @@ async def inference(
246237
@_rewrite_parameters(
247238
body_name="inference_config",
248239
)
249-
@_stability_warning(Stability.EXPERIMENTAL)
250240
async def put(
251241
self,
252242
*,

0 commit comments

Comments
 (0)