Skip to content

Commit 1729378

Browse files
Auto-generated code for 8.17 (#2804)
* Auto-generated API code * Fix esql imports * Fix lint --------- Co-authored-by: Quentin Pradet <[email protected]>
1 parent 17eb3dc commit 1729378

Some content is hidden

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

82 files changed

+12790
-7034
lines changed

Diff for: elasticsearch/_async/client/__init__.py

+1,971-779
Large diffs are not rendered by default.

Diff for: elasticsearch/_async/client/async_search.py

+33-22
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ async def delete(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Delete an async search. If the asynchronous search is still running, it is cancelled.
40-
Otherwise, the saved search results are deleted. If the Elasticsearch security
41-
features are enabled, the deletion of a specific async search is restricted to:
42-
the authenticated user that submitted the original search request; users that
43-
have the `cancel_task` cluster privilege.
39+
.. raw:: html
40+
41+
<p>Delete an async search.</p>
42+
<p>If the asynchronous search is still running, it is cancelled.
43+
Otherwise, the saved search results are deleted.
44+
If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the <code>cancel_task</code> cluster privilege.</p>
45+
4446
4547
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
4648
@@ -85,10 +87,12 @@ async def get(
8587
] = None,
8688
) -> ObjectApiResponse[t.Any]:
8789
"""
88-
Get async search results. Retrieve the results of a previously submitted asynchronous
89-
search request. If the Elasticsearch security features are enabled, access to
90-
the results of a specific async search is restricted to the user or API key that
91-
submitted it.
90+
.. raw:: html
91+
92+
<p>Get async search results.</p>
93+
<p>Retrieve the results of a previously submitted asynchronous search request.
94+
If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.</p>
95+
9296
9397
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
9498
@@ -149,10 +153,12 @@ async def status(
149153
pretty: t.Optional[bool] = None,
150154
) -> ObjectApiResponse[t.Any]:
151155
"""
152-
Get the async search status. Get the status of a previously submitted async search
153-
request given its identifier, without retrieving search results. If the Elasticsearch
154-
security features are enabled, use of this API is restricted to the `monitoring_user`
155-
role.
156+
.. raw:: html
157+
158+
<p>Get the async search status.</p>
159+
<p>Get the status of a previously submitted async search request given its identifier, without retrieving search results.
160+
If the Elasticsearch security features are enabled, use of this API is restricted to the <code>monitoring_user</code> role.</p>
161+
156162
157163
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
158164
@@ -264,6 +270,7 @@ async def submit(
264270
ignore_throttled: t.Optional[bool] = None,
265271
ignore_unavailable: t.Optional[bool] = None,
266272
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
273+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
267274
keep_on_completion: t.Optional[bool] = None,
268275
knn: t.Optional[
269276
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -326,15 +333,14 @@ async def submit(
326333
body: t.Optional[t.Dict[str, t.Any]] = None,
327334
) -> ObjectApiResponse[t.Any]:
328335
"""
329-
Run an async search. When the primary sort of the results is an indexed field,
330-
shards get sorted based on minimum and maximum value that they hold for that
331-
field. Partial results become available following the sort criteria that was
332-
requested. Warning: Asynchronous search does not support scroll or search requests
333-
that include only the suggest section. By default, Elasticsearch does not allow
334-
you to store an async search response larger than 10Mb and an attempt to do this
335-
results in an error. The maximum allowed size for a stored async search response
336-
can be set by changing the `search.max_async_search_response_size` cluster level
337-
setting.
336+
.. raw:: html
337+
338+
<p>Run an async search.</p>
339+
<p>When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.</p>
340+
<p>Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.</p>
341+
<p>By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
342+
The maximum allowed size for a stored async search response can be set by changing the <code>search.max_async_search_response_size</code> cluster level setting.</p>
343+
338344
339345
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
340346
@@ -379,6 +385,9 @@ async def submit(
379385
:param ignore_unavailable: Whether specified concrete indices should be ignored
380386
when unavailable (missing or closed)
381387
:param indices_boost: Boosts the _score of documents from specified indices.
388+
:param keep_alive: Specifies how long the async search needs to be available.
389+
Ongoing async searches and any saved search results are deleted after this
390+
period.
382391
:param keep_on_completion: If `true`, results are stored for later retrieval
383392
when the search completes within the `wait_for_completion_timeout`.
384393
:param knn: Defines the approximate kNN search to run.
@@ -505,6 +514,8 @@ async def submit(
505514
__query["ignore_throttled"] = ignore_throttled
506515
if ignore_unavailable is not None:
507516
__query["ignore_unavailable"] = ignore_unavailable
517+
if keep_alive is not None:
518+
__query["keep_alive"] = keep_alive
508519
if keep_on_completion is not None:
509520
__query["keep_on_completion"] = keep_on_completion
510521
if lenient is not None:

Diff for: elasticsearch/_async/client/autoscaling.py

+27-21
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ async def delete_autoscaling_policy(
3838
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3939
) -> ObjectApiResponse[t.Any]:
4040
"""
41-
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
42-
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
43-
Direct use is not supported.
41+
.. raw:: html
42+
43+
<p>Delete an autoscaling policy.</p>
44+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
45+
4446
4547
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-delete-autoscaling-policy.html>`_
4648
@@ -89,18 +91,18 @@ async def get_autoscaling_capacity(
8991
pretty: t.Optional[bool] = None,
9092
) -> ObjectApiResponse[t.Any]:
9193
"""
92-
Get the autoscaling capacity. NOTE: This feature is designed for indirect use
93-
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
94-
Direct use is not supported. This API gets the current autoscaling capacity based
95-
on the configured autoscaling policy. It will return information to size the
96-
cluster appropriately to the current workload. The `required_capacity` is calculated
97-
as the maximum of the `required_capacity` result of all individual deciders that
98-
are enabled for the policy. The operator should verify that the `current_nodes`
99-
match the operator’s knowledge of the cluster to avoid making autoscaling decisions
100-
based on stale or incomplete information. The response contains decider-specific
101-
information you can use to diagnose how and why autoscaling determined a certain
102-
capacity was required. This information is provided for diagnosis only. Do not
103-
use this information to make autoscaling decisions.
94+
.. raw:: html
95+
96+
<p>Get the autoscaling capacity.</p>
97+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
98+
<p>This API gets the current autoscaling capacity based on the configured autoscaling policy.
99+
It will return information to size the cluster appropriately to the current workload.</p>
100+
<p>The <code>required_capacity</code> is calculated as the maximum of the <code>required_capacity</code> result of all individual deciders that are enabled for the policy.</p>
101+
<p>The operator should verify that the <code>current_nodes</code> match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.</p>
102+
<p>The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.
103+
This information is provided for diagnosis only.
104+
Do not use this information to make autoscaling decisions.</p>
105+
104106
105107
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
106108
@@ -143,9 +145,11 @@ async def get_autoscaling_policy(
143145
pretty: t.Optional[bool] = None,
144146
) -> ObjectApiResponse[t.Any]:
145147
"""
146-
Get an autoscaling policy. NOTE: This feature is designed for indirect use by
147-
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
148-
Direct use is not supported.
148+
.. raw:: html
149+
150+
<p>Get an autoscaling policy.</p>
151+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
152+
149153
150154
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
151155
@@ -196,9 +200,11 @@ async def put_autoscaling_policy(
196200
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
197201
) -> ObjectApiResponse[t.Any]:
198202
"""
199-
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
200-
use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
201-
Kubernetes. Direct use is not supported.
203+
.. raw:: html
204+
205+
<p>Create or update an autoscaling policy.</p>
206+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
207+
202208
203209
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-put-autoscaling-policy.html>`_
204210

0 commit comments

Comments
 (0)