Skip to content

Commit 225c307

Browse files
committed
Update APIs to 8.0.0-SNAPSHOT
1 parent c0d9bd1 commit 225c307

File tree

12 files changed

+30
-126
lines changed

12 files changed

+30
-126
lines changed

elasticsearch/_async/client/indices.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,43 +1059,6 @@ async def rollover(
10591059
body=body,
10601060
)
10611061

1062-
@query_params(
1063-
"allow_no_indices",
1064-
"expand_wildcards",
1065-
"ignore_unavailable",
1066-
"master_timeout",
1067-
"timeout",
1068-
"wait_for_active_shards",
1069-
)
1070-
async def freeze(self, index, params=None, headers=None):
1071-
"""
1072-
Freezes an index. A frozen index has almost no overhead on the cluster (except
1073-
for maintaining its metadata in memory) and is read-only.
1074-
1075-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/freeze-index-api.html>`_
1076-
1077-
:arg index: The name of the index to freeze
1078-
:arg allow_no_indices: Whether to ignore if a wildcard indices
1079-
expression resolves into no concrete indices. (This includes `_all`
1080-
string or when no indices have been specified)
1081-
:arg expand_wildcards: Whether to expand wildcard expression to
1082-
concrete indices that are open, closed or both. Valid choices: open,
1083-
closed, hidden, none, all Default: closed
1084-
:arg ignore_unavailable: Whether specified concrete indices
1085-
should be ignored when unavailable (missing or closed)
1086-
:arg master_timeout: Specify timeout for connection to master
1087-
:arg timeout: Explicit operation timeout
1088-
:arg wait_for_active_shards: Sets the number of active shards to
1089-
wait for before the operation returns.
1090-
"""
1091-
client, params = _deprecated_options(self, params)
1092-
if index in SKIP_IN_PATH:
1093-
raise ValueError("Empty value passed for a required argument 'index'.")
1094-
1095-
return await client._perform_request(
1096-
"POST", _make_path(index, "_freeze"), params=params, headers=headers
1097-
)
1098-
10991062
@query_params(
11001063
"allow_no_indices",
11011064
"expand_wildcards",

elasticsearch/_async/client/indices.pyi

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -743,29 +743,6 @@ class IndicesClient(NamespacedClient):
743743
params: Optional[MutableMapping[str, Any]] = ...,
744744
headers: Optional[MutableMapping[str, str]] = ...,
745745
) -> Any: ...
746-
async def freeze(
747-
self,
748-
index: Any,
749-
*,
750-
allow_no_indices: Optional[Any] = ...,
751-
expand_wildcards: Optional[Any] = ...,
752-
ignore_unavailable: Optional[Any] = ...,
753-
master_timeout: Optional[Any] = ...,
754-
timeout: Optional[Any] = ...,
755-
wait_for_active_shards: Optional[Any] = ...,
756-
pretty: Optional[bool] = ...,
757-
human: Optional[bool] = ...,
758-
error_trace: Optional[bool] = ...,
759-
format: Optional[str] = ...,
760-
filter_path: Optional[Union[str, Collection[str]]] = ...,
761-
request_timeout: Optional[Union[int, float]] = ...,
762-
ignore: Optional[Union[int, Collection[int]]] = ...,
763-
opaque_id: Optional[str] = ...,
764-
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
765-
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
766-
params: Optional[MutableMapping[str, Any]] = ...,
767-
headers: Optional[MutableMapping[str, str]] = ...,
768-
) -> Any: ...
769746
async def unfreeze(
770747
self,
771748
index: Any,

elasticsearch/_async/client/ml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ async def stop_data_frame_analytics(self, id, body=None, params=None, headers=No
13131313
body=body,
13141314
)
13151315

1316-
@query_params()
1316+
@query_params("timeout")
13171317
async def delete_trained_model(self, model_id, params=None, headers=None):
13181318
"""
13191319
Deletes an existing trained inference model that is currently not referenced by
@@ -1322,6 +1322,8 @@ async def delete_trained_model(self, model_id, params=None, headers=None):
13221322
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-trained-models.html>`_
13231323
13241324
:arg model_id: The ID of the trained model to delete
1325+
:arg timeout: Controls the amount of time to wait for the model
1326+
to be deleted. Default: 30s
13251327
"""
13261328
client, params = _deprecated_options(self, params)
13271329
if model_id in SKIP_IN_PATH:

elasticsearch/_async/client/ml.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ class MlClient(NamespacedClient):
975975
self,
976976
model_id: Any,
977977
*,
978+
timeout: Optional[Any] = ...,
978979
pretty: Optional[bool] = ...,
979980
human: Optional[bool] = ...,
980981
error_trace: Optional[bool] = ...,

elasticsearch/_async/client/nodes.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ async def info(self, node_id=None, metric=None, params=None, headers=None):
7171
)
7272

