Skip to content

Commit 4a957c4

Browse files
auto-generated code for 9.2
1 parent 16ae9f5 commit 4a957c4

Some content is hidden

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

53 files changed

+2485
-610
lines changed

elasticsearch/_async/client/__init__.py

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

elasticsearch/_async/client/async_search.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ async def submit(
287287
preference: t.Optional[str] = None,
288288
pretty: t.Optional[bool] = None,
289289
profile: t.Optional[bool] = None,
290+
project_routing: t.Optional[str] = None,
290291
q: t.Optional[str] = None,
291292
query: t.Optional[t.Mapping[str, t.Any]] = None,
292293
request_cache: t.Optional[bool] = None,
@@ -408,6 +409,10 @@ async def submit(
408409
:param preference: Specify the node or shard the operation should be performed
409410
on (default: random)
410411
:param profile:
412+
:param project_routing: Specifies a subset of projects to target for the search
413+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
414+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
415+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
411416
:param q: Query in the Lucene query string syntax
412417
:param query: Defines the search definition using the Query DSL.
413418
:param request_cache: Specify if request cache should be used for this request
@@ -528,6 +533,8 @@ async def submit(
528533
__query["preference"] = preference
529534
if pretty is not None:
530535
__query["pretty"] = pretty
536+
if project_routing is not None:
537+
__query["project_routing"] = project_routing
531538
if q is not None:
532539
__query["q"] = q
533540
if request_cache is not None:

elasticsearch/_async/client/cat.py

Lines changed: 489 additions & 26 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/connector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def delete(
103103
104104
:param connector_id: The unique identifier of the connector to be deleted
105105
:param delete_sync_jobs: A flag indicating if associated sync jobs should be
106-
also removed. Defaults to false.
106+
also removed.
107107
:param hard: A flag indicating if the connector should be hard deleted.
108108
"""
109109
if connector_id in SKIP_IN_PATH:
@@ -360,7 +360,7 @@ async def list(
360360
361361
:param connector_name: A comma-separated list of connector names to fetch connector
362362
documents for
363-
:param from_: Starting offset (default: 0)
363+
:param from_: Starting offset
364364
:param include_deleted: A flag to indicate if the desired connector should be
365365
fetched, even if it was soft-deleted.
366366
:param index_name: A comma-separated list of connector index names to fetch connector
@@ -955,7 +955,7 @@ async def sync_job_list(
955955
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list>`_
956956
957957
:param connector_id: A connector id to fetch connector sync jobs for
958-
:param from_: Starting offset (default: 0)
958+
:param from_: Starting offset
959959
:param job_type: A comma-separated list of job types to fetch the sync jobs for
960960
:param size: Specifies a max number of results to get
961961
:param status: A sync job status to fetch connector sync jobs for

elasticsearch/_async/client/eql.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ async def search(
229229
keep_on_completion: t.Optional[bool] = None,
230230
max_samples_per_key: t.Optional[int] = None,
231231
pretty: t.Optional[bool] = None,
232+
project_routing: t.Optional[str] = None,
232233
result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None,
233234
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
234235
size: t.Optional[int] = None,
@@ -285,6 +286,10 @@ async def search(
285286
`size` parameter to get a smaller or larger set of samples. To retrieve more
286287
than one sample per set of join keys, use the `max_samples_per_key` parameter.
287288
Pipes are not supported for sample queries.
289+
:param project_routing: Specifies a subset of projects to target for the search
290+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
291+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
292+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
288293
:param result_position:
289294
:param runtime_mappings:
290295
:param size: For basic queries, the maximum number of matching events to return.
@@ -318,6 +323,8 @@ async def search(
318323
__query["ignore_unavailable"] = ignore_unavailable
319324
if pretty is not None:
320325
__query["pretty"] = pretty
326+
if project_routing is not None:
327+
__query["project_routing"] = project_routing
321328
if not __body:
322329
if query is not None:
323330
__body["query"] = query

elasticsearch/_async/client/esql.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class EsqlClient(NamespacedClient):
4040
"columnar",
4141
"filter",
4242
"include_ccs_metadata",
43+
"include_execution_metadata",
4344
"keep_alive",
4445
"keep_on_completion",
4546
"locale",
@@ -71,6 +72,7 @@ async def async_query(
7172
] = None,
7273
human: t.Optional[bool] = None,
7374
include_ccs_metadata: t.Optional[bool] = None,
75+
include_execution_metadata: t.Optional[bool] = None,
7476
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
7577
keep_on_completion: t.Optional[bool] = None,
7678
locale: t.Optional[str] = None,
@@ -120,7 +122,11 @@ async def async_query(
120122
be returned if the async query doesn't finish within the timeout. The query
121123
ID and running status are available in the `X-Elasticsearch-Async-Id` and
122124
`X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
123-
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
125+
:param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
126+
query, the response will include an extra `_clusters` object with information
127+
about the clusters that participated in the search along with info such as
128+
shards count.
129+
:param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
124130
query, the response will include an extra `_clusters` object with information
125131
about the clusters that participated in the search along with info such as
126132
shards count.
@@ -180,6 +186,8 @@ async def async_query(
180186
__body["filter"] = filter
181187
if include_ccs_metadata is not None:
182188
__body["include_ccs_metadata"] = include_ccs_metadata
189+
if include_execution_metadata is not None:
190+
__body["include_execution_metadata"] = include_execution_metadata
183191
if keep_alive is not None:
184192
__body["keep_alive"] = keep_alive
185193
if keep_on_completion is not None:
@@ -486,6 +494,7 @@ async def list_queries(
486494
"columnar",
487495
"filter",
488496
"include_ccs_metadata",
497+
"include_execution_metadata",
489498
"locale",
490499
"params",
491500
"profile",
@@ -514,8 +523,16 @@ async def query(
514523
] = None,
515524
human: t.Optional[bool] = None,
516525
include_ccs_metadata: t.Optional[bool] = None,
526+
include_execution_metadata: t.Optional[bool] = None,
517527
locale: t.Optional[str] = None,
518-
params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
528+
params: t.Optional[
529+
t.Sequence[
530+
t.Union[
531+
t.Sequence[t.Union[None, bool, float, int, str]],
532+
t.Union[None, bool, float, int, str],
533+
]
534+
]
535+
] = None,
519536
pretty: t.Optional[bool] = None,
520537
profile: t.Optional[bool] = None,
521538
tables: t.Optional[
@@ -554,7 +571,11 @@ async def query(
554571
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
555572
`tsv`, and `txt` formats will return results in a tabular format, excluding
556573
other metadata fields from the response.
557-
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
574+
:param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
575+
query, the response will include an extra `_clusters` object with information
576+
about the clusters that participated in the search along with info such as
577+
shards count.
578+
:param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
558579
query, the response will include an extra `_clusters` object with information
559580
about the clusters that participated in the search along with info such as
560581
shards count.
@@ -600,6 +621,8 @@ async def query(
600621
__body["filter"] = filter
601622
if include_ccs_metadata is not None:
602623
__body["include_ccs_metadata"] = include_ccs_metadata
624+
if include_execution_metadata is not None:
625+
__body["include_execution_metadata"] = include_execution_metadata
603626
if locale is not None:
604627
__body["locale"] = locale
605628
if params is not None:

elasticsearch/_async/client/fleet.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,7 @@ async def search(
642642
__body["track_total_hits"] = track_total_hits
643643
if version is not None:
644644
__body["version"] = version
645-
if not __body:
646-
__body = None # type: ignore[assignment]
647-
__headers = {"accept": "application/json"}
648-
if __body is not None:
649-
__headers["content-type"] = "application/json"
645+
__headers = {"accept": "application/json", "content-type": "application/json"}
650646
return await self.perform_request( # type: ignore[return-value]
651647
"POST",
652648
__path,

elasticsearch/_async/client/graph.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,7 @@ async def explore(
9797
__body["query"] = query
9898
if vertices is not None:
9999
__body["vertices"] = vertices
100-
if not __body:
101-
__body = None # type: ignore[assignment]
102-
__headers = {"accept": "application/json"}
103-
if __body is not None:
104-
__headers["content-type"] = "application/json"
100+
__headers = {"accept": "application/json", "content-type": "application/json"}
105101
return await self.perform_request( # type: ignore[return-value]
106102
"POST",
107103
__path,

elasticsearch/_async/client/ilm.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,7 @@ async def move_to_step(
383383
__body["current_step"] = current_step
384384
if next_step is not None:
385385
__body["next_step"] = next_step
386-
if not __body:
387-
__body = None # type: ignore[assignment]
388-
__headers = {"accept": "application/json"}
389-
if __body is not None:
390-
__headers["content-type"] = "application/json"
386+
__headers = {"accept": "application/json", "content-type": "application/json"}
391387
return await self.perform_request( # type: ignore[return-value]
392388
"POST",
393389
__path,
@@ -453,11 +449,7 @@ async def put_lifecycle(
453449
if not __body:
454450
if policy is not None:
455451
__body["policy"] = policy
456-
if not __body:
457-
__body = None # type: ignore[assignment]
458-
__headers = {"accept": "application/json"}
459-
if __body is not None:
460-
__headers["content-type"] = "application/json"
452+
__headers = {"accept": "application/json", "content-type": "application/json"}
461453
return await self.perform_request( # type: ignore[return-value]
462454
"PUT",
463455
__path,

0 commit comments

Comments
 (0)