Skip to content

Commit 4bdb13f

Browse files
Auto-generated API code
1 parent e66c39c commit 4bdb13f

29 files changed

+1251
-750
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 35 additions & 173 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: 4 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>`_
@@ -870,9 +871,9 @@ async def put_settings(
870871
871872
:param flat_settings: Return settings in flat format (default: false)
872873
:param master_timeout: Explicit operation timeout for connection to master node
873-
:param persistent:
874+
:param persistent: The settings that persist after the cluster restarts.
874875
:param timeout: Explicit operation timeout
875-
:param transient:
876+
:param transient: The settings that do not persist after the cluster restarts.
876877
"""
877878
__path_parts: t.Dict[str, str] = {}
878879
__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:

elasticsearch/_async/client/indices.py

Lines changed: 62 additions & 43 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/inference.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,33 @@ async def put(
374374
<p>IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
375375
For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
376376
However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.</p>
377+
<p>The following integrations are available through the inference API. You can find the available task types next to the integration name:</p>
378+
<ul>
379+
<li>AlibabaCloud AI Search (<code>completion</code>, <code>rerank</code>, <code>sparse_embedding</code>, <code>text_embedding</code>)</li>
380+
<li>Amazon Bedrock (<code>completion</code>, <code>text_embedding</code>)</li>
381+
<li>Anthropic (<code>completion</code>)</li>
382+
<li>Azure AI Studio (<code>completion</code>, <code>text_embedding</code>)</li>
383+
<li>Azure OpenAI (<code>completion</code>, <code>text_embedding</code>)</li>
384+
<li>Cohere (<code>completion</code>, <code>rerank</code>, <code>text_embedding</code>)</li>
385+
<li>Elasticsearch (<code>rerank</code>, <code>sparse_embedding</code>, <code>text_embedding</code> - this service is for built-in models and models uploaded through Eland)</li>
386+
<li>ELSER (<code>sparse_embedding</code>)</li>
387+
<li>Google AI Studio (<code>completion</code>, <code>text_embedding</code>)</li>
388+
<li>Google Vertex AI (<code>rerank</code>, <code>text_embedding</code>)</li>
389+
<li>Hugging Face (<code>text_embedding</code>)</li>
390+
<li>Mistral (<code>text_embedding</code>)</li>
391+
<li>OpenAI (<code>chat_completion</code>, <code>completion</code>, <code>text_embedding</code>)</li>
392+
<li>VoyageAI (<code>text_embedding</code>, <code>rerank</code>)</li>
393+
<li>Watsonx inference integration (<code>text_embedding</code>)</li>
394+
<li>JinaAI (<code>text_embedding</code>, <code>rerank</code>)</li>
395+
</ul>
377396
378397
379398
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-inference-put>`_
380399
381400
:param inference_id: The inference Id
382401
:param inference_config:
383-
:param task_type: The task type
402+
:param task_type: The task type. Refer to the integration list in the API description
403+
for the available task types.
384404
"""
385405
if inference_id in SKIP_IN_PATH:
386406
raise ValueError("Empty value passed for parameter 'inference_id'")
@@ -543,7 +563,7 @@ async def put_amazonbedrock(
543563
.. raw:: html
544564
545565
<p>Create an Amazon Bedrock inference endpoint.</p>
546-
<p>Creates an inference endpoint to perform an inference task with the <code>amazonbedrock</code> service.</p>
566+
<p>Create an inference endpoint to perform an inference task with the <code>amazonbedrock</code> service.</p>
547567
<blockquote>
548568
<p>info
549569
You need to provide the access and secret keys only once, during the inference model creation. The get inference API does not retrieve your access or secret keys. After creating the inference model, you cannot change the associated key pairs. If you want to use a different access and secret key pair, delete the inference model and recreate it with the same name and the updated keys.</p>

elasticsearch/_async/client/ml.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3549,7 +3549,8 @@ async def put_datafeed(
35493549
Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
35503550
You can associate only one datafeed with each anomaly detection job.
35513551
The datafeed contains a query that runs at a defined interval (<code>frequency</code>).
3552-
If you are concerned about delayed data, you can add a delay (<code>query_delay') at each interval. By default, the datafeed uses the following query: </code>{&quot;match_all&quot;: {&quot;boost&quot;: 1}}`.</p>
3552+
If you are concerned about delayed data, you can add a delay (<code>query_delay</code>) at each interval.
3553+
By default, the datafeed uses the following query: <code>{&quot;match_all&quot;: {&quot;boost&quot;: 1}}</code>.</p>
35533554
<p>When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
35543555
at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
35553556
those credentials are used instead.
@@ -3871,13 +3872,7 @@ async def put_job(
38713872
:param description: A description of the job.
38723873
:param expand_wildcards: Type of index that wildcard patterns can match. If the
38733874
request can target data streams, this argument determines whether wildcard
3874-
expressions match hidden data streams. Supports comma-separated values. Valid
3875-
values are: * `all`: Match any data stream or index, including hidden ones.
3876-
* `closed`: Match closed, non-hidden indices. Also matches any non-hidden
3877-
data stream. Data streams cannot be closed. * `hidden`: Match hidden data
3878-
streams and hidden indices. Must be combined with `open`, `closed`, or both.
3879-
* `none`: Wildcard patterns are not accepted. * `open`: Match open, non-hidden
3880-
indices. Also matches any non-hidden data stream.
3875+
expressions match hidden data streams. Supports comma-separated values.
38813876
:param groups: A list of job groups. A job can belong to no groups or many.
38823877
:param ignore_throttled: If `true`, concrete, expanded or aliased indices are
38833878
ignored when frozen.
@@ -4999,7 +4994,7 @@ async def update_data_frame_analytics(
49994994
<p>Update a data frame analytics job.</p>
50004995
50014996
5002-
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-data-frame-analytics>`_
4997+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics>`_
50034998
50044999
:param id: Identifier for the data frame analytics job. This identifier can contain
50055000
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -5140,13 +5135,7 @@ async def update_datafeed(
51405135
check runs only on real-time datafeeds.
51415136
:param expand_wildcards: Type of index that wildcard patterns can match. If the
51425137
request can target data streams, this argument determines whether wildcard
5143-
expressions match hidden data streams. Supports comma-separated values. Valid
5144-
values are: * `all`: Match any data stream or index, including hidden ones.
5145-
* `closed`: Match closed, non-hidden indices. Also matches any non-hidden
5146-
data stream. Data streams cannot be closed. * `hidden`: Match hidden data
5147-
streams and hidden indices. Must be combined with `open`, `closed`, or both.
5148-
* `none`: Wildcard patterns are not accepted. * `open`: Match open, non-hidden
5149-
indices. Also matches any non-hidden data stream.
5138+
expressions match hidden data streams. Supports comma-separated values.
51505139
:param frequency: The interval at which scheduled queries are made while the
51515140
datafeed runs in real time. The default value is either the bucket span for
51525141
short bucket spans, or, for longer bucket spans, a sensible fraction of the
@@ -5801,7 +5790,7 @@ async def validate_detector(
58015790
<p>Validate an anomaly detection job.</p>
58025791
58035792
5804-
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/>`_
5793+
`<https://www.elastic.co/docs/api/doc/elasticsearch>`_
58055794
58065795
:param detector:
58075796
"""

