Update APIs for 7.x
This commit is contained in:
@@ -31,11 +31,13 @@ from .data_frame import Data_FrameClient
|
|||||||
from .deprecation import DeprecationClient
|
from .deprecation import DeprecationClient
|
||||||
from .enrich import EnrichClient
|
from .enrich import EnrichClient
|
||||||
from .eql import EqlClient
|
from .eql import EqlClient
|
||||||
|
from .features import FeaturesClient
|
||||||
from .graph import GraphClient
|
from .graph import GraphClient
|
||||||
from .ilm import IlmClient
|
from .ilm import IlmClient
|
||||||
from .indices import IndicesClient
|
from .indices import IndicesClient
|
||||||
from .ingest import IngestClient
|
from .ingest import IngestClient
|
||||||
from .license import LicenseClient
|
from .license import LicenseClient
|
||||||
|
from .logstash import LogstashClient
|
||||||
from .migration import MigrationClient
|
from .migration import MigrationClient
|
||||||
from .ml import MlClient
|
from .ml import MlClient
|
||||||
from .monitoring import MonitoringClient
|
from .monitoring import MonitoringClient
|
||||||
@@ -221,9 +223,11 @@ class AsyncElasticsearch(object):
|
|||||||
self.deprecation = DeprecationClient(self)
|
self.deprecation = DeprecationClient(self)
|
||||||
self.enrich = EnrichClient(self)
|
self.enrich = EnrichClient(self)
|
||||||
self.eql = EqlClient(self)
|
self.eql = EqlClient(self)
|
||||||
|
self.features = FeaturesClient(self)
|
||||||
self.graph = GraphClient(self)
|
self.graph = GraphClient(self)
|
||||||
self.ilm = IlmClient(self)
|
self.ilm = IlmClient(self)
|
||||||
self.license = LicenseClient(self)
|
self.license = LicenseClient(self)
|
||||||
|
self.logstash = LogstashClient(self)
|
||||||
self.migration = MigrationClient(self)
|
self.migration = MigrationClient(self)
|
||||||
self.ml = MlClient(self)
|
self.ml = MlClient(self)
|
||||||
self.monitoring = MonitoringClient(self)
|
self.monitoring = MonitoringClient(self)
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ from .cluster import ClusterClient
|
|||||||
from .dangling_indices import DanglingIndicesClient
|
from .dangling_indices import DanglingIndicesClient
|
||||||
from .enrich import EnrichClient
|
from .enrich import EnrichClient
|
||||||
from .eql import EqlClient
|
from .eql import EqlClient
|
||||||
|
from .features import FeaturesClient
|
||||||
from .graph import GraphClient
|
from .graph import GraphClient
|
||||||
from .ilm import IlmClient
|
from .ilm import IlmClient
|
||||||
from .indices import IndicesClient
|
from .indices import IndicesClient
|
||||||
from .ingest import IngestClient
|
from .ingest import IngestClient
|
||||||
from .license import LicenseClient
|
from .license import LicenseClient
|
||||||
|
from .logstash import LogstashClient
|
||||||
from .migration import MigrationClient
|
from .migration import MigrationClient
|
||||||
from .ml import MlClient
|
from .ml import MlClient
|
||||||
from .monitoring import MonitoringClient
|
from .monitoring import MonitoringClient
|
||||||
@@ -64,6 +66,7 @@ class AsyncElasticsearch(object):
|
|||||||
autoscaling: AutoscalingClient
|
autoscaling: AutoscalingClient
|
||||||
cat: CatClient
|
cat: CatClient
|
||||||
cluster: ClusterClient
|
cluster: ClusterClient
|
||||||
|
features: FeaturesClient
|
||||||
indices: IndicesClient
|
indices: IndicesClient
|
||||||
ingest: IngestClient
|
ingest: IngestClient
|
||||||
nodes: NodesClient
|
nodes: NodesClient
|
||||||
@@ -79,6 +82,7 @@ class AsyncElasticsearch(object):
|
|||||||
graph: GraphClient
|
graph: GraphClient
|
||||||
ilm: IlmClient
|
ilm: IlmClient
|
||||||
license: LicenseClient
|
license: LicenseClient
|
||||||
|
logstash: LogstashClient
|
||||||
migration: MigrationClient
|
migration: MigrationClient
|
||||||
ml: MlClient
|
ml: MlClient
|
||||||
monitoring: MonitoringClient
|
monitoring: MonitoringClient
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ class CatClient(NamespacedClient):
|
|||||||
"full_id",
|
"full_id",
|
||||||
"h",
|
"h",
|
||||||
"help",
|
"help",
|
||||||
|
"include_unloaded_segments",
|
||||||
"local",
|
"local",
|
||||||
"master_timeout",
|
"master_timeout",
|
||||||
"s",
|
"s",
|
||||||
@@ -238,6 +239,9 @@ class CatClient(NamespacedClient):
|
|||||||
version (default: false)
|
version (default: false)
|
||||||
:arg h: Comma-separated list of column names to display
|
:arg h: Comma-separated list of column names to display
|
||||||
:arg help: Return help information
|
: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
|
:arg local: Calculate the selected nodes using the local cluster
|
||||||
state rather than the state from master node (default: false)
|
state rather than the state from master node (default: false)
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ class CatClient(NamespacedClient):
|
|||||||
full_id: Optional[Any] = ...,
|
full_id: Optional[Any] = ...,
|
||||||
h: Optional[Any] = ...,
|
h: Optional[Any] = ...,
|
||||||
help: Optional[Any] = ...,
|
help: Optional[Any] = ...,
|
||||||
|
include_unloaded_segments: Optional[Any] = ...,
|
||||||
local: Optional[Any] = ...,
|
local: Optional[Any] = ...,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
s: Optional[Any] = ...,
|
s: Optional[Any] = ...,
|
||||||
|
|||||||
@@ -86,3 +86,23 @@ class EqlClient(NamespacedClient):
|
|||||||
return await self.transport.perform_request(
|
return await self.transport.perform_request(
|
||||||
"GET", _make_path("_eql", "search", id), params=params, headers=headers
|
"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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/eql-search-api.html>`_
|
||||||
|
|
||||||
|
: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,
|
||||||
|
)
|
||||||
|
|||||||
@@ -71,3 +71,18 @@ class EqlClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> 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: ...
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-features-api.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
)
|
||||||
@@ -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: ...
|
||||||
@@ -254,7 +254,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
:arg master_timeout: Specify timeout for connection to master
|
:arg master_timeout: Specify timeout for connection to master
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
:arg wait_for_active_shards: Sets the number of active shards to
|
: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:
|
if index in SKIP_IN_PATH:
|
||||||
raise ValueError("Empty value passed for a required argument 'index'.")
|
raise ValueError("Empty value passed for a required argument 'index'.")
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params
|
|||||||
|
|
||||||
|
|
||||||
class IngestClient(NamespacedClient):
|
class IngestClient(NamespacedClient):
|
||||||
@query_params("master_timeout")
|
@query_params("master_timeout", "summary")
|
||||||
async def get_pipeline(self, id=None, params=None, headers=None):
|
async def get_pipeline(self, id=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Returns a pipeline.
|
Returns a pipeline.
|
||||||
@@ -30,6 +30,8 @@ class IngestClient(NamespacedClient):
|
|||||||
supported
|
supported
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
to master node
|
to master node
|
||||||
|
:arg summary: Return pipelines without their definitions
|
||||||
|
(default: false)
|
||||||
"""
|
"""
|
||||||
return await self.transport.perform_request(
|
return await self.transport.perform_request(
|
||||||
"GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers
|
"GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class IngestClient(NamespacedClient):
|
|||||||
*,
|
*,
|
||||||
id: Optional[Any] = ...,
|
id: Optional[Any] = ...,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
|
summary: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-delete-pipeline.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-get-pipeline.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-put-pipeline.html>`_
|
||||||
|
|
||||||
|
: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,
|
||||||
|
)
|
||||||
@@ -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: ...
|
||||||
@@ -1676,3 +1676,89 @@ class MlClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-trained-models-aliases.html>`_
|
||||||
|
|
||||||
|
.. 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.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/preview-dfanalytics.html>`_
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-trained-models-aliases.html>`_
|
||||||
|
|
||||||
|
.. 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,
|
||||||
|
)
|
||||||
|
|||||||
@@ -1085,3 +1085,52 @@ class MlClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> 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: ...
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class NodesClient(NamespacedClient):
|
|||||||
"fields",
|
"fields",
|
||||||
"groups",
|
"groups",
|
||||||
"include_segment_file_sizes",
|
"include_segment_file_sizes",
|
||||||
|
"include_unloaded_segments",
|
||||||
"level",
|
"level",
|
||||||
"timeout",
|
"timeout",
|
||||||
"types",
|
"types",
|
||||||
@@ -106,6 +107,9 @@ class NodesClient(NamespacedClient):
|
|||||||
:arg include_segment_file_sizes: Whether to report the
|
:arg include_segment_file_sizes: Whether to report the
|
||||||
aggregated disk usage of each one of the Lucene index files (only
|
aggregated disk usage of each one of the Lucene index files (only
|
||||||
applies if segment stats are requested)
|
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
|
:arg level: Return indices stats aggregated at index, node or
|
||||||
shard level Valid choices: indices, node, shards Default: node
|
shard level Valid choices: indices, node, shards Default: node
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class NodesClient(NamespacedClient):
|
|||||||
fields: Optional[Any] = ...,
|
fields: Optional[Any] = ...,
|
||||||
groups: Optional[Any] = ...,
|
groups: Optional[Any] = ...,
|
||||||
include_segment_file_sizes: Optional[Any] = ...,
|
include_segment_file_sizes: Optional[Any] = ...,
|
||||||
|
include_unloaded_segments: Optional[Any] = ...,
|
||||||
level: Optional[Any] = ...,
|
level: Optional[Any] = ...,
|
||||||
timeout: Optional[Any] = ...,
|
timeout: Optional[Any] = ...,
|
||||||
types: Optional[Any] = ...,
|
types: Optional[Any] = ...,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
headers=headers,
|
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):
|
async def mount(self, repository, snapshot, body, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Mount a snapshot as a searchable index.
|
Mount a snapshot as a searchable index.
|
||||||
@@ -68,6 +68,8 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
as searchable
|
as searchable
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
to master node
|
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
|
:arg wait_for_completion: Should this request wait until the
|
||||||
operation has completed before returning
|
operation has completed before returning
|
||||||
"""
|
"""
|
||||||
@@ -107,7 +109,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("level")
|
||||||
async def stats(self, index=None, params=None, headers=None):
|
async def stats(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Retrieve various statistics about searchable snapshots.
|
Retrieve various statistics about searchable snapshots.
|
||||||
@@ -120,6 +122,8 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
or be removed in a future version
|
or be removed in a future version
|
||||||
|
|
||||||
:arg index: A comma-separated list of index names
|
: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(
|
return await self.transport.perform_request(
|
||||||
"GET",
|
"GET",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
*,
|
*,
|
||||||
body: Any,
|
body: Any,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
|
storage: Optional[Any] = ...,
|
||||||
wait_for_completion: Optional[Any] = ...,
|
wait_for_completion: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
@@ -76,6 +77,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
index: Optional[Any] = ...,
|
index: Optional[Any] = ...,
|
||||||
|
level: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class TextStructureClient(NamespacedClient):
|
|||||||
Finds the structure of a text file. The text file must contain data that is
|
Finds the structure of a text file. The text file must contain data that is
|
||||||
suitable to be ingested into Elasticsearch.
|
suitable to be ingested into Elasticsearch.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-find-file-structure.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/find-structure.html>`_
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
|
|||||||
@@ -31,11 +31,13 @@ from .data_frame import Data_FrameClient
|
|||||||
from .deprecation import DeprecationClient
|
from .deprecation import DeprecationClient
|
||||||
from .enrich import EnrichClient
|
from .enrich import EnrichClient
|
||||||
from .eql import EqlClient
|
from .eql import EqlClient
|
||||||
|
from .features import FeaturesClient
|
||||||
from .graph import GraphClient
|
from .graph import GraphClient
|
||||||
from .ilm import IlmClient
|
from .ilm import IlmClient
|
||||||
from .indices import IndicesClient
|
from .indices import IndicesClient
|
||||||
from .ingest import IngestClient
|
from .ingest import IngestClient
|
||||||
from .license import LicenseClient
|
from .license import LicenseClient
|
||||||
|
from .logstash import LogstashClient
|
||||||
from .migration import MigrationClient
|
from .migration import MigrationClient
|
||||||
from .ml import MlClient
|
from .ml import MlClient
|
||||||
from .monitoring import MonitoringClient
|
from .monitoring import MonitoringClient
|
||||||
@@ -221,9 +223,11 @@ class Elasticsearch(object):
|
|||||||
self.deprecation = DeprecationClient(self)
|
self.deprecation = DeprecationClient(self)
|
||||||
self.enrich = EnrichClient(self)
|
self.enrich = EnrichClient(self)
|
||||||
self.eql = EqlClient(self)
|
self.eql = EqlClient(self)
|
||||||
|
self.features = FeaturesClient(self)
|
||||||
self.graph = GraphClient(self)
|
self.graph = GraphClient(self)
|
||||||
self.ilm = IlmClient(self)
|
self.ilm = IlmClient(self)
|
||||||
self.license = LicenseClient(self)
|
self.license = LicenseClient(self)
|
||||||
|
self.logstash = LogstashClient(self)
|
||||||
self.migration = MigrationClient(self)
|
self.migration = MigrationClient(self)
|
||||||
self.ml = MlClient(self)
|
self.ml = MlClient(self)
|
||||||
self.monitoring = MonitoringClient(self)
|
self.monitoring = MonitoringClient(self)
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ from .cluster import ClusterClient
|
|||||||
from .dangling_indices import DanglingIndicesClient
|
from .dangling_indices import DanglingIndicesClient
|
||||||
from .enrich import EnrichClient
|
from .enrich import EnrichClient
|
||||||
from .eql import EqlClient
|
from .eql import EqlClient
|
||||||
|
from .features import FeaturesClient
|
||||||
from .graph import GraphClient
|
from .graph import GraphClient
|
||||||
from .ilm import IlmClient
|
from .ilm import IlmClient
|
||||||
from .indices import IndicesClient
|
from .indices import IndicesClient
|
||||||
from .ingest import IngestClient
|
from .ingest import IngestClient
|
||||||
from .license import LicenseClient
|
from .license import LicenseClient
|
||||||
|
from .logstash import LogstashClient
|
||||||
from .migration import MigrationClient
|
from .migration import MigrationClient
|
||||||
from .ml import MlClient
|
from .ml import MlClient
|
||||||
from .monitoring import MonitoringClient
|
from .monitoring import MonitoringClient
|
||||||
@@ -64,6 +66,7 @@ class Elasticsearch(object):
|
|||||||
autoscaling: AutoscalingClient
|
autoscaling: AutoscalingClient
|
||||||
cat: CatClient
|
cat: CatClient
|
||||||
cluster: ClusterClient
|
cluster: ClusterClient
|
||||||
|
features: FeaturesClient
|
||||||
indices: IndicesClient
|
indices: IndicesClient
|
||||||
ingest: IngestClient
|
ingest: IngestClient
|
||||||
nodes: NodesClient
|
nodes: NodesClient
|
||||||
@@ -79,6 +82,7 @@ class Elasticsearch(object):
|
|||||||
graph: GraphClient
|
graph: GraphClient
|
||||||
ilm: IlmClient
|
ilm: IlmClient
|
||||||
license: LicenseClient
|
license: LicenseClient
|
||||||
|
logstash: LogstashClient
|
||||||
migration: MigrationClient
|
migration: MigrationClient
|
||||||
ml: MlClient
|
ml: MlClient
|
||||||
monitoring: MonitoringClient
|
monitoring: MonitoringClient
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ class CatClient(NamespacedClient):
|
|||||||
"full_id",
|
"full_id",
|
||||||
"h",
|
"h",
|
||||||
"help",
|
"help",
|
||||||
|
"include_unloaded_segments",
|
||||||
"local",
|
"local",
|
||||||
"master_timeout",
|
"master_timeout",
|
||||||
"s",
|
"s",
|
||||||
@@ -238,6 +239,9 @@ class CatClient(NamespacedClient):
|
|||||||
version (default: false)
|
version (default: false)
|
||||||
:arg h: Comma-separated list of column names to display
|
:arg h: Comma-separated list of column names to display
|
||||||
:arg help: Return help information
|
: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
|
:arg local: Calculate the selected nodes using the local cluster
|
||||||
state rather than the state from master node (default: false)
|
state rather than the state from master node (default: false)
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ class CatClient(NamespacedClient):
|
|||||||
full_id: Optional[Any] = ...,
|
full_id: Optional[Any] = ...,
|
||||||
h: Optional[Any] = ...,
|
h: Optional[Any] = ...,
|
||||||
help: Optional[Any] = ...,
|
help: Optional[Any] = ...,
|
||||||
|
include_unloaded_segments: Optional[Any] = ...,
|
||||||
local: Optional[Any] = ...,
|
local: Optional[Any] = ...,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
s: Optional[Any] = ...,
|
s: Optional[Any] = ...,
|
||||||
|
|||||||
@@ -86,3 +86,23 @@ class EqlClient(NamespacedClient):
|
|||||||
return self.transport.perform_request(
|
return self.transport.perform_request(
|
||||||
"GET", _make_path("_eql", "search", id), params=params, headers=headers
|
"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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/eql-search-api.html>`_
|
||||||
|
|
||||||
|
: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,
|
||||||
|
)
|
||||||
|
|||||||
@@ -71,3 +71,18 @@ class EqlClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> 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: ...
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-features-api.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
)
|
||||||
@@ -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: ...
|
||||||
@@ -254,7 +254,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
:arg master_timeout: Specify timeout for connection to master
|
:arg master_timeout: Specify timeout for connection to master
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
:arg wait_for_active_shards: Sets the number of active shards to
|
: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:
|
if index in SKIP_IN_PATH:
|
||||||
raise ValueError("Empty value passed for a required argument 'index'.")
|
raise ValueError("Empty value passed for a required argument 'index'.")
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params
|
|||||||
|
|
||||||
|
|
||||||
class IngestClient(NamespacedClient):
|
class IngestClient(NamespacedClient):
|
||||||
@query_params("master_timeout")
|
@query_params("master_timeout", "summary")
|
||||||
def get_pipeline(self, id=None, params=None, headers=None):
|
def get_pipeline(self, id=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Returns a pipeline.
|
Returns a pipeline.
|
||||||
@@ -30,6 +30,8 @@ class IngestClient(NamespacedClient):
|
|||||||
supported
|
supported
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
to master node
|
to master node
|
||||||
|
:arg summary: Return pipelines without their definitions
|
||||||
|
(default: false)
|
||||||
"""
|
"""
|
||||||
return self.transport.perform_request(
|
return self.transport.perform_request(
|
||||||
"GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers
|
"GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class IngestClient(NamespacedClient):
|
|||||||
*,
|
*,
|
||||||
id: Optional[Any] = ...,
|
id: Optional[Any] = ...,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
|
summary: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-delete-pipeline.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-get-pipeline.html>`_
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/logstash-api-put-pipeline.html>`_
|
||||||
|
|
||||||
|
: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,
|
||||||
|
)
|
||||||
@@ -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: ...
|
||||||
@@ -1660,3 +1660,87 @@ class MlClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-trained-models-aliases.html>`_
|
||||||
|
|
||||||
|
.. 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.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/preview-dfanalytics.html>`_
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-trained-models-aliases.html>`_
|
||||||
|
|
||||||
|
.. 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,
|
||||||
|
)
|
||||||
|
|||||||
@@ -1085,3 +1085,52 @@ class MlClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> 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: ...
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class NodesClient(NamespacedClient):
|
|||||||
"fields",
|
"fields",
|
||||||
"groups",
|
"groups",
|
||||||
"include_segment_file_sizes",
|
"include_segment_file_sizes",
|
||||||
|
"include_unloaded_segments",
|
||||||
"level",
|
"level",
|
||||||
"timeout",
|
"timeout",
|
||||||
"types",
|
"types",
|
||||||
@@ -106,6 +107,9 @@ class NodesClient(NamespacedClient):
|
|||||||
:arg include_segment_file_sizes: Whether to report the
|
:arg include_segment_file_sizes: Whether to report the
|
||||||
aggregated disk usage of each one of the Lucene index files (only
|
aggregated disk usage of each one of the Lucene index files (only
|
||||||
applies if segment stats are requested)
|
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
|
:arg level: Return indices stats aggregated at index, node or
|
||||||
shard level Valid choices: indices, node, shards Default: node
|
shard level Valid choices: indices, node, shards Default: node
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class NodesClient(NamespacedClient):
|
|||||||
fields: Optional[Any] = ...,
|
fields: Optional[Any] = ...,
|
||||||
groups: Optional[Any] = ...,
|
groups: Optional[Any] = ...,
|
||||||
include_segment_file_sizes: Optional[Any] = ...,
|
include_segment_file_sizes: Optional[Any] = ...,
|
||||||
|
include_unloaded_segments: Optional[Any] = ...,
|
||||||
level: Optional[Any] = ...,
|
level: Optional[Any] = ...,
|
||||||
timeout: Optional[Any] = ...,
|
timeout: Optional[Any] = ...,
|
||||||
types: Optional[Any] = ...,
|
types: Optional[Any] = ...,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
headers=headers,
|
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):
|
def mount(self, repository, snapshot, body, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Mount a snapshot as a searchable index.
|
Mount a snapshot as a searchable index.
|
||||||
@@ -68,6 +68,8 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
as searchable
|
as searchable
|
||||||
:arg master_timeout: Explicit operation timeout for connection
|
:arg master_timeout: Explicit operation timeout for connection
|
||||||
to master node
|
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
|
:arg wait_for_completion: Should this request wait until the
|
||||||
operation has completed before returning
|
operation has completed before returning
|
||||||
"""
|
"""
|
||||||
@@ -107,7 +109,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("level")
|
||||||
def stats(self, index=None, params=None, headers=None):
|
def stats(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Retrieve various statistics about searchable snapshots.
|
Retrieve various statistics about searchable snapshots.
|
||||||
@@ -120,6 +122,8 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
or be removed in a future version
|
or be removed in a future version
|
||||||
|
|
||||||
:arg index: A comma-separated list of index names
|
: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(
|
return self.transport.perform_request(
|
||||||
"GET",
|
"GET",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
*,
|
*,
|
||||||
body: Any,
|
body: Any,
|
||||||
master_timeout: Optional[Any] = ...,
|
master_timeout: Optional[Any] = ...,
|
||||||
|
storage: Optional[Any] = ...,
|
||||||
wait_for_completion: Optional[Any] = ...,
|
wait_for_completion: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
@@ -76,6 +77,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
index: Optional[Any] = ...,
|
index: Optional[Any] = ...,
|
||||||
|
level: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class TextStructureClient(NamespacedClient):
|
|||||||
Finds the structure of a text file. The text file must contain data that is
|
Finds the structure of a text file. The text file must contain data that is
|
||||||
suitable to be ingested into Elasticsearch.
|
suitable to be ingested into Elasticsearch.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-find-file-structure.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/find-structure.html>`_
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user