[API] Update REST APIs to 7dfb1ed9790
This commit is contained in:
@@ -205,3 +205,23 @@ class AsyncSearchClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
async def status(self, id, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Retrieves the status of a previously submitted async search request given its
|
||||||
|
ID.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/async-search.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("_async_search", "status", id),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -109,3 +109,18 @@ class AsyncSearchClient(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 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: ...
|
||||||
|
|||||||
@@ -268,11 +268,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
: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
|
||||||
@@ -294,11 +289,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The comma separated names of the component templates
|
:arg name: The comma separated names of the component templates
|
||||||
:arg local: Return local information, do not retrieve the state
|
:arg local: Return local information, do not retrieve the state
|
||||||
from master node (default: false)
|
from master node (default: false)
|
||||||
@@ -319,11 +309,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg body: The template definition
|
:arg body: The template definition
|
||||||
:arg create: Whether the index template should only be added if
|
:arg create: Whether the index template should only be added if
|
||||||
@@ -350,11 +335,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg local: Return local information, do not retrieve the state
|
:arg local: Return local information, do not retrieve the state
|
||||||
from master node (default: false)
|
from master node (default: false)
|
||||||
|
|||||||
@@ -992,7 +992,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
)
|
)
|
||||||
async def upgrade(self, index=None, params=None, headers=None):
|
async def upgrade(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
The _upgrade API is no longer useful and will be removed.
|
DEPRECATED Upgrades to the current version of Lucene.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||||
|
|
||||||
@@ -1018,7 +1018,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
|
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
|
||||||
async def get_upgrade(self, index=None, params=None, headers=None):
|
async def get_upgrade(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
The _upgrade API is no longer useful and will be removed.
|
DEPRECATED Returns a progress status of current upgrade.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||||
|
|
||||||
@@ -1348,7 +1348,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
"PUT", _make_path("_data_stream", name), params=params, headers=headers
|
"PUT", _make_path("_data_stream", name), params=params, headers=headers
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("expand_wildcards")
|
||||||
async def delete_data_stream(self, name, params=None, headers=None):
|
async def delete_data_stream(self, name, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Deletes a data stream.
|
Deletes a data stream.
|
||||||
@@ -1357,6 +1357,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
:arg name: A comma-separated list of data streams to delete; use
|
:arg name: A comma-separated list of data streams to delete; use
|
||||||
`*` to delete all data streams
|
`*` to delete all data streams
|
||||||
|
:arg expand_wildcards: Whether wildcard expressions should get
|
||||||
|
expanded to open or closed indices (default: open) Valid choices: open,
|
||||||
|
closed, hidden, none, all Default: open
|
||||||
"""
|
"""
|
||||||
if name in SKIP_IN_PATH:
|
if name in SKIP_IN_PATH:
|
||||||
raise ValueError("Empty value passed for a required argument 'name'.")
|
raise ValueError("Empty value passed for a required argument 'name'.")
|
||||||
@@ -1372,11 +1375,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
: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
|
||||||
@@ -1398,11 +1396,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg flat_settings: Return settings in flat format (default:
|
:arg flat_settings: Return settings in flat format (default:
|
||||||
false)
|
false)
|
||||||
@@ -1425,11 +1418,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The comma separated names of the index templates
|
:arg name: The comma separated names of the index templates
|
||||||
:arg flat_settings: Return settings in flat format (default:
|
:arg flat_settings: Return settings in flat format (default:
|
||||||
false)
|
false)
|
||||||
@@ -1449,11 +1437,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg body: The template definition
|
:arg body: The template definition
|
||||||
:arg cause: User defined reason for creating/updating the index
|
:arg cause: User defined reason for creating/updating the index
|
||||||
@@ -1482,11 +1465,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the index (it must be a concrete index
|
:arg name: The name of the index (it must be a concrete index
|
||||||
name)
|
name)
|
||||||
:arg body: New index template definition, which will be included
|
:arg body: New index template definition, which will be included
|
||||||
@@ -1509,7 +1487,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("expand_wildcards")
|
||||||
async def get_data_stream(self, name=None, params=None, headers=None):
|
async def get_data_stream(self, name=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Returns data streams.
|
Returns data streams.
|
||||||
@@ -1518,6 +1496,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
:arg name: A comma-separated list of data streams to get; use
|
:arg name: A comma-separated list of data streams to get; use
|
||||||
`*` to get all data streams
|
`*` to get all data streams
|
||||||
|
:arg expand_wildcards: Whether wildcard expressions should get
|
||||||
|
expanded to open or closed indices (default: open) Valid choices: open,
|
||||||
|
closed, hidden, none, all Default: open
|
||||||
"""
|
"""
|
||||||
return await self.transport.perform_request(
|
return await self.transport.perform_request(
|
||||||
"GET", _make_path("_data_stream", name), params=params, headers=headers
|
"GET", _make_path("_data_stream", name), params=params, headers=headers
|
||||||
@@ -1530,11 +1511,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg body: New index template definition to be simulated, if no
|
:arg body: New index template definition to be simulated, if no
|
||||||
index template name is specified
|
index template name is specified
|
||||||
:arg name: The name of the index template
|
:arg name: The name of the index template
|
||||||
@@ -1629,3 +1605,23 @@ class IndicesClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
async def promote_data_stream(self, name, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Promotes a data stream from a replicated data stream managed by CCR to a
|
||||||
|
regular data stream
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/data-streams.html>`_
|
||||||
|
|
||||||
|
:arg name: The name of the data stream
|
||||||
|
"""
|
||||||
|
if name in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument 'name'.")
|
||||||
|
|
||||||
|
return await self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path("_data_stream", "_promote", name),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -874,6 +874,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
name: Any,
|
name: Any,
|
||||||
*,
|
*,
|
||||||
|
expand_wildcards: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
@@ -980,6 +981,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: Optional[Any] = ...,
|
name: Optional[Any] = ...,
|
||||||
|
expand_wildcards: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
@@ -1062,3 +1064,18 @@ class IndicesClient(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 promote_data_stream(
|
||||||
|
self,
|
||||||
|
name: 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: ...
|
||||||
|
|||||||
@@ -1715,3 +1715,37 @@ class MlClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params("timeout", "wait_for_completion")
|
||||||
|
async def upgrade_job_snapshot(
|
||||||
|
self, job_id, snapshot_id, params=None, headers=None
|
||||||
|
):
|
||||||
|
"""
|
||||||
|
Upgrades a given job snapshot to the current major version.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-upgrade-job-model-snapshot.html>`_
|
||||||
|
|
||||||
|
:arg job_id: The ID of the job
|
||||||
|
:arg snapshot_id: The ID of the snapshot
|
||||||
|
:arg timeout: How long should the API wait for the job to be
|
||||||
|
opened and the old snapshot to be loaded.
|
||||||
|
:arg wait_for_completion: Should the request wait until the task
|
||||||
|
is complete before responding to the caller. Default is false.
|
||||||
|
"""
|
||||||
|
for param in (job_id, snapshot_id):
|
||||||
|
if param in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument.")
|
||||||
|
|
||||||
|
return await self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path(
|
||||||
|
"_ml",
|
||||||
|
"anomaly_detectors",
|
||||||
|
job_id,
|
||||||
|
"model_snapshots",
|
||||||
|
snapshot_id,
|
||||||
|
"_upgrade",
|
||||||
|
),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -1094,3 +1094,21 @@ 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 upgrade_job_snapshot(
|
||||||
|
self,
|
||||||
|
job_id: Any,
|
||||||
|
snapshot_id: Any,
|
||||||
|
*,
|
||||||
|
timeout: Optional[Any] = ...,
|
||||||
|
wait_for_completion: 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: ...
|
||||||
|
|||||||
@@ -216,3 +216,25 @@ class RollupClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
async def rollup(self, index, body, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Rollup an index
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-api.html>`_
|
||||||
|
|
||||||
|
:arg index: The index to roll up
|
||||||
|
:arg body: The rollup configuration
|
||||||
|
"""
|
||||||
|
for param in (index, body):
|
||||||
|
if param in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument.")
|
||||||
|
|
||||||
|
return await self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path(index, "_rollup"),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
body=body,
|
||||||
|
)
|
||||||
|
|||||||
@@ -146,3 +146,19 @@ class RollupClient(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 rollup(
|
||||||
|
self,
|
||||||
|
index: 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: ...
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg actions: A comma-separated list of actions that should be
|
:arg actions: A comma-separated list of actions that should be
|
||||||
returned. Leave empty to return all.
|
returned. Leave empty to return all.
|
||||||
:arg detailed: Return detailed task information (default: false)
|
:arg detailed: Return detailed task information (default: false)
|
||||||
@@ -60,6 +65,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg task_id: Cancel the task with specified task id
|
:arg task_id: Cancel the task with specified task id
|
||||||
(node_id:task_number)
|
(node_id:task_number)
|
||||||
:arg actions: A comma-separated list of actions that should be
|
:arg actions: A comma-separated list of actions that should be
|
||||||
@@ -87,6 +97,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg task_id: Return the task with specified id
|
:arg task_id: Return the task with specified id
|
||||||
(node_id:task_number)
|
(node_id:task_number)
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
|
|||||||
@@ -201,3 +201,20 @@ class WatcherClient(NamespacedClient):
|
|||||||
return await self.transport.perform_request(
|
return await self.transport.perform_request(
|
||||||
"POST", "/_watcher/_stop", params=params, headers=headers
|
"POST", "/_watcher/_stop", params=params, headers=headers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
async def query_watches(self, body=None, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Retrieves stored watches.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-query-watches.html>`_
|
||||||
|
|
||||||
|
:arg body: From, size, query, sort and search_after
|
||||||
|
"""
|
||||||
|
return await self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
"/_watcher/_query/watches",
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
body=body,
|
||||||
|
)
|
||||||
|
|||||||
@@ -176,3 +176,18 @@ class WatcherClient(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 query_watches(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
body: 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: ...
|
||||||
|
|||||||
@@ -205,3 +205,23 @@ class AsyncSearchClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
def status(self, id, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Retrieves the status of a previously submitted async search request given its
|
||||||
|
ID.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/async-search.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("_async_search", "status", id),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -109,3 +109,18 @@ class AsyncSearchClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> Any: ...
|
||||||
|
def 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: ...
|
||||||
|
|||||||
@@ -268,11 +268,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
: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
|
||||||
@@ -294,11 +289,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The comma separated names of the component templates
|
:arg name: The comma separated names of the component templates
|
||||||
:arg local: Return local information, do not retrieve the state
|
:arg local: Return local information, do not retrieve the state
|
||||||
from master node (default: false)
|
from master node (default: false)
|
||||||
@@ -319,11 +309,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg body: The template definition
|
:arg body: The template definition
|
||||||
:arg create: Whether the index template should only be added if
|
:arg create: Whether the index template should only be added if
|
||||||
@@ -350,11 +335,6 @@ class ClusterClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-component-template.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg local: Return local information, do not retrieve the state
|
:arg local: Return local information, do not retrieve the state
|
||||||
from master node (default: false)
|
from master node (default: false)
|
||||||
|
|||||||
@@ -990,7 +990,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
)
|
)
|
||||||
def upgrade(self, index=None, params=None, headers=None):
|
def upgrade(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
The _upgrade API is no longer useful and will be removed.
|
DEPRECATED Upgrades to the current version of Lucene.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||||
|
|
||||||
@@ -1016,7 +1016,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
|
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
|
||||||
def get_upgrade(self, index=None, params=None, headers=None):
|
def get_upgrade(self, index=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
The _upgrade API is no longer useful and will be removed.
|
DEPRECATED Returns a progress status of current upgrade.
|
||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||||
|
|
||||||
@@ -1344,7 +1344,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
"PUT", _make_path("_data_stream", name), params=params, headers=headers
|
"PUT", _make_path("_data_stream", name), params=params, headers=headers
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("expand_wildcards")
|
||||||
def delete_data_stream(self, name, params=None, headers=None):
|
def delete_data_stream(self, name, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Deletes a data stream.
|
Deletes a data stream.
|
||||||
@@ -1353,6 +1353,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
:arg name: A comma-separated list of data streams to delete; use
|
:arg name: A comma-separated list of data streams to delete; use
|
||||||
`*` to delete all data streams
|
`*` to delete all data streams
|
||||||
|
:arg expand_wildcards: Whether wildcard expressions should get
|
||||||
|
expanded to open or closed indices (default: open) Valid choices: open,
|
||||||
|
closed, hidden, none, all Default: open
|
||||||
"""
|
"""
|
||||||
if name in SKIP_IN_PATH:
|
if name in SKIP_IN_PATH:
|
||||||
raise ValueError("Empty value passed for a required argument 'name'.")
|
raise ValueError("Empty value passed for a required argument 'name'.")
|
||||||
@@ -1368,11 +1371,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
: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
|
||||||
@@ -1394,11 +1392,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg flat_settings: Return settings in flat format (default:
|
:arg flat_settings: Return settings in flat format (default:
|
||||||
false)
|
false)
|
||||||
@@ -1421,11 +1414,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The comma separated names of the index templates
|
:arg name: The comma separated names of the index templates
|
||||||
:arg flat_settings: Return settings in flat format (default:
|
:arg flat_settings: Return settings in flat format (default:
|
||||||
false)
|
false)
|
||||||
@@ -1445,11 +1433,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the template
|
:arg name: The name of the template
|
||||||
:arg body: The template definition
|
:arg body: The template definition
|
||||||
:arg cause: User defined reason for creating/updating the index
|
:arg cause: User defined reason for creating/updating the index
|
||||||
@@ -1478,11 +1461,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg name: The name of the index (it must be a concrete index
|
:arg name: The name of the index (it must be a concrete index
|
||||||
name)
|
name)
|
||||||
:arg body: New index template definition, which will be included
|
:arg body: New index template definition, which will be included
|
||||||
@@ -1505,7 +1483,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
@query_params()
|
@query_params("expand_wildcards")
|
||||||
def get_data_stream(self, name=None, params=None, headers=None):
|
def get_data_stream(self, name=None, params=None, headers=None):
|
||||||
"""
|
"""
|
||||||
Returns data streams.
|
Returns data streams.
|
||||||
@@ -1514,6 +1492,9 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
:arg name: A comma-separated list of data streams to get; use
|
:arg name: A comma-separated list of data streams to get; use
|
||||||
`*` to get all data streams
|
`*` to get all data streams
|
||||||
|
:arg expand_wildcards: Whether wildcard expressions should get
|
||||||
|
expanded to open or closed indices (default: open) Valid choices: open,
|
||||||
|
closed, hidden, none, all Default: open
|
||||||
"""
|
"""
|
||||||
return self.transport.perform_request(
|
return self.transport.perform_request(
|
||||||
"GET", _make_path("_data_stream", name), params=params, headers=headers
|
"GET", _make_path("_data_stream", name), params=params, headers=headers
|
||||||
@@ -1526,11 +1507,6 @@ class IndicesClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
This API is **experimental** so may include breaking changes
|
|
||||||
or be removed in a future version
|
|
||||||
|
|
||||||
:arg body: New index template definition to be simulated, if no
|
:arg body: New index template definition to be simulated, if no
|
||||||
index template name is specified
|
index template name is specified
|
||||||
:arg name: The name of the index template
|
:arg name: The name of the index template
|
||||||
@@ -1625,3 +1601,23 @@ class IndicesClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
def promote_data_stream(self, name, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Promotes a data stream from a replicated data stream managed by CCR to a
|
||||||
|
regular data stream
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/data-streams.html>`_
|
||||||
|
|
||||||
|
:arg name: The name of the data stream
|
||||||
|
"""
|
||||||
|
if name in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument 'name'.")
|
||||||
|
|
||||||
|
return self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path("_data_stream", "_promote", name),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -874,6 +874,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
name: Any,
|
name: Any,
|
||||||
*,
|
*,
|
||||||
|
expand_wildcards: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
@@ -980,6 +981,7 @@ class IndicesClient(NamespacedClient):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: Optional[Any] = ...,
|
name: Optional[Any] = ...,
|
||||||
|
expand_wildcards: Optional[Any] = ...,
|
||||||
pretty: Optional[bool] = ...,
|
pretty: Optional[bool] = ...,
|
||||||
human: Optional[bool] = ...,
|
human: Optional[bool] = ...,
|
||||||
error_trace: Optional[bool] = ...,
|
error_trace: Optional[bool] = ...,
|
||||||
@@ -1062,3 +1064,18 @@ class IndicesClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> Any: ...
|
||||||
|
def promote_data_stream(
|
||||||
|
self,
|
||||||
|
name: 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: ...
|
||||||
|
|||||||
@@ -1701,3 +1701,35 @@ class MlClient(NamespacedClient):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params("timeout", "wait_for_completion")
|
||||||
|
def upgrade_job_snapshot(self, job_id, snapshot_id, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Upgrades a given job snapshot to the current major version.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-upgrade-job-model-snapshot.html>`_
|
||||||
|
|
||||||
|
:arg job_id: The ID of the job
|
||||||
|
:arg snapshot_id: The ID of the snapshot
|
||||||
|
:arg timeout: How long should the API wait for the job to be
|
||||||
|
opened and the old snapshot to be loaded.
|
||||||
|
:arg wait_for_completion: Should the request wait until the task
|
||||||
|
is complete before responding to the caller. Default is false.
|
||||||
|
"""
|
||||||
|
for param in (job_id, snapshot_id):
|
||||||
|
if param in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument.")
|
||||||
|
|
||||||
|
return self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path(
|
||||||
|
"_ml",
|
||||||
|
"anomaly_detectors",
|
||||||
|
job_id,
|
||||||
|
"model_snapshots",
|
||||||
|
snapshot_id,
|
||||||
|
"_upgrade",
|
||||||
|
),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
)
|
||||||
|
|||||||
@@ -1094,3 +1094,21 @@ 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 upgrade_job_snapshot(
|
||||||
|
self,
|
||||||
|
job_id: Any,
|
||||||
|
snapshot_id: Any,
|
||||||
|
*,
|
||||||
|
timeout: Optional[Any] = ...,
|
||||||
|
wait_for_completion: 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: ...
|
||||||
|
|||||||
@@ -214,3 +214,25 @@ class RollupClient(NamespacedClient):
|
|||||||
params=params,
|
params=params,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
def rollup(self, index, body, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Rollup an index
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-api.html>`_
|
||||||
|
|
||||||
|
:arg index: The index to roll up
|
||||||
|
:arg body: The rollup configuration
|
||||||
|
"""
|
||||||
|
for param in (index, body):
|
||||||
|
if param in SKIP_IN_PATH:
|
||||||
|
raise ValueError("Empty value passed for a required argument.")
|
||||||
|
|
||||||
|
return self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
_make_path(index, "_rollup"),
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
body=body,
|
||||||
|
)
|
||||||
|
|||||||
@@ -146,3 +146,19 @@ class RollupClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> Any: ...
|
||||||
|
def rollup(
|
||||||
|
self,
|
||||||
|
index: 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: ...
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg actions: A comma-separated list of actions that should be
|
:arg actions: A comma-separated list of actions that should be
|
||||||
returned. Leave empty to return all.
|
returned. Leave empty to return all.
|
||||||
:arg detailed: Return detailed task information (default: false)
|
:arg detailed: Return detailed task information (default: false)
|
||||||
@@ -60,6 +65,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg task_id: Cancel the task with specified task id
|
:arg task_id: Cancel the task with specified task id
|
||||||
(node_id:task_number)
|
(node_id:task_number)
|
||||||
:arg actions: A comma-separated list of actions that should be
|
:arg actions: A comma-separated list of actions that should be
|
||||||
@@ -87,6 +97,11 @@ class TasksClient(NamespacedClient):
|
|||||||
|
|
||||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This API is **experimental** so may include breaking changes
|
||||||
|
or be removed in a future version
|
||||||
|
|
||||||
:arg task_id: Return the task with specified id
|
:arg task_id: Return the task with specified id
|
||||||
(node_id:task_number)
|
(node_id:task_number)
|
||||||
:arg timeout: Explicit operation timeout
|
:arg timeout: Explicit operation timeout
|
||||||
|
|||||||
@@ -201,3 +201,20 @@ class WatcherClient(NamespacedClient):
|
|||||||
return self.transport.perform_request(
|
return self.transport.perform_request(
|
||||||
"POST", "/_watcher/_stop", params=params, headers=headers
|
"POST", "/_watcher/_stop", params=params, headers=headers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@query_params()
|
||||||
|
def query_watches(self, body=None, params=None, headers=None):
|
||||||
|
"""
|
||||||
|
Retrieves stored watches.
|
||||||
|
|
||||||
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-query-watches.html>`_
|
||||||
|
|
||||||
|
:arg body: From, size, query, sort and search_after
|
||||||
|
"""
|
||||||
|
return self.transport.perform_request(
|
||||||
|
"POST",
|
||||||
|
"/_watcher/_query/watches",
|
||||||
|
params=params,
|
||||||
|
headers=headers,
|
||||||
|
body=body,
|
||||||
|
)
|
||||||
|
|||||||
@@ -176,3 +176,18 @@ class WatcherClient(NamespacedClient):
|
|||||||
params: Optional[MutableMapping[str, Any]] = ...,
|
params: Optional[MutableMapping[str, Any]] = ...,
|
||||||
headers: Optional[MutableMapping[str, str]] = ...
|
headers: Optional[MutableMapping[str, str]] = ...
|
||||||
) -> Any: ...
|
) -> Any: ...
|
||||||
|
def query_watches(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
body: 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: ...
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ SKIP_TESTS = {
|
|||||||
"indices/get_alias/10_basic[23]",
|
"indices/get_alias/10_basic[23]",
|
||||||
"indices/simulate_index_template/10_basic[2]",
|
"indices/simulate_index_template/10_basic[2]",
|
||||||
"search/aggregation/250_moving_fn[1]",
|
"search/aggregation/250_moving_fn[1]",
|
||||||
|
"search/aggregation/250_moving_fn[2]",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user