Skip to content

Commit 1fd718c

Browse files
Auto-generated code for main (#2660)
1 parent e22de7e commit 1fd718c

18 files changed

+254
-38
lines changed

elasticsearch/_async/client/cluster.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,8 +1053,8 @@ async def stats(
10531053
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
10541054
error_trace: t.Optional[bool] = None,
10551055
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1056-
flat_settings: t.Optional[bool] = None,
10571056
human: t.Optional[bool] = None,
1057+
include_remotes: t.Optional[bool] = None,
10581058
pretty: t.Optional[bool] = None,
10591059
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
10601060
) -> ObjectApiResponse[t.Any]:
@@ -1067,7 +1067,7 @@ async def stats(
10671067
10681068
:param node_id: Comma-separated list of node filters used to limit returned information.
10691069
Defaults to all nodes in the cluster.
1070-
:param flat_settings: If `true`, returns settings in flat format.
1070+
:param include_remotes: Include remote cluster data into the response
10711071
:param timeout: Period to wait for each node to respond. If a node does not respond
10721072
before its timeout expires, the response does not include its stats. However,
10731073
timed out nodes are included in the response’s `_nodes.failed` property.
@@ -1085,10 +1085,10 @@ async def stats(
10851085
__query["error_trace"] = error_trace
10861086
if filter_path is not None:
10871087
__query["filter_path"] = filter_path
1088-
if flat_settings is not None:
1089-
__query["flat_settings"] = flat_settings
10901088
if human is not None:
10911089
__query["human"] = human
1090+
if include_remotes is not None:
1091+
__query["include_remotes"] = include_remotes
10921092
if pretty is not None:
10931093
__query["pretty"] = pretty
10941094
if timeout is not None:

elasticsearch/_async/client/esql.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ async def query(
4747
error_trace: t.Optional[bool] = None,
4848
filter: t.Optional[t.Mapping[str, t.Any]] = None,
4949
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
50-
format: t.Optional[str] = None,
50+
format: t.Optional[
51+
t.Union[
52+
str,
53+
t.Literal[
54+
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
55+
],
56+
]
57+
] = None,
5158
human: t.Optional[bool] = None,
5259
locale: t.Optional[str] = None,
5360
params: t.Optional[

elasticsearch/_async/client/ilm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ async def move_to_step(
304304
*,
305305
index: str,
306306
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
307+
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
307308
error_trace: t.Optional[bool] = None,
308309
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
309310
human: t.Optional[bool] = None,
310-
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
311311
pretty: t.Optional[bool] = None,
312312
body: t.Optional[t.Dict[str, t.Any]] = None,
313313
) -> ObjectApiResponse[t.Any]:
@@ -322,6 +322,10 @@ async def move_to_step(
322322
"""
323323
if index in SKIP_IN_PATH:
324324
raise ValueError("Empty value passed for parameter 'index'")
325+
if current_step is None and body is None:
326+
raise ValueError("Empty value passed for parameter 'current_step'")
327+
if next_step is None and body is None:
328+
raise ValueError("Empty value passed for parameter 'next_step'")
325329
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
326330
__path = f'/_ilm/move/{__path_parts["index"]}'
327331
__query: t.Dict[str, t.Any] = {}

elasticsearch/_async/client/ingest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def delete_geoip_database(
4040
"""
4141
Deletes a geoip database configuration.
4242
43-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
43+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-geoip-database-api.html>`_
4444
4545
:param id: A comma-separated list of geoip database configurations to delete
4646
:param master_timeout: Period to wait for a connection to the master node. If
@@ -177,7 +177,7 @@ async def get_geoip_database(
177177
"""
178178
Returns information about one or more geoip database configurations.
179179
180-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
180+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-geoip-database-api.html>`_
181181
182182
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
183183
(`*`) expressions are supported. To get all database configurations, omit
@@ -327,7 +327,7 @@ async def put_geoip_database(
327327
"""
328328
Returns information about one or more geoip database configurations.
329329
330-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
330+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-geoip-database-api.html>`_
331331
332332
:param id: ID of the database configuration to create or update.
333333
:param maxmind: The configuration necessary to identify which IP geolocation

elasticsearch/_async/client/search_application.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async def delete(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Deletes a search application.
39+
Delete a search application. Remove a search application and its associated alias.
40+
Indices attached to the search application are not removed.
4041
4142
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html>`_
4243
@@ -76,7 +77,8 @@ async def delete_behavioral_analytics(
7677
pretty: t.Optional[bool] = None,
7778
) -> ObjectApiResponse[t.Any]:
7879
"""
79-
Delete a behavioral analytics collection.
80+
Delete a behavioral analytics collection. The associated data stream is also
81+
deleted.
8082
8183
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html>`_
8284
@@ -116,7 +118,7 @@ async def get(
116118
pretty: t.Optional[bool] = None,
117119
) -> ObjectApiResponse[t.Any]:
118120
"""
119-
Returns the details about a search application
121+
Get search application details.
120122
121123
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html>`_
122124
@@ -156,7 +158,7 @@ async def get_behavioral_analytics(
156158
pretty: t.Optional[bool] = None,
157159
) -> ObjectApiResponse[t.Any]:
158160
"""
159-
Returns the existing behavioral analytics collections.
161+
Get behavioral analytics collections.
160162
161163
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html>`_
162164
@@ -254,7 +256,7 @@ async def put(
254256
pretty: t.Optional[bool] = None,
255257
) -> ObjectApiResponse[t.Any]:
256258
"""
257-
Creates or updates a search application.
259+
Create or update a search application.
258260
259261
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html>`_
260262
@@ -307,7 +309,7 @@ async def put_behavioral_analytics(
307309
pretty: t.Optional[bool] = None,
308310
) -> ObjectApiResponse[t.Any]:
309311
"""
310-
Creates a behavioral analytics collection.
312+
Create a behavioral analytics collection.
311313
312314
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html>`_
313315
@@ -353,7 +355,10 @@ async def search(
353355
body: t.Optional[t.Dict[str, t.Any]] = None,
354356
) -> ObjectApiResponse[t.Any]:
355357
"""
356-
Perform a search against a search application.
358+
Run a search application search. Generate and run an Elasticsearch query that
359+
uses the specified query parameteter and the search template associated with
360+
the search application or default template. Unspecified template parameters are
361+
assigned their default values if applicable.
357362
358363
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html>`_
359364

elasticsearch/_async/client/security.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,7 @@ async def put_privileges(
22852285
"global_",
22862286
"indices",
22872287
"metadata",
2288+
"remote_indices",
22882289
"run_as",
22892290
"transient_metadata",
22902291
),
@@ -2373,6 +2374,7 @@ async def put_role(
23732374
refresh: t.Optional[
23742375
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
23752376
] = None,
2377+
remote_indices: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
23762378
run_as: t.Optional[t.Sequence[str]] = None,
23772379
transient_metadata: t.Optional[t.Mapping[str, t.Any]] = None,
23782380
body: t.Optional[t.Dict[str, t.Any]] = None,
@@ -2384,7 +2386,10 @@ async def put_role(
23842386
23852387
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-put-role.html>`_
23862388
2387-
:param name: The name of the role.
2389+
:param name: The name of the role that is being created or updated. On Elasticsearch
2390+
Serverless, the role name must begin with a letter or digit and can only
2391+
contain letters, digits and the characters '_', '-', and '.'. Each role must
2392+
have a unique name, as this will serve as the identifier for that role.
23882393
:param applications: A list of application privilege entries.
23892394
:param cluster: A list of cluster privileges. These privileges define the cluster-level
23902395
actions for users with this role.
@@ -2398,6 +2403,7 @@ async def put_role(
23982403
:param refresh: If `true` (the default) then refresh the affected shards to make
23992404
this operation visible to search, if `wait_for` then wait for a refresh to
24002405
make this operation visible to search, if `false` then do nothing with refreshes.
2406+
:param remote_indices: A list of remote indices permissions entries.
24012407
:param run_as: A list of users that the owners of this role can impersonate.
24022408
*Note*: in Serverless, the run-as feature is disabled. For API compatibility,
24032409
you can still specify an empty `run_as` field, but a non-empty list will
@@ -2438,6 +2444,8 @@ async def put_role(
24382444
__body["indices"] = indices
24392445
if metadata is not None:
24402446
__body["metadata"] = metadata
2447+
if remote_indices is not None:
2448+
__body["remote_indices"] = remote_indices
24412449
if run_as is not None:
24422450
__body["run_as"] = run_as
24432451
if transient_metadata is not None:

elasticsearch/_async/client/snapshot.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,84 @@ async def get_repository(
616616
path_parts=__path_parts,
617617
)
618618

619+
@_rewrite_parameters()
620+
async def repository_verify_integrity(
621+
self,
622+
*,
623+
name: t.Union[str, t.Sequence[str]],
624+
blob_thread_pool_concurrency: t.Optional[int] = None,
625+
error_trace: t.Optional[bool] = None,
626+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
627+
human: t.Optional[bool] = None,
628+
index_snapshot_verification_concurrency: t.Optional[int] = None,
629+
index_verification_concurrency: t.Optional[int] = None,
630+
max_bytes_per_sec: t.Optional[str] = None,
631+
max_failed_shard_snapshots: t.Optional[int] = None,
632+
meta_thread_pool_concurrency: t.Optional[int] = None,
633+
pretty: t.Optional[bool] = None,
634+
snapshot_verification_concurrency: t.Optional[int] = None,
635+
verify_blob_contents: t.Optional[bool] = None,
636+
) -> ObjectApiResponse[t.Any]:
637+
"""
638+
Verifies the integrity of the contents of a snapshot repository
639+
640+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
641+
642+
:param name: A repository name
643+
:param blob_thread_pool_concurrency: Number of threads to use for reading blob
644+
contents
645+
:param index_snapshot_verification_concurrency: Number of snapshots to verify
646+
concurrently within each index
647+
:param index_verification_concurrency: Number of indices to verify concurrently
648+
:param max_bytes_per_sec: Rate limit for individual blob verification
649+
:param max_failed_shard_snapshots: Maximum permitted number of failed shard snapshots
650+
:param meta_thread_pool_concurrency: Number of threads to use for reading metadata
651+
:param snapshot_verification_concurrency: Number of snapshots to verify concurrently
652+
:param verify_blob_contents: Whether to verify the contents of individual blobs
653+
"""
654+
if name in SKIP_IN_PATH:
655+
raise ValueError("Empty value passed for parameter 'name'")
656+
__path_parts: t.Dict[str, str] = {"repository": _quote(name)}
657+
__path = f'/_snapshot/{__path_parts["repository"]}/_verify_integrity'
658+
__query: t.Dict[str, t.Any] = {}
659+
if blob_thread_pool_concurrency is not None:
660+
__query["blob_thread_pool_concurrency"] = blob_thread_pool_concurrency
661+
if error_trace is not None:
662+
__query["error_trace"] = error_trace
663+
if filter_path is not None:
664+
__query["filter_path"] = filter_path
665+
if human is not None:
666+
__query["human"] = human
667+
if index_snapshot_verification_concurrency is not None:
668+
__query["index_snapshot_verification_concurrency"] = (
669+
index_snapshot_verification_concurrency
670+
)
671+
if index_verification_concurrency is not None:
672+
__query["index_verification_concurrency"] = index_verification_concurrency
673+
if max_bytes_per_sec is not None:
674+
__query["max_bytes_per_sec"] = max_bytes_per_sec
675+
if max_failed_shard_snapshots is not None:
676+
__query["max_failed_shard_snapshots"] = max_failed_shard_snapshots
677+
if meta_thread_pool_concurrency is not None:
678+
__query["meta_thread_pool_concurrency"] = meta_thread_pool_concurrency
679+
if pretty is not None:
680+
__query["pretty"] = pretty
681+
if snapshot_verification_concurrency is not None:
682+
__query["snapshot_verification_concurrency"] = (
683+
snapshot_verification_concurrency
684+
)
685+
if verify_blob_contents is not None:
686+
__query["verify_blob_contents"] = verify_blob_contents
687+
__headers = {"accept": "application/json"}
688+
return await self.perform_request( # type: ignore[return-value]
689+
"POST",
690+
__path,
691+
params=__query,
692+
headers=__headers,
693+
endpoint_id="snapshot.repository_verify_integrity",
694+
path_parts=__path_parts,
695+
)
696+
619697
@_rewrite_parameters(
620698
body_fields=(
621699
"feature_states",

elasticsearch/_async/client/sql.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ async def query(
251251
field_multi_value_leniency: t.Optional[bool] = None,
252252
filter: t.Optional[t.Mapping[str, t.Any]] = None,
253253
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
254-
format: t.Optional[str] = None,
254+
format: t.Optional[
255+
t.Union[
256+
str, t.Literal["cbor", "csv", "json", "smile", "tsv", "txt", "yaml"]
257+
]
258+
] = None,
255259
human: t.Optional[bool] = None,
256260
index_using_frozen: t.Optional[bool] = None,
257261
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,

elasticsearch/_async/client/xpack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ async def info(
3434
self,
3535
*,
3636
accept_enterprise: t.Optional[bool] = None,
37-
categories: t.Optional[t.Sequence[str]] = None,
37+
categories: t.Optional[
38+
t.Sequence[t.Union[str, t.Literal["build", "features", "license"]]]
39+
] = None,
3840
error_trace: t.Optional[bool] = None,
3941
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4042
human: t.Optional[bool] = None,

elasticsearch/_sync/client/cluster.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,8 +1053,8 @@ def stats(
10531053
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
10541054
error_trace: t.Optional[bool] = None,
10551055
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1056-
flat_settings: t.Optional[bool] = None,
10571056
human: t.Optional[bool] = None,
1057+
include_remotes: t.Optional[bool] = None,
10581058
pretty: t.Optional[bool] = None,
10591059
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
10601060
) -> ObjectApiResponse[t.Any]:
@@ -1067,7 +1067,7 @@ def stats(
10671067
10681068
:param node_id: Comma-separated list of node filters used to limit returned information.
10691069
Defaults to all nodes in the cluster.
1070-
:param flat_settings: If `true`, returns settings in flat format.
1070+
:param include_remotes: Include remote cluster data into the response
10711071
:param timeout: Period to wait for each node to respond. If a node does not respond
10721072
before its timeout expires, the response does not include its stats. However,
10731073
timed out nodes are included in the response’s `_nodes.failed` property.
@@ -1085,10 +1085,10 @@ def stats(
10851085
__query["error_trace"] = error_trace
10861086
if filter_path is not None:
10871087
__query["filter_path"] = filter_path
1088-
if flat_settings is not None:
1089-
__query["flat_settings"] = flat_settings
10901088
if human is not None:
10911089
__query["human"] = human
1090+
if include_remotes is not None:
1091+
__query["include_remotes"] = include_remotes
10921092
if pretty is not None:
10931093
__query["pretty"] = pretty
10941094
if timeout is not None:

elasticsearch/_sync/client/esql.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ def query(
4747
error_trace: t.Optional[bool] = None,
4848
filter: t.Optional[t.Mapping[str, t.Any]] = None,
4949
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
50-
format: t.Optional[str] = None,
50+
format: t.Optional[
51+
t.Union[
52+
str,
53+
t.Literal[
54+
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
55+
],
56+
]
57+
] = None,
5158
human: t.Optional[bool] = None,
5259
locale: t.Optional[str] = None,
5360
params: t.Optional[

elasticsearch/_sync/client/ilm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ def move_to_step(
304304
*,
305305
index: str,
306306
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
307+
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
307308
error_trace: t.Optional[bool] = None,
308309
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
309310
human: t.Optional[bool] = None,
310-
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
311311
pretty: t.Optional[bool] = None,
312312
body: t.Optional[t.Dict[str, t.Any]] = None,
313313
) -> ObjectApiResponse[t.Any]:
@@ -322,6 +322,10 @@ def move_to_step(
322322
"""
323323
if index in SKIP_IN_PATH:
324324
raise ValueError("Empty value passed for parameter 'index'")
325+
if current_step is None and body is None:
326+
raise ValueError("Empty value passed for parameter 'current_step'")
327+
if next_step is None and body is None:
328+
raise ValueError("Empty value passed for parameter 'next_step'")
325329
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
326330
__path = f'/_ilm/move/{__path_parts["index"]}'
327331
__query: t.Dict[str, t.Any] = {}

0 commit comments

Comments
 (0)