Skip to content

Commit b177103

Browse files
committed
Update APIs to 7.13-SNAPSHOT
1 parent 0ae3779 commit b177103

18 files changed

+608
-166
lines changed

Diff for: elasticsearch/_async/client/fleet.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class FleetClient(NamespacedClient):
22-
@query_params("checkpoints", "timeout", "wait_for_advance")
22+
@query_params("checkpoints", "timeout", "wait_for_advance", "wait_for_index")
2323
async def global_checkpoints(self, index, params=None, headers=None):
2424
"""
2525
Returns the current global checkpoints for an index. This API is design for
@@ -36,6 +36,8 @@ async def global_checkpoints(self, index, params=None, headers=None):
3636
Default: 30s
3737
:arg wait_for_advance: Whether to wait for the global checkpoint
3838
to advance past the specified current checkpoints Default: false
39+
:arg wait_for_index: Whether to wait for the target index to
40+
exist and all primary shards be active Default: false
3941
"""
4042
if index in SKIP_IN_PATH:
4143
raise ValueError("Empty value passed for a required argument 'index'.")

Diff for: elasticsearch/_async/client/fleet.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class FleetClient(NamespacedClient):
2727
checkpoints: Optional[Any] = ...,
2828
timeout: Optional[Any] = ...,
2929
wait_for_advance: Optional[Any] = ...,
30+
wait_for_index: Optional[Any] = ...,
3031
pretty: Optional[bool] = ...,
3132
human: Optional[bool] = ...,
3233
error_trace: Optional[bool] = ...,

Diff for: elasticsearch/_async/client/ml.py