7373
@query_params(
74-
"doc_type", "ignore_idle_threads", "interval", "snapshots", "threads", "timeout"
74+
"doc_type",
75+
"ignore_idle_threads",
76+
"interval",
77+
"snapshots",
78+
"sort",
79+
"threads",
80+
"timeout",
7581
)
7682
async def hot_threads(self, node_id=None, params=None, headers=None):
7783
"""
@@ -84,13 +90,15 @@ async def hot_threads(self, node_id=None, params=None, headers=None):
8490
the node you're connecting to, leave empty to get information from all
8591
nodes
8692
:arg doc_type: The type to sample (default: cpu) Valid choices:
87-
cpu, wait, block
93+
cpu, wait, block, mem
8894
:arg ignore_idle_threads: Don't show threads that are in known-
8995
idle places, such as waiting on a socket select or pulling from an empty
9096
task queue (default: true)
9197
:arg interval: The interval for the second sampling of threads
9298
:arg snapshots: Number of samples of thread stacktrace (default:
9399
10)
100+
:arg sort: The sort order for 'cpu' type (default: total) Valid
101+
choices: cpu, total
94102
:arg threads: Specify the number of threads to provide
95103
information for (default: 3)
96104
:arg timeout: Explicit operation timeout

elasticsearch/_async/client/nodes.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class NodesClient(NamespacedClient):
6767
ignore_idle_threads: Optional[Any] = ...,
6868
interval: Optional[Any] = ...,
6969
snapshots: Optional[Any] = ...,
70+
sort: Optional[Any] = ...,
7071
threads: Optional[Any] = ...,
7172
timeout: Optional[Any] = ...,
7273
pretty: Optional[bool] = ...,

elasticsearch/_sync/client/indices.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,43 +1057,6 @@ def rollover(self, alias, body=None, new_index=None, params=None, headers=None):
10571057
body=body,
10581058
)
10591059

1060-
@query_params(
1061-
"allow_no_indices",
1062-
"expand_wildcards",
1063-
"ignore_unavailable",
1064-
"master_timeout",
1065-
"timeout",
1066-
"wait_for_active_shards",
1067-
)
1068-
def freeze(self, index, params=None, headers=None):
1069-
"""
1070-
Freezes an index. A frozen index has almost no overhead on the cluster (except
1071-
for maintaining its metadata in memory) and is read-only.
1072-
1073-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/freeze-index-api.html>`_
1074-
1075-
:arg index: The name of the index to freeze
1076-
:arg allow_no_indices: Whether to ignore if a wildcard indices
1077-
expression resolves into no concrete indices. (This includes `_all`
1078-
string or when no indices have been specified)
1079-
:arg expand_wildcards: Whether to expand wildcard expression to
1080-
concrete indices that are open, closed or both. Valid choices: open,
1081-
closed, hidden, none, all Default: closed
1082-
:arg ignore_unavailable: Whether specified concrete indices
1083-
should be ignored when unavailable (missing or closed)
1084-
:arg master_timeout: Specify timeout for connection to master
1085-
:arg timeout: Explicit operation timeout
1086-
:arg wait_for_active_shards: Sets the number of active shards to
1087-
wait for before the operation returns.
1088-
"""
1089-
client, params = _deprecated_options(self, params)
1090-
if index in SKIP_IN_PATH:
1091-
raise ValueError("Empty value passed for a required argument 'index'.")
1092-
1093-
return client._perform_request(
1094-
"POST", _make_path(index, "_freeze"), params=params, headers=headers
1095-
)
1096-
10971060
@query_params(
10981061
"allow_no_indices",
10991062
"expand_wildcards",

elasticsearch/_sync/client/indices.pyi

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -743,29 +743,6 @@ class IndicesClient(NamespacedClient):
743743
params: Optional[MutableMapping[str, Any]] = ...,
744744
headers: Optional[MutableMapping[str, str]] = ...,
745745
) -> Any: ...
746-
def freeze(
747-
self,
748-
index: Any,
749-
*,
750-
allow_no_indices: Optional[Any] = ...,
751-
expand_wildcards: Optional[Any] = ...,
752-
ignore_unavailable: Optional[Any] = ...,
753-
master_timeout: Optional[Any] = ...,
754-
timeout: Optional[Any] = ...,
755-
wait_for_active_shards: Optional[Any] = ...,
756-
pretty: Optional[bool] = ...,
757-
human: Optional[bool] = ...,
758-
error_trace: Optional[bool] = ...,
759-
format: Optional[str] = ...,
760-
filter_path: Optional[Union[str, Collection[str]]] = ...,
761-
request_timeout: Optional[Union[int, float]] = ...,
762-
ignore: Optional[Union[int, Collection[int]]] = ...,
763-
opaque_id: Optional[str] = ...,
764-
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
765-
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
766-
params: Optional[MutableMapping[str, Any]] = ...,
767-
headers: Optional[MutableMapping[str, str]] = ...,
768-
) -> Any: ...
769746
def unfreeze(
770747
self,
771748
index: Any,

elasticsearch/_sync/client/ml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ def stop_data_frame_analytics(self, id, body=None, params=None, headers=None):
12971297
body=body,
12981298
)
12991299

1300-
@query_params()
1300+
@query_params("timeout")
13011301
def delete_trained_model(self, model_id, params=None, headers=None):
13021302
"""
13031303
Deletes an existing trained inference model that is currently not referenced by
@@ -1306,6 +1306,8 @@ def delete_trained_model(self, model_id, params=None, headers=None):
13061306
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-trained-models.html>`_
13071307
13081308
:arg model_id: The ID of the trained model to delete
1309+
:arg timeout: Controls the amount of time to wait for the model
1310+
to be deleted. Default: 30s
13091311
"""
13101312
client, params = _deprecated_options(self, params)
13111313
if model_id in SKIP_IN_PATH:

elasticsearch/_sync/client/ml.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ class MlClient(NamespacedClient):
975975
self,
976976
model_id: Any,
977977
*,
978+
timeout: Optional[Any] = ...,
978979
pretty: Optional[bool] = ...,
979980
human: Optional[bool] = ...,
980981
error_trace: Optional[bool] = ...,

elasticsearch/_sync/client/nodes.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ def info(self, node_id=None, metric=None, params=None, headers=None):
7171
)
7272

7373
@query_params(
74-
"doc_type", "ignore_idle_threads", "interval", "snapshots", "threads", "timeout"
74+
"doc_type",
75+
"ignore_idle_threads",
76+
"interval",
77+
"snapshots",
78+
"sort",
79+
"threads",
80+
"timeout",
7581
)
7682
def hot_threads(self, node_id=None, params=None, headers=None):
7783
"""
@@ -84,13 +90,15 @@ def hot_threads(self, node_id=None, params=None, headers=None):
8490
the node you're connecting to, leave empty to get information from all
8591
nodes
8692
:arg doc_type: The type to sample (default: cpu) Valid choices:
87-
cpu, wait, block
93+
cpu, wait, block, mem
8894
:arg ignore_idle_threads: Don't show threads that are in known-
8995
idle places, such as waiting on a socket select or pulling from an empty
9096
task queue (default: true)
9197
:arg interval: The interval for the second sampling of threads
9298
:arg snapshots: Number of samples of thread stacktrace (default:
9399
10)
100+
:arg sort: The sort order for 'cpu' type (default: total) Valid
101+
choices: cpu, total
94102
:arg threads: Specify the number of threads to provide
95103
information for (default: 3)
96104
:arg timeout: Explicit operation timeout

elasticsearch/_sync/client/nodes.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class NodesClient(NamespacedClient):
6767
ignore_idle_threads: Optional[Any] = ...,
6868
interval: Optional[Any] = ...,
6969
snapshots: Optional[Any] = ...,
70+
sort: Optional[Any] = ...,
7071
threads: Optional[Any] = ...,
7172
timeout: Optional[Any] = ...,
7273
pretty: Optional[bool] = ...,

0 commit comments

Comments
 (0)