Skip to content

Commit 22e7b78

Browse files
authored
Auto-generated code for 8.17 (#2720)
1 parent f69cb3d commit 22e7b78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1208
-1112
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 51 additions & 44 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/async_search.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def delete(
4242
the authenticated user that submitted the original search request; users that
4343
have the `cancel_task` cluster privilege.
4444
45-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
45+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
4646
4747
:param id: A unique identifier for the async search.
4848
"""
@@ -90,7 +90,7 @@ async def get(
9090
the results of a specific async search is restricted to the user or API key that
9191
submitted it.
9292
93-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
93+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
9494
9595
:param id: A unique identifier for the async search.
9696
:param keep_alive: Specifies how long the async search should be available in
@@ -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
"""
@@ -153,9 +154,12 @@ async def status(
153154
security features are enabled, use of this API is restricted to the `monitoring_user`
154155
role.
155156
156-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
157+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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"}
@@ -258,7 +264,6 @@ async def submit(
258264
ignore_throttled: t.Optional[bool] = None,
259265
ignore_unavailable: t.Optional[bool] = None,
260266
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
261-
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
262267
keep_on_completion: t.Optional[bool] = None,
263268
knn: t.Optional[
264269
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -269,7 +274,6 @@ async def submit(
269274
min_score: t.Optional[float] = None,
270275
pit: t.Optional[t.Mapping[str, t.Any]] = None,
271276
post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
272-
pre_filter_shard_size: t.Optional[int] = None,
273277
preference: t.Optional[str] = None,
274278
pretty: t.Optional[bool] = None,
275279
profile: t.Optional[bool] = None,
@@ -283,7 +287,6 @@ async def submit(
283287
routing: t.Optional[str] = None,
284288
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
285289
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,
287290
search_after: t.Optional[
288291
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
289292
] = None,
@@ -333,7 +336,7 @@ async def submit(
333336
can be set by changing the `search.max_async_search_response_size` cluster level
334337
setting.
335338
336-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
339+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
337340
338341
:param index: A comma-separated list of index names to search; use `_all` or
339342
empty string to perform the operation on all indices
@@ -376,9 +379,6 @@ async def submit(
376379
:param ignore_unavailable: Whether specified concrete indices should be ignored
377380
when unavailable (missing or closed)
378381
:param indices_boost: Boosts the _score of documents from specified indices.
379-
:param keep_alive: Specifies how long the async search needs to be available.
380-
Ongoing async searches and any saved search results are deleted after this
381-
period.
382382
:param keep_on_completion: If `true`, results are stored for later retrieval
383383
when the search completes within the `wait_for_completion_timeout`.
384384
:param knn: Defines the approximate kNN search to run.
@@ -394,10 +394,6 @@ async def submit(
394394
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
395395
you cannot specify an <index> in the request path.
396396
:param post_filter:
397-
:param pre_filter_shard_size: The default value cannot be changed, which enforces
398-
the execution of a pre-filter roundtrip to retrieve statistics from each
399-
shard so that the ones that surely don’t hold any document matching the query
400-
get skipped.
401397
:param preference: Specify the node or shard the operation should be performed
402398
on (default: random)
403399
:param profile:
@@ -406,13 +402,13 @@ async def submit(
406402
:param request_cache: Specify if request cache should be used for this request
407403
or not, defaults to true
408404
:param rescore:
409-
:param rest_total_hits_as_int:
405+
:param rest_total_hits_as_int: Indicates whether hits.total should be rendered
406+
as an integer or an object in the rest search response
410407
:param routing: A comma-separated list of specific routing values
411408
:param runtime_mappings: Defines one or more runtime fields in the search request.
412409
These fields take precedence over mapped fields with the same name.
413410
:param script_fields: Retrieve a script evaluation (based on different fields)
414411
for each hit.
415-
:param scroll:
416412
:param search_after:
417413
:param search_type: Search operation type
418414
:param seq_no_primary_term: If true, returns sequence number and primary term
@@ -509,8 +505,6 @@ async def submit(
509505
__query["ignore_throttled"] = ignore_throttled
510506
if ignore_unavailable is not None:
511507
__query["ignore_unavailable"] = ignore_unavailable
512-
if keep_alive is not None:
513-
__query["keep_alive"] = keep_alive
514508
if keep_on_completion is not None:
515509
__query["keep_on_completion"] = keep_on_completion
516510
if lenient is not None:
@@ -519,8 +513,6 @@ async def submit(
519513
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
520514
if min_compatible_shard_node is not None:
521515
__query["min_compatible_shard_node"] = min_compatible_shard_node
522-
if pre_filter_shard_size is not None:
523-
__query["pre_filter_shard_size"] = pre_filter_shard_size
524516
if preference is not None:
525517
__query["preference"] = preference
526518
if pretty is not None:
@@ -533,8 +525,6 @@ async def submit(
533525
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
534526
if routing is not None:
535527
__query["routing"] = routing
536-
if scroll is not None:
537-
__query["scroll"] = scroll
538528
if search_type is not None:
539529
__query["search_type"] = search_type
540530
if source_excludes is not None:

elasticsearch/_async/client/autoscaling.py

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,23 @@ 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
4042
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
4143
Direct use is not supported.
4244
43-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-delete-autoscaling-policy.html>`_
45+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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
"""
@@ -90,7 +102,11 @@ async def get_autoscaling_capacity(
90102
capacity was required. This information is provided for diagnosis only. Do not
91103
use this information to make autoscaling decisions.
92104
93-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
105+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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,16 +139,20 @@ 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
"""
127146
Get an autoscaling policy. NOTE: This feature is designed for indirect use by
128147
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
129148
Direct use is not supported.
130149
131-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
150+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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,17 +191,24 @@ 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
174200
use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
175201
Kubernetes. Direct use is not supported.
176202
177-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-put-autoscaling-policy.html>`_
203+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-put-autoscaling-policy.html>`_
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]

0 commit comments

Comments
 (0)