Skip to content

Commit b25b16f

Browse files
authored
Auto-generated code for main (#101)
1 parent d71dc40 commit b25b16f

26 files changed

+186
-158
lines changed

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ async def count(
702702
body: t.Optional[t.Dict[str, t.Any]] = None,
703703
) -> ObjectApiResponse[t.Any]:
704704
"""
705-
Returns number of documents matching a query.
705+
Count search results. Get the number of documents matching a query.
706706
707707
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html>`_
708708
@@ -2624,6 +2624,7 @@ async def open_point_in_time(
26242624
*,
26252625
index: t.Union[str, t.Sequence[str]],
26262626
keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
2627+
allow_partial_search_results: t.Optional[bool] = None,
26272628
error_trace: t.Optional[bool] = None,
26282629
expand_wildcards: t.Optional[
26292630
t.Union[
@@ -2658,6 +2659,10 @@ async def open_point_in_time(
26582659
:param index: A comma-separated list of index names to open point in time; use
26592660
`_all` or empty string to perform the operation on all indices
26602661
:param keep_alive: Extends the time to live of the corresponding point in time.
2662+
:param allow_partial_search_results: If `false`, creating a point in time request
2663+
when a shard is missing or unavailable will throw an exception. If `true`,
2664+
the point in time will contain all the shards that are available at the time
2665+
of the request.
26612666
:param expand_wildcards: Type of index that wildcard patterns can match. If the
26622667
request can target data streams, this argument determines whether wildcard
26632668
expressions match hidden data streams. Supports comma-separated values, such
@@ -2680,6 +2685,8 @@ async def open_point_in_time(
26802685
__body: t.Dict[str, t.Any] = body if body is not None else {}
26812686
if keep_alive is not None:
26822687
__query["keep_alive"] = keep_alive
2688+
if allow_partial_search_results is not None:
2689+
__query["allow_partial_search_results"] = allow_partial_search_results
26832690
if error_trace is not None:
26842691
__query["error_trace"] = error_trace
26852692
if expand_wildcards is not None:

elasticsearch_serverless/_async/client/async_search.py

Lines changed: 8 additions & 18 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/master/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]]]
@@ -268,7 +273,6 @@ async def submit(
268273
min_score: t.Optional[float] = None,
269274
pit: t.Optional[t.Mapping[str, t.Any]] = None,
270275
post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
271-
pre_filter_shard_size: t.Optional[int] = None,
272276
preference: t.Optional[str] = None,
273277
pretty: t.Optional[bool] = None,
274278
profile: t.Optional[bool] = None,
@@ -282,7 +286,6 @@ async def submit(
282286
routing: t.Optional[str] = None,
283287
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
284288
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
285-
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
286289
search_after: t.Optional[
287290
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
288291
] = None,
@@ -375,9 +378,6 @@ async def submit(
375378
:param ignore_unavailable: Whether specified concrete indices should be ignored
376379
when unavailable (missing or closed)
377380
:param indices_boost: Boosts the _score of documents from specified indices.
378-
:param keep_alive: Specifies how long the async search needs to be available.
379-
Ongoing async searches and any saved search results are deleted after this
380-
period.
381381
:param keep_on_completion: If `true`, results are stored for later retrieval
382382
when the search completes within the `wait_for_completion_timeout`.
383383
:param knn: Defines the approximate kNN search to run.
@@ -392,10 +392,6 @@ async def submit(
392392
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
393393
you cannot specify an <index> in the request path.
394394
:param post_filter:
395-
:param pre_filter_shard_size: The default value cannot be changed, which enforces
396-
the execution of a pre-filter roundtrip to retrieve statistics from each
397-
shard so that the ones that surely don’t hold any document matching the query
398-
get skipped.
399395
:param preference: Specify the node or shard the operation should be performed
400396
on (default: random)
401397
:param profile:
@@ -404,13 +400,13 @@ async def submit(
404400
:param request_cache: Specify if request cache should be used for this request
405401
or not, defaults to true
406402
:param rescore:
407-
:param rest_total_hits_as_int:
403+
:param rest_total_hits_as_int: Indicates whether hits.total should be rendered
404+
as an integer or an object in the rest search response
408405
:param routing: A comma-separated list of specific routing values
409406
:param runtime_mappings: Defines one or more runtime fields in the search request.
410407
These fields take precedence over mapped fields with the same name.
411408
:param script_fields: Retrieve a script evaluation (based on different fields)
412409
for each hit.
413-
:param scroll:
414410
:param search_after:
415411
:param search_type: Search operation type
416412
:param seq_no_primary_term: If true, returns sequence number and primary term
@@ -507,16 +503,12 @@ async def submit(
507503
__query["ignore_throttled"] = ignore_throttled
508504
if ignore_unavailable is not None:
509505
__query["ignore_unavailable"] = ignore_unavailable
510-
if keep_alive is not None:
511-
__query["keep_alive"] = keep_alive
512506
if keep_on_completion is not None:
513507
__query["keep_on_completion"] = keep_on_completion
514508
if lenient is not None:
515509
__query["lenient"] = lenient
516510
if max_concurrent_shard_requests is not None:
517511
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
518-
if pre_filter_shard_size is not None:
519-
__query["pre_filter_shard_size"] = pre_filter_shard_size
520512
if preference is not None:
521513
__query["preference"] = preference
522514
if pretty is not None:
@@ -529,8 +521,6 @@ async def submit(
529521
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
530522
if routing is not None:
531523
__query["routing"] = routing
532-
if scroll is not None:
533-
__query["scroll"] = scroll
534524
if search_type is not None:
535525
__query["search_type"] = search_type
536526
if source_excludes is not None:

elasticsearch_serverless/_async/client/cat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ async def transforms(
15511551
v: t.Optional[bool] = None,
15521552
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
15531553
"""
1554-
Get transforms. Returns configuration and usage information about transforms.
1554+
Get transform information. Get configuration and usage information about transforms.
15551555
CAT APIs are only intended for human consumption using the Kibana console or
15561556
command line. They are not intended for use by applications. For application
15571557
consumption, use the get transform statistics API.

elasticsearch_serverless/_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/master/execute-enrich-policy-api.html>`_
8383

elasticsearch_serverless/_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/master/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/master/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/master/get-async-eql-status-api.html>`_
141141
@@ -225,7 +225,9 @@ async def search(
225225
body: t.Optional[t.Dict[str, t.Any]] = None,
226226
) -> ObjectApiResponse[t.Any]:
227227
"""
228-
Returns results matching a query expressed in Event Query Language (EQL)
228+
Get EQL search results. Returns search results for an Event Query Language (EQL)
229+
query. EQL assumes each document in a data stream or index corresponds to an
230+
event.
229231
230232
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/eql-search-api.html>`_
231233

elasticsearch_serverless/_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/master/esql-rest.html>`_
7475

elasticsearch_serverless/_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/master/graph-explore-api.html>`_
5258

elasticsearch_serverless/_async/client/indices.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ async def exists_alias(
701701
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
702702
human: t.Optional[bool] = None,
703703
ignore_unavailable: t.Optional[bool] = None,
704+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
704705
pretty: t.Optional[bool] = None,
705706
) -> HeadApiResponse:
706707
"""
@@ -721,6 +722,9 @@ async def exists_alias(
721722
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
722723
:param ignore_unavailable: If `false`, requests that include a missing data stream
723724
or index in the target indices or data streams return an error.
725+
:param master_timeout: Period to wait for a connection to the master node. If
726+
no response is received before the timeout expires, the request fails and
727+
returns an error.
724728
"""
725729
if name in SKIP_IN_PATH:
726730
raise ValueError("Empty value passed for parameter 'name'")
@@ -746,6 +750,8 @@ async def exists_alias(
746750
__query["human"] = human
747751
if ignore_unavailable is not None:
748752
__query["ignore_unavailable"] = ignore_unavailable
753+
if master_timeout is not None:
754+
__query["master_timeout"] = master_timeout
749755
if pretty is not None:
750756
__query["pretty"] = pretty
751757
__headers = {"accept": "application/json"}
@@ -770,7 +776,7 @@ async def exists_index_template(
770776
pretty: t.Optional[bool] = None,
771777
) -> HeadApiResponse:
772778
"""
773-
Returns information about whether a particular index template exists.
779+
Check index templates. Check whether index templates exist.
774780
775781
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html>`_
776782
@@ -974,6 +980,7 @@ async def get_alias(
974980
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
975981
human: t.Optional[bool] = None,
976982
ignore_unavailable: t.Optional[bool] = None,
983+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
977984
pretty: t.Optional[bool] = None,
978985
) -> ObjectApiResponse[t.Any]:
979986
"""
@@ -995,6 +1002,9 @@ async def get_alias(
9951002
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
9961003
:param ignore_unavailable: If `false`, the request returns an error if it targets
9971004
a missing or closed index.
1005+
:param master_timeout: Period to wait for a connection to the master node. If
1006+
no response is received before the timeout expires, the request fails and
1007+
returns an error.
9981008
"""
9991009
__path_parts: t.Dict[str, str]
10001010
if index not in SKIP_IN_PATH and name not in SKIP_IN_PATH:
@@ -1022,6 +1032,8 @@ async def get_alias(
10221032
__query["human"] = human
10231033
if ignore_unavailable is not None:
10241034
__query["ignore_unavailable"] = ignore_unavailable
1035+
if master_timeout is not None:
1036+
__query["master_timeout"] = master_timeout
10251037
if pretty is not None:
10261038
__query["pretty"] = pretty
10271039
__headers = {"accept": "application/json"}
@@ -2208,8 +2220,8 @@ async def resolve_index(
22082220
pretty: t.Optional[bool] = None,
22092221
) -> ObjectApiResponse[t.Any]:
22102222
"""
2211-
Resolves the specified name(s) and/or index patterns for indices, aliases, and
2212-
data streams. Multiple patterns and remote clusters are supported.
2223+
Resolve indices. Resolve the names and/or index patterns for indices, aliases,
2224+
and data streams. Multiple patterns and remote clusters are supported.
22132225
22142226
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html>`_
22152227

elasticsearch_serverless/_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)