Skip to content

Commit 120a8a8

Browse files
Auto-generated API code (#2823)
1 parent 5af828d commit 120a8a8

Some content is hidden

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

84 files changed

+3546
-1938
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 821 additions & 271 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/async_search.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def delete(
4444
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>
4545
4646
47-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
47+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
4848
4949
:param id: A unique identifier for the async search.
5050
"""
@@ -94,11 +94,11 @@ async def get(
9494
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>
9595
9696
97-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
97+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
9898
9999
:param id: A unique identifier for the async search.
100-
:param keep_alive: Specifies how long the async search should be available in
101-
the cluster. When not specified, the `keep_alive` set with the corresponding
100+
:param keep_alive: The length of time that the async search should be available
101+
in the cluster. When not specified, the `keep_alive` set with the corresponding
102102
submit async request will be used. Otherwise, it is possible to override
103103
the value and extend the validity of the request. When this period expires,
104104
the search, if still running, is cancelled. If the search is completed, its
@@ -157,13 +157,17 @@ async def status(
157157
158158
<p>Get the async search status.</p>
159159
<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>
160+
If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:</p>
161+
<ul>
162+
<li>The user or API key that submitted the original async search request.</li>
163+
<li>Users that have the <code>monitor</code> cluster privilege or greater privileges.</li>
164+
</ul>
161165
162166
163-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
167+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
164168
165169
:param id: A unique identifier for the async search.
166-
:param keep_alive: Specifies how long the async search needs to be available.
170+
:param keep_alive: The length of time that the async search needs to be available.
167171
Ongoing async searches and any saved search results are deleted after this
168172
period.
169173
"""
@@ -270,6 +274,7 @@ async def submit(
270274
ignore_throttled: t.Optional[bool] = None,
271275
ignore_unavailable: t.Optional[bool] = None,
272276
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
277+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
273278
keep_on_completion: t.Optional[bool] = None,
274279
knn: t.Optional[
275280
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -341,7 +346,7 @@ async def submit(
341346
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>
342347
343348
344-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
349+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
345350
346351
:param index: A comma-separated list of index names to search; use `_all` or
347352
empty string to perform the operation on all indices
@@ -384,6 +389,9 @@ async def submit(
384389
:param ignore_unavailable: Whether specified concrete indices should be ignored
385390
when unavailable (missing or closed)
386391
:param indices_boost: Boosts the _score of documents from specified indices.
392+
:param keep_alive: Specifies how long the async search needs to be available.
393+
Ongoing async searches and any saved search results are deleted after this
394+
period.
387395
:param keep_on_completion: If `true`, results are stored for later retrieval
388396
when the search completes within the `wait_for_completion_timeout`.
389397
:param knn: Defines the approximate kNN search to run.
@@ -510,6 +518,8 @@ async def submit(
510518
__query["ignore_throttled"] = ignore_throttled
511519
if ignore_unavailable is not None:
512520
__query["ignore_unavailable"] = ignore_unavailable
521+
if keep_alive is not None:
522+
__query["keep_alive"] = keep_alive
513523
if keep_on_completion is not None:
514524
__query["keep_on_completion"] = keep_on_completion
515525
if lenient is not None:

elasticsearch/_async/client/autoscaling.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def delete_autoscaling_policy(
4444
<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>
4545
4646
47-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-delete-autoscaling-policy.html>`_
47+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-delete-autoscaling-policy.html>`_
4848
4949
:param name: the name of the autoscaling policy
5050
:param master_timeout: Period to wait for a connection to the master node. If
@@ -104,7 +104,7 @@ async def get_autoscaling_capacity(
104104
Do not use this information to make autoscaling decisions.</p>
105105
106106
107-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
107+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html>`_
108108
109109
:param master_timeout: Period to wait for a connection to the master node. If
110110
no response is received before the timeout expires, the request fails and
@@ -151,7 +151,7 @@ async def get_autoscaling_policy(
151151
<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>
152152
153153
154-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
154+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html>`_
155155
156156
:param name: the name of the autoscaling policy
157157
:param master_timeout: Period to wait for a connection to the master node. If
@@ -206,7 +206,7 @@ async def put_autoscaling_policy(
206206
<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>
207207
208208
209-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-put-autoscaling-policy.html>`_
209+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-put-autoscaling-policy.html>`_
210210
211211
:param name: the name of the autoscaling policy
212212
:param policy:

0 commit comments

Comments
 (0)