diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py index 14051695..c506cfe6 100644 --- a/elasticsearch/_async/client/__init__.py +++ b/elasticsearch/_async/client/__init__.py @@ -31,11 +31,13 @@ from .data_frame import Data_FrameClient from .deprecation import DeprecationClient from .enrich import EnrichClient from .eql import EqlClient +from .features import FeaturesClient from .graph import GraphClient from .ilm import IlmClient from .indices import IndicesClient from .ingest import IngestClient from .license import LicenseClient +from .logstash import LogstashClient from .migration import MigrationClient from .ml import MlClient from .monitoring import MonitoringClient @@ -221,9 +223,11 @@ class AsyncElasticsearch(object): self.deprecation = DeprecationClient(self) self.enrich = EnrichClient(self) self.eql = EqlClient(self) + self.features = FeaturesClient(self) self.graph = GraphClient(self) self.ilm = IlmClient(self) self.license = LicenseClient(self) + self.logstash = LogstashClient(self) self.migration = MigrationClient(self) self.ml = MlClient(self) self.monitoring = MonitoringClient(self) diff --git a/elasticsearch/_async/client/__init__.pyi b/elasticsearch/_async/client/__init__.pyi index ab91f140..0c3299b0 100644 --- a/elasticsearch/_async/client/__init__.pyi +++ b/elasticsearch/_async/client/__init__.pyi @@ -30,11 +30,13 @@ from .cluster import ClusterClient from .dangling_indices import DanglingIndicesClient from .enrich import EnrichClient from .eql import EqlClient +from .features import FeaturesClient from .graph import GraphClient from .ilm import IlmClient from .indices import IndicesClient from .ingest import IngestClient from .license import LicenseClient +from .logstash import LogstashClient from .migration import MigrationClient from .ml import MlClient from .monitoring import MonitoringClient @@ -64,6 +66,7 @@ class AsyncElasticsearch(object): autoscaling: AutoscalingClient cat: CatClient cluster: ClusterClient + features: FeaturesClient indices: IndicesClient ingest: IngestClient nodes: NodesClient @@ -79,6 +82,7 @@ class AsyncElasticsearch(object): graph: GraphClient ilm: IlmClient license: LicenseClient + logstash: LogstashClient migration: MigrationClient ml: MlClient monitoring: MonitoringClient diff --git a/elasticsearch/_async/client/cat.py b/elasticsearch/_async/client/cat.py index ed2f7d0c..5c078a25 100644 --- a/elasticsearch/_async/client/cat.py +++ b/elasticsearch/_async/client/cat.py @@ -218,6 +218,7 @@ class CatClient(NamespacedClient): "full_id", "h", "help", + "include_unloaded_segments", "local", "master_timeout", "s", @@ -238,6 +239,9 @@ class CatClient(NamespacedClient): version (default: false) :arg h: Comma-separated list of column names to display :arg help: Return help information + :arg include_unloaded_segments: If set to true segment stats + will include stats for segments that are not currently loaded into + memory :arg local: Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) :arg master_timeout: Explicit operation timeout for connection diff --git a/elasticsearch/_async/client/cat.pyi b/elasticsearch/_async/client/cat.pyi index 6ba185df..b361422d 100644 --- a/elasticsearch/_async/client/cat.pyi +++ b/elasticsearch/_async/client/cat.pyi @@ -173,6 +173,7 @@ class CatClient(NamespacedClient): full_id: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., + include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., diff --git a/elasticsearch/_async/client/eql.py b/elasticsearch/_async/client/eql.py index 0048071c..9acf12df 100644 --- a/elasticsearch/_async/client/eql.py +++ b/elasticsearch/_async/client/eql.py @@ -86,3 +86,23 @@ class EqlClient(NamespacedClient): return await self.transport.perform_request( "GET", _make_path("_eql", "search", id), params=params, headers=headers ) + + @query_params() + async def get_status(self, id, params=None, headers=None): + """ + Returns the status of a previously submitted async or stored Event Query + Language (EQL) search + + ``_ + + :arg id: The async search ID + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return await self.transport.perform_request( + "GET", + _make_path("_eql", "search", "status", id), + params=params, + headers=headers, + ) diff --git a/elasticsearch/_async/client/eql.pyi b/elasticsearch/_async/client/eql.pyi index 2110cb65..eb78704f 100644 --- a/elasticsearch/_async/client/eql.pyi +++ b/elasticsearch/_async/client/eql.pyi @@ -71,3 +71,18 @@ class EqlClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... + async def get_status( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/_async/client/features.py b/elasticsearch/_async/client/features.py new file mode 100644 index 00000000..4fd67138 --- /dev/null +++ b/elasticsearch/_async/client/features.py @@ -0,0 +1,51 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from .utils import NamespacedClient, query_params + + +class FeaturesClient(NamespacedClient): + @query_params("master_timeout") + async def get_features(self, params=None, headers=None): + """ + Gets a list of features which can be included in snapshots using the + feature_states field when creating a snapshot + + ``_ + + :arg master_timeout: Explicit operation timeout for connection + to master node + """ + return await self.transport.perform_request( + "GET", "/_features", params=params, headers=headers + ) + + @query_params() + async def reset_features(self, params=None, headers=None): + """ + Resets the internal state of features, usually by deleting system indices + + ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + """ + return await self.transport.perform_request( + "POST", "/_features/_reset", params=params, headers=headers + ) diff --git a/elasticsearch/_async/client/features.pyi b/elasticsearch/_async/client/features.pyi new file mode 100644 index 00000000..8bb79b7b --- /dev/null +++ b/elasticsearch/_async/client/features.pyi @@ -0,0 +1,51 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from typing import Any, Collection, MutableMapping, Optional, Union + +from .utils import NamespacedClient + +class FeaturesClient(NamespacedClient): + async def get_features( + self, + *, + master_timeout: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + async def reset_features( + self, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/_async/client/indices.py b/elasticsearch/_async/client/indices.py index d6eca9aa..c94a4fc6 100644 --- a/elasticsearch/_async/client/indices.py +++ b/elasticsearch/_async/client/indices.py @@ -254,7 +254,9 @@ class IndicesClient(NamespacedClient): :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout :arg wait_for_active_shards: Sets the number of active shards to - wait for before the operation returns. + wait for before the operation returns. Set to `index-setting` to wait + according to the index setting `index.write.wait_for_active_shards`, or + `all` to wait for all shards, or an integer. Defaults to `0`. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") diff --git a/elasticsearch/_async/client/ingest.py b/elasticsearch/_async/client/ingest.py index 02945fe0..d3cd793c 100644 --- a/elasticsearch/_async/client/ingest.py +++ b/elasticsearch/_async/client/ingest.py @@ -19,7 +19,7 @@ from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params class IngestClient(NamespacedClient): - @query_params("master_timeout") + @query_params("master_timeout", "summary") async def get_pipeline(self, id=None, params=None, headers=None): """ Returns a pipeline. @@ -30,6 +30,8 @@ class IngestClient(NamespacedClient): supported :arg master_timeout: Explicit operation timeout for connection to master node + :arg summary: Return pipelines without their definitions + (default: false) """ return await self.transport.perform_request( "GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers diff --git a/elasticsearch/_async/client/ingest.pyi b/elasticsearch/_async/client/ingest.pyi index d49a5ac0..505fc7ab 100644 --- a/elasticsearch/_async/client/ingest.pyi +++ b/elasticsearch/_async/client/ingest.pyi @@ -25,6 +25,7 @@ class IngestClient(NamespacedClient): *, id: Optional[Any] = ..., master_timeout: Optional[Any] = ..., + summary: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., diff --git a/elasticsearch/_async/client/logstash.py b/elasticsearch/_async/client/logstash.py new file mode 100644 index 00000000..f4ab0479 --- /dev/null +++ b/elasticsearch/_async/client/logstash.py @@ -0,0 +1,80 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params + + +class LogstashClient(NamespacedClient): + @query_params() + async def delete_pipeline(self, id, params=None, headers=None): + """ + Deletes Logstash Pipelines used by Central Management + + ``_ + + :arg id: The ID of the Pipeline + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return await self.transport.perform_request( + "DELETE", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + ) + + @query_params() + async def get_pipeline(self, id, params=None, headers=None): + """ + Retrieves Logstash Pipelines used by Central Management + + ``_ + + :arg id: A comma-separated list of Pipeline IDs + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return await self.transport.perform_request( + "GET", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + ) + + @query_params() + async def put_pipeline(self, id, body, params=None, headers=None): + """ + Adds and updates Logstash Pipelines used for Central Management + + ``_ + + :arg id: The ID of the Pipeline + :arg body: The Pipeline to add or update + """ + for param in (id, body): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return await self.transport.perform_request( + "PUT", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + body=body, + ) diff --git a/elasticsearch/_async/client/logstash.pyi b/elasticsearch/_async/client/logstash.pyi new file mode 100644 index 00000000..99d5e591 --- /dev/null +++ b/elasticsearch/_async/client/logstash.pyi @@ -0,0 +1,68 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from typing import Any, Collection, MutableMapping, Optional, Union + +from .utils import NamespacedClient + +class LogstashClient(NamespacedClient): + async def delete_pipeline( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + async def get_pipeline( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + async def put_pipeline( + self, + id: Any, + *, + body: Any, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/_async/client/ml.py b/elasticsearch/_async/client/ml.py index 469e4554..102ae1bb 100644 --- a/elasticsearch/_async/client/ml.py +++ b/elasticsearch/_async/client/ml.py @@ -1676,3 +1676,89 @@ class MlClient(NamespacedClient): params=params, headers=headers, ) + + @query_params() + async def delete_trained_model_alias( + self, model_id, model_alias, params=None, headers=None + ): + """ + Deletes a model alias that refers to the trained model + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg model_id: The trained model where the model alias is + assigned + :arg model_alias: The trained model alias to delete + """ + for param in (model_id, model_alias): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return await self.transport.perform_request( + "DELETE", + _make_path("_ml", "trained_models", model_id, "model_aliases", model_alias), + params=params, + headers=headers, + ) + + @query_params() + async def preview_data_frame_analytics( + self, body=None, id=None, params=None, headers=None + ): + """ + Previews that will be analyzed given a data frame analytics config. + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg body: The data frame analytics config to preview + :arg id: The ID of the data frame analytics to preview + """ + return await self.transport.perform_request( + "POST", + _make_path("_ml", "data_frame", "analytics", id, "_preview"), + params=params, + headers=headers, + body=body, + ) + + @query_params("reassign") + async def put_trained_model_alias( + self, model_id, model_alias, params=None, headers=None + ): + """ + Creates a new model alias (or reassigns an existing one) to refer to the + trained model + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg model_id: The trained model where the model alias should be + assigned + :arg model_alias: The trained model alias to update + :arg reassign: If the model_alias already exists and points to a + separate model_id, this parameter must be true. Defaults to false. + """ + for param in (model_id, model_alias): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return await self.transport.perform_request( + "PUT", + _make_path("_ml", "trained_models", model_id, "model_aliases", model_alias), + params=params, + headers=headers, + ) diff --git a/elasticsearch/_async/client/ml.pyi b/elasticsearch/_async/client/ml.pyi index 0c4e9873..da33a129 100644 --- a/elasticsearch/_async/client/ml.pyi +++ b/elasticsearch/_async/client/ml.pyi @@ -1085,3 +1085,52 @@ class MlClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... + async def delete_trained_model_alias( + self, + model_id: Any, + model_alias: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + async def preview_data_frame_analytics( + self, + *, + body: Optional[Any] = ..., + id: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + async def put_trained_model_alias( + self, + model_id: Any, + model_alias: Any, + *, + reassign: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/_async/client/nodes.py b/elasticsearch/_async/client/nodes.py index 71b34c4b..45bf4bf1 100644 --- a/elasticsearch/_async/client/nodes.py +++ b/elasticsearch/_async/client/nodes.py @@ -71,6 +71,7 @@ class NodesClient(NamespacedClient): "fields", "groups", "include_segment_file_sizes", + "include_unloaded_segments", "level", "timeout", "types", @@ -106,6 +107,9 @@ class NodesClient(NamespacedClient): :arg include_segment_file_sizes: Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + :arg include_unloaded_segments: If set to true segment stats + will include stats for segments that are not currently loaded into + memory :arg level: Return indices stats aggregated at index, node or shard level Valid choices: indices, node, shards Default: node :arg timeout: Explicit operation timeout diff --git a/elasticsearch/_async/client/nodes.pyi b/elasticsearch/_async/client/nodes.pyi index 74ce6847..870c88fb 100644 --- a/elasticsearch/_async/client/nodes.pyi +++ b/elasticsearch/_async/client/nodes.pyi @@ -66,6 +66,7 @@ class NodesClient(NamespacedClient): fields: Optional[Any] = ..., groups: Optional[Any] = ..., include_segment_file_sizes: Optional[Any] = ..., + include_unloaded_segments: Optional[Any] = ..., level: Optional[Any] = ..., timeout: Optional[Any] = ..., types: Optional[Any] = ..., diff --git a/elasticsearch/_async/client/searchable_snapshots.py b/elasticsearch/_async/client/searchable_snapshots.py index be09ca68..e5c59c70 100644 --- a/elasticsearch/_async/client/searchable_snapshots.py +++ b/elasticsearch/_async/client/searchable_snapshots.py @@ -49,7 +49,7 @@ class SearchableSnapshotsClient(NamespacedClient): headers=headers, ) - @query_params("master_timeout", "wait_for_completion") + @query_params("master_timeout", "storage", "wait_for_completion") async def mount(self, repository, snapshot, body, params=None, headers=None): """ Mount a snapshot as a searchable index. @@ -68,6 +68,8 @@ class SearchableSnapshotsClient(NamespacedClient): as searchable :arg master_timeout: Explicit operation timeout for connection to master node + :arg storage: Selects the kind of local storage used to + accelerate searches. Experimental, and defaults to `full_copy` :arg wait_for_completion: Should this request wait until the operation has completed before returning """ @@ -107,7 +109,7 @@ class SearchableSnapshotsClient(NamespacedClient): headers=headers, ) - @query_params() + @query_params("level") async def stats(self, index=None, params=None, headers=None): """ Retrieve various statistics about searchable snapshots. @@ -120,6 +122,8 @@ class SearchableSnapshotsClient(NamespacedClient): or be removed in a future version :arg index: A comma-separated list of index names + :arg level: Return stats aggregated at cluster, index or shard + level Valid choices: cluster, indices, shards Default: indices """ return await self.transport.perform_request( "GET", diff --git a/elasticsearch/_async/client/searchable_snapshots.pyi b/elasticsearch/_async/client/searchable_snapshots.pyi index 6e2414bd..90f47792 100644 --- a/elasticsearch/_async/client/searchable_snapshots.pyi +++ b/elasticsearch/_async/client/searchable_snapshots.pyi @@ -45,6 +45,7 @@ class SearchableSnapshotsClient(NamespacedClient): *, body: Any, master_timeout: Optional[Any] = ..., + storage: Optional[Any] = ..., wait_for_completion: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -76,6 +77,7 @@ class SearchableSnapshotsClient(NamespacedClient): self, *, index: Optional[Any] = ..., + level: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., diff --git a/elasticsearch/_async/client/text_structure.py b/elasticsearch/_async/client/text_structure.py index 1e7dca9f..f396b0ca 100644 --- a/elasticsearch/_async/client/text_structure.py +++ b/elasticsearch/_async/client/text_structure.py @@ -40,7 +40,7 @@ class TextStructureClient(NamespacedClient): Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. - ``_ + ``_ .. warning:: diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index ee7f0408..17be9e58 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -31,11 +31,13 @@ from .data_frame import Data_FrameClient from .deprecation import DeprecationClient from .enrich import EnrichClient from .eql import EqlClient +from .features import FeaturesClient from .graph import GraphClient from .ilm import IlmClient from .indices import IndicesClient from .ingest import IngestClient from .license import LicenseClient +from .logstash import LogstashClient from .migration import MigrationClient from .ml import MlClient from .monitoring import MonitoringClient @@ -221,9 +223,11 @@ class Elasticsearch(object): self.deprecation = DeprecationClient(self) self.enrich = EnrichClient(self) self.eql = EqlClient(self) + self.features = FeaturesClient(self) self.graph = GraphClient(self) self.ilm = IlmClient(self) self.license = LicenseClient(self) + self.logstash = LogstashClient(self) self.migration = MigrationClient(self) self.ml = MlClient(self) self.monitoring = MonitoringClient(self) diff --git a/elasticsearch/client/__init__.pyi b/elasticsearch/client/__init__.pyi index 482f6cce..e7a1b845 100644 --- a/elasticsearch/client/__init__.pyi +++ b/elasticsearch/client/__init__.pyi @@ -30,11 +30,13 @@ from .cluster import ClusterClient from .dangling_indices import DanglingIndicesClient from .enrich import EnrichClient from .eql import EqlClient +from .features import FeaturesClient from .graph import GraphClient from .ilm import IlmClient from .indices import IndicesClient from .ingest import IngestClient from .license import LicenseClient +from .logstash import LogstashClient from .migration import MigrationClient from .ml import MlClient from .monitoring import MonitoringClient @@ -64,6 +66,7 @@ class Elasticsearch(object): autoscaling: AutoscalingClient cat: CatClient cluster: ClusterClient + features: FeaturesClient indices: IndicesClient ingest: IngestClient nodes: NodesClient @@ -79,6 +82,7 @@ class Elasticsearch(object): graph: GraphClient ilm: IlmClient license: LicenseClient + logstash: LogstashClient migration: MigrationClient ml: MlClient monitoring: MonitoringClient diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index 287c24d7..1aaa8b35 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -218,6 +218,7 @@ class CatClient(NamespacedClient): "full_id", "h", "help", + "include_unloaded_segments", "local", "master_timeout", "s", @@ -238,6 +239,9 @@ class CatClient(NamespacedClient): version (default: false) :arg h: Comma-separated list of column names to display :arg help: Return help information + :arg include_unloaded_segments: If set to true segment stats + will include stats for segments that are not currently loaded into + memory :arg local: Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) :arg master_timeout: Explicit operation timeout for connection diff --git a/elasticsearch/client/cat.pyi b/elasticsearch/client/cat.pyi index f5ef0d49..4e668c81 100644 --- a/elasticsearch/client/cat.pyi +++ b/elasticsearch/client/cat.pyi @@ -173,6 +173,7 @@ class CatClient(NamespacedClient): full_id: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., + include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., diff --git a/elasticsearch/client/eql.py b/elasticsearch/client/eql.py index e031b742..a2cd8b2d 100644 --- a/elasticsearch/client/eql.py +++ b/elasticsearch/client/eql.py @@ -86,3 +86,23 @@ class EqlClient(NamespacedClient): return self.transport.perform_request( "GET", _make_path("_eql", "search", id), params=params, headers=headers ) + + @query_params() + def get_status(self, id, params=None, headers=None): + """ + Returns the status of a previously submitted async or stored Event Query + Language (EQL) search + + ``_ + + :arg id: The async search ID + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return self.transport.perform_request( + "GET", + _make_path("_eql", "search", "status", id), + params=params, + headers=headers, + ) diff --git a/elasticsearch/client/eql.pyi b/elasticsearch/client/eql.pyi index 31edb756..6209ab22 100644 --- a/elasticsearch/client/eql.pyi +++ b/elasticsearch/client/eql.pyi @@ -71,3 +71,18 @@ class EqlClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... + def get_status( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/client/features.py b/elasticsearch/client/features.py new file mode 100644 index 00000000..c18c915b --- /dev/null +++ b/elasticsearch/client/features.py @@ -0,0 +1,51 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from .utils import NamespacedClient, query_params + + +class FeaturesClient(NamespacedClient): + @query_params("master_timeout") + def get_features(self, params=None, headers=None): + """ + Gets a list of features which can be included in snapshots using the + feature_states field when creating a snapshot + + ``_ + + :arg master_timeout: Explicit operation timeout for connection + to master node + """ + return self.transport.perform_request( + "GET", "/_features", params=params, headers=headers + ) + + @query_params() + def reset_features(self, params=None, headers=None): + """ + Resets the internal state of features, usually by deleting system indices + + ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + """ + return self.transport.perform_request( + "POST", "/_features/_reset", params=params, headers=headers + ) diff --git a/elasticsearch/client/features.pyi b/elasticsearch/client/features.pyi new file mode 100644 index 00000000..4f10f464 --- /dev/null +++ b/elasticsearch/client/features.pyi @@ -0,0 +1,51 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from typing import Any, Collection, MutableMapping, Optional, Union + +from .utils import NamespacedClient + +class FeaturesClient(NamespacedClient): + def get_features( + self, + *, + master_timeout: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + def reset_features( + self, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 5b9d798b..477d5402 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -254,7 +254,9 @@ class IndicesClient(NamespacedClient): :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout :arg wait_for_active_shards: Sets the number of active shards to - wait for before the operation returns. + wait for before the operation returns. Set to `index-setting` to wait + according to the index setting `index.write.wait_for_active_shards`, or + `all` to wait for all shards, or an integer. Defaults to `0`. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") diff --git a/elasticsearch/client/ingest.py b/elasticsearch/client/ingest.py index 0242585d..f8d1933d 100644 --- a/elasticsearch/client/ingest.py +++ b/elasticsearch/client/ingest.py @@ -19,7 +19,7 @@ from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params class IngestClient(NamespacedClient): - @query_params("master_timeout") + @query_params("master_timeout", "summary") def get_pipeline(self, id=None, params=None, headers=None): """ Returns a pipeline. @@ -30,6 +30,8 @@ class IngestClient(NamespacedClient): supported :arg master_timeout: Explicit operation timeout for connection to master node + :arg summary: Return pipelines without their definitions + (default: false) """ return self.transport.perform_request( "GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers diff --git a/elasticsearch/client/ingest.pyi b/elasticsearch/client/ingest.pyi index c54e49c2..17c7c655 100644 --- a/elasticsearch/client/ingest.pyi +++ b/elasticsearch/client/ingest.pyi @@ -25,6 +25,7 @@ class IngestClient(NamespacedClient): *, id: Optional[Any] = ..., master_timeout: Optional[Any] = ..., + summary: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., diff --git a/elasticsearch/client/logstash.py b/elasticsearch/client/logstash.py new file mode 100644 index 00000000..f1a18601 --- /dev/null +++ b/elasticsearch/client/logstash.py @@ -0,0 +1,80 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params + + +class LogstashClient(NamespacedClient): + @query_params() + def delete_pipeline(self, id, params=None, headers=None): + """ + Deletes Logstash Pipelines used by Central Management + + ``_ + + :arg id: The ID of the Pipeline + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return self.transport.perform_request( + "DELETE", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + ) + + @query_params() + def get_pipeline(self, id, params=None, headers=None): + """ + Retrieves Logstash Pipelines used by Central Management + + ``_ + + :arg id: A comma-separated list of Pipeline IDs + """ + if id in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument 'id'.") + + return self.transport.perform_request( + "GET", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + ) + + @query_params() + def put_pipeline(self, id, body, params=None, headers=None): + """ + Adds and updates Logstash Pipelines used for Central Management + + ``_ + + :arg id: The ID of the Pipeline + :arg body: The Pipeline to add or update + """ + for param in (id, body): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return self.transport.perform_request( + "PUT", + _make_path("_logstash", "pipeline", id), + params=params, + headers=headers, + body=body, + ) diff --git a/elasticsearch/client/logstash.pyi b/elasticsearch/client/logstash.pyi new file mode 100644 index 00000000..9d11680b --- /dev/null +++ b/elasticsearch/client/logstash.pyi @@ -0,0 +1,68 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from typing import Any, Collection, MutableMapping, Optional, Union + +from .utils import NamespacedClient + +class LogstashClient(NamespacedClient): + def delete_pipeline( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + def get_pipeline( + self, + id: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + def put_pipeline( + self, + id: Any, + *, + body: Any, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/client/ml.py b/elasticsearch/client/ml.py index c243e1a8..d39fb064 100644 --- a/elasticsearch/client/ml.py +++ b/elasticsearch/client/ml.py @@ -1660,3 +1660,87 @@ class MlClient(NamespacedClient): params=params, headers=headers, ) + + @query_params() + def delete_trained_model_alias( + self, model_id, model_alias, params=None, headers=None + ): + """ + Deletes a model alias that refers to the trained model + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg model_id: The trained model where the model alias is + assigned + :arg model_alias: The trained model alias to delete + """ + for param in (model_id, model_alias): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return self.transport.perform_request( + "DELETE", + _make_path("_ml", "trained_models", model_id, "model_aliases", model_alias), + params=params, + headers=headers, + ) + + @query_params() + def preview_data_frame_analytics( + self, body=None, id=None, params=None, headers=None + ): + """ + Previews that will be analyzed given a data frame analytics config. + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg body: The data frame analytics config to preview + :arg id: The ID of the data frame analytics to preview + """ + return self.transport.perform_request( + "POST", + _make_path("_ml", "data_frame", "analytics", id, "_preview"), + params=params, + headers=headers, + body=body, + ) + + @query_params("reassign") + def put_trained_model_alias(self, model_id, model_alias, params=None, headers=None): + """ + Creates a new model alias (or reassigns an existing one) to refer to the + trained model + + ``_ + + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + + :arg model_id: The trained model where the model alias should be + assigned + :arg model_alias: The trained model alias to update + :arg reassign: If the model_alias already exists and points to a + separate model_id, this parameter must be true. Defaults to false. + """ + for param in (model_id, model_alias): + if param in SKIP_IN_PATH: + raise ValueError("Empty value passed for a required argument.") + + return self.transport.perform_request( + "PUT", + _make_path("_ml", "trained_models", model_id, "model_aliases", model_alias), + params=params, + headers=headers, + ) diff --git a/elasticsearch/client/ml.pyi b/elasticsearch/client/ml.pyi index 1284375b..23db5f73 100644 --- a/elasticsearch/client/ml.pyi +++ b/elasticsearch/client/ml.pyi @@ -1085,3 +1085,52 @@ class MlClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... + def delete_trained_model_alias( + self, + model_id: Any, + model_alias: Any, + *, + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + def preview_data_frame_analytics( + self, + *, + body: Optional[Any] = ..., + id: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... + def put_trained_model_alias( + self, + model_id: Any, + model_alias: Any, + *, + reassign: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ... + ) -> Any: ... diff --git a/elasticsearch/client/nodes.py b/elasticsearch/client/nodes.py index d6e5c6e7..0b081449 100644 --- a/elasticsearch/client/nodes.py +++ b/elasticsearch/client/nodes.py @@ -71,6 +71,7 @@ class NodesClient(NamespacedClient): "fields", "groups", "include_segment_file_sizes", + "include_unloaded_segments", "level", "timeout", "types", @@ -106,6 +107,9 @@ class NodesClient(NamespacedClient): :arg include_segment_file_sizes: Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + :arg include_unloaded_segments: If set to true segment stats + will include stats for segments that are not currently loaded into + memory :arg level: Return indices stats aggregated at index, node or shard level Valid choices: indices, node, shards Default: node :arg timeout: Explicit operation timeout diff --git a/elasticsearch/client/nodes.pyi b/elasticsearch/client/nodes.pyi index 4f8b0c33..b5a75851 100644 --- a/elasticsearch/client/nodes.pyi +++ b/elasticsearch/client/nodes.pyi @@ -66,6 +66,7 @@ class NodesClient(NamespacedClient): fields: Optional[Any] = ..., groups: Optional[Any] = ..., include_segment_file_sizes: Optional[Any] = ..., + include_unloaded_segments: Optional[Any] = ..., level: Optional[Any] = ..., timeout: Optional[Any] = ..., types: Optional[Any] = ..., diff --git a/elasticsearch/client/searchable_snapshots.py b/elasticsearch/client/searchable_snapshots.py index 9466a5cb..8b828447 100644 --- a/elasticsearch/client/searchable_snapshots.py +++ b/elasticsearch/client/searchable_snapshots.py @@ -49,7 +49,7 @@ class SearchableSnapshotsClient(NamespacedClient): headers=headers, ) - @query_params("master_timeout", "wait_for_completion") + @query_params("master_timeout", "storage", "wait_for_completion") def mount(self, repository, snapshot, body, params=None, headers=None): """ Mount a snapshot as a searchable index. @@ -68,6 +68,8 @@ class SearchableSnapshotsClient(NamespacedClient): as searchable :arg master_timeout: Explicit operation timeout for connection to master node + :arg storage: Selects the kind of local storage used to + accelerate searches. Experimental, and defaults to `full_copy` :arg wait_for_completion: Should this request wait until the operation has completed before returning """ @@ -107,7 +109,7 @@ class SearchableSnapshotsClient(NamespacedClient): headers=headers, ) - @query_params() + @query_params("level") def stats(self, index=None, params=None, headers=None): """ Retrieve various statistics about searchable snapshots. @@ -120,6 +122,8 @@ class SearchableSnapshotsClient(NamespacedClient): or be removed in a future version :arg index: A comma-separated list of index names + :arg level: Return stats aggregated at cluster, index or shard + level Valid choices: cluster, indices, shards Default: indices """ return self.transport.perform_request( "GET", diff --git a/elasticsearch/client/searchable_snapshots.pyi b/elasticsearch/client/searchable_snapshots.pyi index 01821f13..10247483 100644 --- a/elasticsearch/client/searchable_snapshots.pyi +++ b/elasticsearch/client/searchable_snapshots.pyi @@ -45,6 +45,7 @@ class SearchableSnapshotsClient(NamespacedClient): *, body: Any, master_timeout: Optional[Any] = ..., + storage: Optional[Any] = ..., wait_for_completion: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -76,6 +77,7 @@ class SearchableSnapshotsClient(NamespacedClient): self, *, index: Optional[Any] = ..., + level: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., diff --git a/elasticsearch/client/text_structure.py b/elasticsearch/client/text_structure.py index 00e22309..6af86d70 100644 --- a/elasticsearch/client/text_structure.py +++ b/elasticsearch/client/text_structure.py @@ -40,7 +40,7 @@ class TextStructureClient(NamespacedClient): Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. - ``_ + ``_ .. warning::