elasticsearch/_async/client/monitoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def bulk(
4848
This API is used by the monitoring features to send monitoring data.</p>
4949
5050
51-
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/>`_
51+
`<https://www.elastic.co/docs/api/doc/elasticsearch>`_
5252
5353
:param interval: Collection interval (e.g., '10s' or '10000ms') of the payload
5454
:param operations:

elasticsearch/_async/client/rollup.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -419,28 +419,7 @@ async def rollup_search(
419419
The following functionality is not available:</p>
420420
<p><code>size</code>: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.
421421
<code>highlighter</code>, <code>suggestors</code>, <code>post_filter</code>, <code>profile</code>, <code>explain</code>: These are similarly disallowed.</p>
422-
<p><strong>Searching both historical rollup and non-rollup data</strong></p>
423-
<p>The rollup search API has the capability to search across both &quot;live&quot; non-rollup data and the aggregated rollup data.
424-
This is done by simply adding the live indices to the URI. For example:</p>
425-
<pre><code>GET sensor-1,sensor_rollup/_rollup_search
426-
{
427-
&quot;size&quot;: 0,
428-
&quot;aggregations&quot;: {
429-
&quot;max_temperature&quot;: {
430-
&quot;max&quot;: {
431-
&quot;field&quot;: &quot;temperature&quot;
432-
}
433-
}
434-
}
435-
}
436-
</code></pre>
437-
<p>The rollup search endpoint does two things when the search runs:</p>
438-
<ul>
439-
<li>The original request is sent to the non-rollup index unaltered.</li>
440-
<li>A rewritten version of the original request is sent to the rollup index.</li>
441-
</ul>
442-
<p>When the two responses are received, the endpoint rewrites the rollup response and merges the two together.
443-
During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.</p>
422+
<p>For more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.</p>
444423
445424
446425
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-rollup-rollup-search>`_

elasticsearch/_async/client/security.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3553,7 +3553,8 @@ async def query_api_keys(
35533553
You can optionally filter the results with a query.</p>
35543554
<p>To use this API, you must have at least the <code>manage_own_api_key</code> or the <code>read_security</code> cluster privileges.
35553555
If you have only the <code>manage_own_api_key</code> privilege, this API returns only the API keys that you own.
3556-
If you have the <code>read_security</code>, <code>manage_api_key</code>, or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.</p>
3556+
If you have the <code>read_security</code>, <code>manage_api_key</code>, or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.
3557+
Refer to the linked documentation for examples of how to find API keys:</p>
35573558
35583559
35593560
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-security-query-api-keys>`_
@@ -4466,6 +4467,7 @@ async def update_cross_cluster_api_key(
44664467
<p>This API supports updates to an API key's access scope, metadata, and expiration.
44674468
The owner user's information, such as the <code>username</code> and <code>realm</code>, is also updated automatically on every call.</p>
44684469
<p>NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.</p>
4470+
<p>To learn more about how to use this API, refer to the <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-cc-api-key-examples">Update cross cluter API key API examples page</a>.</p>
44694471
44704472
44714473
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-security-update-cross-cluster-api-key>`_

0 commit comments

Comments
 (0)