-80
Original file line numberDiff line numberDiff line change
@@ -1234,11 +1234,6 @@ async def delete_data_frame_analytics(self, id, params=None, headers=None):
12341234
12351235
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-dfanalytics.html>`_
12361236
1237-
.. warning::
1238-
1239-
This API is **beta** so may include breaking changes
1240-
or be removed in a future version
1241-
12421237
:arg id: The ID of the data frame analytics to delete
12431238
:arg force: True if the job should be forcefully deleted
12441239
:arg timeout: Controls the time to wait until a job is deleted.
@@ -1261,11 +1256,6 @@ async def evaluate_data_frame(self, body, params=None, headers=None):
12611256
12621257
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/evaluate-dfanalytics.html>`_
12631258
1264-
.. warning::
1265-
1266-
This API is **beta** so may include breaking changes
1267-
or be removed in a future version
1268-
12691259
:arg body: The evaluation definition
12701260
"""
12711261
if body in SKIP_IN_PATH:
@@ -1286,11 +1276,6 @@ async def get_data_frame_analytics(self, id=None, params=None, headers=None):
12861276
12871277
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-dfanalytics.html>`_
12881278
1289-
.. warning::
1290-
1291-
This API is **beta** so may include breaking changes
1292-
or be removed in a future version
1293-
12941279
:arg id: The ID of the data frame analytics to fetch
12951280
:arg allow_no_match: Whether to ignore if a wildcard expression
12961281
matches no data frame analytics. (This includes `_all` string or when no
@@ -1319,11 +1304,6 @@ async def get_data_frame_analytics_stats(self, id=None, params=None, headers=Non
13191304
13201305
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-dfanalytics-stats.html>`_
13211306
1322-
.. warning::
1323-
1324-
This API is **beta** so may include breaking changes
1325-
or be removed in a future version
1326-
13271307
:arg id: The ID of the data frame analytics stats to fetch
13281308
:arg allow_no_match: Whether to ignore if a wildcard expression
13291309
matches no data frame analytics. (This includes `_all` string or when no
@@ -1351,11 +1331,6 @@ async def put_data_frame_analytics(self, id, body, params=None, headers=None):
13511331
13521332
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-dfanalytics.html>`_
13531333
1354-
.. warning::
1355-
1356-
This API is **beta** so may include breaking changes
1357-
or be removed in a future version
1358-
13591334
:arg id: The ID of the data frame analytics to create
13601335
:arg body: The data frame analytics configuration
13611336
"""
@@ -1380,11 +1355,6 @@ async def start_data_frame_analytics(
13801355
13811356
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/start-dfanalytics.html>`_
13821357
1383-
.. warning::
1384-
1385-
This API is **beta** so may include breaking changes
1386-
or be removed in a future version
1387-
13881358
:arg id: The ID of the data frame analytics to start
13891359
:arg body: The start data frame analytics parameters
13901360
:arg timeout: Controls the time to wait until the task has
@@ -1408,11 +1378,6 @@ async def stop_data_frame_analytics(self, id, body=None, params=None, headers=No
14081378
14091379
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/stop-dfanalytics.html>`_
14101380
1411-
.. warning::
1412-
1413-
This API is **beta** so may include breaking changes
1414-
or be removed in a future version
1415-
14161381
:arg id: The ID of the data frame analytics to stop
14171382
:arg body: The stop data frame analytics parameters
14181383
:arg allow_no_match: Whether to ignore if a wildcard expression
@@ -1442,11 +1407,6 @@ async def delete_trained_model(self, model_id, params=None, headers=None):
14421407
14431408
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-trained-models.html>`_
14441409
1445-
.. warning::
1446-
1447-
This API is **beta** so may include breaking changes
1448-
or be removed in a future version
1449-
14501410
:arg model_id: The ID of the trained model to delete
14511411
"""
14521412
if model_id in SKIP_IN_PATH:
@@ -1468,11 +1428,6 @@ async def explain_data_frame_analytics(
14681428
14691429
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/explain-dfanalytics.html>`_
14701430
1471-
.. warning::
1472-
1473-
This API is **beta** so may include breaking changes
1474-
or be removed in a future version
1475-
14761431
:arg body: The data frame analytics config to explain
14771432
:arg id: The ID of the data frame analytics to explain
14781433
"""
@@ -1500,11 +1455,6 @@ async def get_trained_models(self, model_id=None, params=None, headers=None):
15001455
15011456
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-trained-models.html>`_
15021457
1503-
.. warning::
1504-
1505-
This API is **beta** so may include breaking changes
1506-
or be removed in a future version
1507-
15081458
:arg model_id: The ID of the trained models to fetch
15091459
:arg allow_no_match: Whether to ignore if a wildcard expression
15101460
matches no trained models. (This includes `_all` string or when no
@@ -1544,11 +1494,6 @@ async def get_trained_models_stats(self, model_id=None, params=None, headers=Non
15441494
15451495
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-trained-models-stats.html>`_
15461496
1547-
.. warning::
1548-
1549-
This API is **beta** so may include breaking changes
1550-
or be removed in a future version
1551-
15521497
:arg model_id: The ID of the trained models stats to fetch
15531498
:arg allow_no_match: Whether to ignore if a wildcard expression
15541499
matches no trained models. (This includes `_all` string or when no
@@ -1575,11 +1520,6 @@ async def put_trained_model(self, model_id, body, params=None, headers=None):
15751520
15761521
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-trained-models.html>`_
15771522
1578-
.. warning::
1579-
1580-
This API is **beta** so may include breaking changes
1581-
or be removed in a future version
1582-
15831523
:arg model_id: The ID of the trained models to store
15841524
:arg body: The trained model configuration
15851525
"""
@@ -1623,11 +1563,6 @@ async def update_data_frame_analytics(self, id, body, params=None, headers=None)
16231563
16241564
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/update-dfanalytics.html>`_
16251565
1626-
.. warning::
1627-
1628-
This API is **beta** so may include breaking changes
1629-
or be removed in a future version
1630-
16311566
:arg id: The ID of the data frame analytics to update
16321567
:arg body: The data frame analytics settings to update
16331568
"""
@@ -1686,11 +1621,6 @@ async def delete_trained_model_alias(
16861621
16871622
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-trained-models-aliases.html>`_
16881623
1689-
.. warning::
1690-
1691-
This API is **beta** so may include breaking changes
1692-
or be removed in a future version
1693-
16941624
:arg model_id: The trained model where the model alias is
16951625
assigned
16961626
:arg model_alias: The trained model alias to delete
@@ -1715,11 +1645,6 @@ async def preview_data_frame_analytics(
17151645
17161646
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/preview-dfanalytics.html>`_
17171647
1718-
.. warning::
1719-
1720-
This API is **beta** so may include breaking changes
1721-
or be removed in a future version
1722-
17231648
:arg body: The data frame analytics config to preview
17241649
:arg id: The ID of the data frame analytics to preview
17251650
"""
@@ -1741,11 +1666,6 @@ async def put_trained_model_alias(
17411666
17421667
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-trained-models-aliases.html>`_
17431668
1744-
.. warning::
1745-
1746-
This API is **beta** so may include breaking changes
1747-
or be removed in a future version
1748-
17491669
:arg model_id: The trained model where the model alias should be
17501670
assigned
17511671
:arg model_alias: The trained model alias to update

Diff for: elasticsearch/_async/client/searchable_snapshots.py

+25-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def repository_stats(self, repository, params=None, headers=None):
112112
@query_params("level")
113113
async def stats(self, index=None, params=None, headers=None):
114114
"""
115-
Retrieve various statistics about searchable snapshots.
115+
Retrieve shard-level statistics about searchable snapshots.
116116
117117
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/searchable-snapshots-apis.html>`_
118118
@@ -131,3 +131,27 @@ async def stats(self, index=None, params=None, headers=None):
131131
params=params,
132132
headers=headers,
133133
)
134+
135+
@query_params()
136+
async def cache_stats(self, node_id=None, params=None, headers=None):
137+
"""
138+
Retrieve node-level cache statistics about searchable snapshots.
139+
140+
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/searchable-snapshots-apis.html>`_
141+
142+
.. warning::
143+
144+
This API is **experimental** so may include breaking changes
145+
or be removed in a future version
146+
147+
:arg node_id: A comma-separated list of node IDs or names to
148+
limit the returned information; use `_local` to return information from
149+
the node you're connecting to, leave empty to get information from all
150+
nodes
151+
"""
152+
return await self.transport.perform_request(
153+
"GET",
154+
_make_path("_searchable_snapshots", node_id, "cache", "stats"),
155+
params=params,
156+
headers=headers,
157+
)

Diff for: elasticsearch/_async/client/searchable_snapshots.pyi

+17
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,20 @@ class SearchableSnapshotsClient(NamespacedClient):
9797
params: Optional[MutableMapping[str, Any]] = ...,
9898
headers: Optional[MutableMapping[str, str]] = ...,
9999
) -> Any: ...
100+
async def cache_stats(
101+
self,
102+
*,
103+
node_id: Optional[Any] = ...,
104+
pretty: Optional[bool] = ...,
105+
human: Optional[bool] = ...,
106+
error_trace: Optional[bool] = ...,
107+
format: Optional[str] = ...,
108+
filter_path: Optional[Union[str, Collection[str]]] = ...,
109+
request_timeout: Optional[Union[int, float]] = ...,
110+
ignore: Optional[Union[int, Collection[int]]] = ...,
111+
opaque_id: Optional[str] = ...,
112+
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
113+
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
114+
params: Optional[MutableMapping[str, Any]] = ...,
115+
headers: Optional[MutableMapping[str, str]] = ...,
116+
) -> Any: ...

0 commit comments

Comments
 (0)