Release 7.7.0a2

This commit is contained in:
Seth Michael Larson
2020-04-03 12:52:11 -05:00
committed by GitHub
parent 5368161fff
commit 44571e0ae9
29 changed files with 270 additions and 63 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
Changelog
=========
7.7.0a1 (2020-04-01)
7.7.0a2 (2020-04-03)
--------------------
* Added support for ES 7.7 APIs (See `#1812`_)
* Added ``ElasticsearchDeprecationWarning`` which is raised when a ``Warning``
+1 -1
View File
@@ -3,7 +3,7 @@ from __future__ import absolute_import
VERSION = (7, 7, 0)
__version__ = VERSION
__versionstr__ = "7.7.0a1"
__versionstr__ = "7.7.0a2"
import logging
import warnings
+4 -6
View File
@@ -280,7 +280,6 @@ class Elasticsearch(object):
"""
Returns whether the cluster is running.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
"""
try:
return self.transport.perform_request(
@@ -294,7 +293,6 @@ class Elasticsearch(object):
"""
Returns basic information about the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
"""
return self.transport.perform_request(
"GET", "/", params=params, headers=headers
@@ -685,7 +683,7 @@ class Elasticsearch(object):
:arg scroll: Specify how long a consistent view of the index
should be maintained for scrolled search
:arg scroll_size: Size on the scroll request powering the delete
by query
by query Default: 100
:arg search_timeout: Explicit timeout for each search request.
Defaults to no timeout.
:arg search_type: Search operation type Valid choices:
@@ -1949,7 +1947,7 @@ class Elasticsearch(object):
:arg scroll: Specify how long a consistent view of the index
should be maintained for scrolled search
:arg scroll_size: Size on the scroll request powering the update
by query
by query Default: 100
:arg search_timeout: Explicit timeout for each search request.
Defaults to no timeout.
:arg search_type: Search operation type Valid choices:
@@ -2019,7 +2017,7 @@ class Elasticsearch(object):
def get_script_context(self, params=None, headers=None):
"""
Returns all script contexts.
`<https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html>`_
"""
return self.transport.perform_request(
"GET", "/_script_context", params=params, headers=headers
@@ -2029,7 +2027,7 @@ class Elasticsearch(object):
def get_script_languages(self, params=None, headers=None):
"""
Returns available script types, languages and contexts
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
"""
return self.transport.perform_request(
"GET", "/_script_language", params=params, headers=headers
+6 -1
View File
@@ -5,6 +5,8 @@ class AsyncSearchClient(NamespacedClient):
@query_params()
def delete(self, id, params=None, headers=None):
"""
Deletes an async search by ID. If the search is still running, the search
request will be cancelled. Otherwise, the saved search results are deleted.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html>`_
:arg id: The async search ID
@@ -19,6 +21,8 @@ class AsyncSearchClient(NamespacedClient):
@query_params("keep_alive", "typed_keys", "wait_for_completion_timeout")
def get(self, id, params=None, headers=None):
"""
Retrieves the results of a previously submitted async search request given its
ID.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html>`_
:arg id: The async search ID
@@ -81,6 +85,7 @@ class AsyncSearchClient(NamespacedClient):
)
def submit(self, body=None, index=None, params=None, headers=None):
"""
Executes a search request asynchronously.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html>`_
:arg body: The search definition using the Query DSL
@@ -113,7 +118,7 @@ class AsyncSearchClient(NamespacedClient):
as the docvalue representation of a field for each hit
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, none, all Default: open
closed, hidden, none, all Default: open
:arg explain: Specify whether to return detailed information
about score computation as part of a hit
:arg from_: Starting offset (default: 0)
+2 -1
View File
@@ -5,8 +5,9 @@ class AutoscalingClient(NamespacedClient):
@query_params()
def get_autoscaling_decision(self, params=None, headers=None):
"""
Gets the current autoscaling decision based on the configured autoscaling
policy, indicating whether or not autoscaling is needed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-decision.html>`_
"""
return self.transport.perform_request(
"GET", "/_autoscaling/decision", params=params, headers=headers
+13 -14
View File
@@ -12,7 +12,7 @@ class CatClient(NamespacedClient):
:arg name: A comma-separated list of alias names to return
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, hidden, none, all Default: ['all']
closed, hidden, none, all Default: all
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
@@ -91,8 +91,7 @@ class CatClient(NamespacedClient):
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg ts: Set to false to disable timestamping Default: True
:arg v: Verbose mode. Display column headers
"""
@@ -554,6 +553,7 @@ class CatClient(NamespacedClient):
@query_params("allow_no_match", "bytes", "format", "h", "help", "s", "time", "v")
def ml_data_frame_analytics(self, id=None, params=None, headers=None):
"""
Gets configuration and usage information about data frame analytics jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to fetch
@@ -569,8 +569,7 @@ class CatClient(NamespacedClient):
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return self.transport.perform_request(
@@ -583,6 +582,7 @@ class CatClient(NamespacedClient):
@query_params("allow_no_datafeeds", "format", "h", "help", "s", "time", "v")
def ml_datafeeds(self, datafeed_id=None, params=None, headers=None):
"""
Gets configuration and usage information about datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
@@ -596,8 +596,7 @@ class CatClient(NamespacedClient):
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return self.transport.perform_request(
@@ -610,6 +609,7 @@ class CatClient(NamespacedClient):
@query_params("allow_no_jobs", "bytes", "format", "h", "help", "s", "time", "v")
def ml_jobs(self, job_id=None, params=None, headers=None):
"""
Gets configuration and usage information about anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html>`_
:arg job_id: The ID of the jobs stats to fetch
@@ -625,8 +625,7 @@ class CatClient(NamespacedClient):
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return self.transport.perform_request(
@@ -650,6 +649,7 @@ class CatClient(NamespacedClient):
)
def ml_trained_models(self, model_id=None, params=None, headers=None):
"""
Gets configuration and usage information about inference trained models.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html>`_
:arg model_id: The ID of the trained models stats to fetch
@@ -668,8 +668,7 @@ class CatClient(NamespacedClient):
:arg size: specifies a max number of trained models to get
Default: 100
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
# from is a reserved word so it cannot be used, use from_ instead
@@ -686,8 +685,9 @@ class CatClient(NamespacedClient):
@query_params(
"allow_no_match", "format", "from_", "h", "help", "s", "size", "time", "v"
)
def transform(self, transform_id=None, params=None, headers=None):
def transforms(self, transform_id=None, params=None, headers=None):
"""
Gets configuration and usage information about transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html>`_
:arg transform_id: The id of the transform for which to get
@@ -705,8 +705,7 @@ class CatClient(NamespacedClient):
:arg size: specifies a max number of transforms to get, defaults
to 100
:arg time: The unit in which to display time values Valid
choices: d (Days), h (Hours), m (Minutes), s (Seconds), ms
(Milliseconds), micros (Microseconds), nanos (Nanoseconds)
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
# from is a reserved word so it cannot be used, use from_ instead
+20 -1
View File
@@ -5,6 +5,7 @@ class CcrClient(NamespacedClient):
@query_params()
def delete_auto_follow_pattern(self, name, params=None, headers=None):
"""
Deletes auto-follow patterns.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
@@ -22,6 +23,7 @@ class CcrClient(NamespacedClient):
@query_params("wait_for_active_shards")
def follow(self, index, body, params=None, headers=None):
"""
Creates a new follower index configured to follow the referenced leader index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_
:arg index: The name of the follower index
@@ -48,6 +50,8 @@ class CcrClient(NamespacedClient):
@query_params()
def follow_info(self, index, params=None, headers=None):
"""
Retrieves information about all follower indices, including parameters and
status for each follower index
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_
:arg index: A comma-separated list of index patterns; use `_all`
@@ -63,6 +67,8 @@ class CcrClient(NamespacedClient):
@query_params()
def follow_stats(self, index, params=None, headers=None):
"""
Retrieves follower stats. return shard-level stats about the following tasks
associated with each shard for the specified indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_
:arg index: A comma-separated list of index patterns; use `_all`
@@ -78,6 +84,7 @@ class CcrClient(NamespacedClient):
@query_params()
def forget_follower(self, index, body, params=None, headers=None):
"""
Removes the follower retention leases from the leader.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html>`_
:arg index: the name of the leader index for which specified
@@ -102,6 +109,8 @@ class CcrClient(NamespacedClient):
@query_params()
def get_auto_follow_pattern(self, name=None, params=None, headers=None):
"""
Gets configured auto-follow patterns. Returns the specified auto-follow pattern
collection.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
@@ -116,6 +125,8 @@ class CcrClient(NamespacedClient):
@query_params()
def pause_follow(self, index, params=None, headers=None):
"""
Pauses a follower index. The follower index will not fetch any additional
operations from the leader index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html>`_
:arg index: The name of the follower index that should pause
@@ -134,6 +145,9 @@ class CcrClient(NamespacedClient):
@query_params()
def put_auto_follow_pattern(self, name, body, params=None, headers=None):
"""
Creates a new named collection of auto-follow patterns against a specified
remote cluster. Newly created indices on the remote cluster matching any of the
specified patterns will be automatically configured as follower indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
@@ -154,6 +168,7 @@ class CcrClient(NamespacedClient):
@query_params()
def resume_follow(self, index, body=None, params=None, headers=None):
"""
Resumes a follower index that has been paused
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_
:arg index: The name of the follow index to resume following.
@@ -174,8 +189,8 @@ class CcrClient(NamespacedClient):
@query_params()
def stats(self, params=None, headers=None):
"""
Gets all stats related to cross-cluster replication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html>`_
"""
return self.transport.perform_request(
"GET", "/_ccr/stats", params=params, headers=headers
@@ -184,6 +199,8 @@ class CcrClient(NamespacedClient):
@query_params()
def unfollow(self, index, params=None, headers=None):
"""
Stops the following task associated with a follower index and removes index
metadata and settings associated with cross-cluster replication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html>`_
:arg index: The name of the follower index that should be turned
@@ -202,6 +219,7 @@ class CcrClient(NamespacedClient):
@query_params()
def pause_auto_follow_pattern(self, name, params=None, headers=None):
"""
Pauses an auto-follow pattern
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern that should pause
@@ -220,6 +238,7 @@ class CcrClient(NamespacedClient):
@query_params()
def resume_auto_follow_pattern(self, name, params=None, headers=None):
"""
Resumes an auto-follow pattern that has been paused
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern to resume
-1
View File
@@ -209,7 +209,6 @@ class ClusterClient(NamespacedClient):
"""
Returns the information about configured remote clusters.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html>`_
"""
return self.transport.perform_request(
"GET", "/_remote/info", params=params, headers=headers
+6 -1
View File
@@ -5,6 +5,7 @@ class EnrichClient(NamespacedClient):
@query_params()
def delete_policy(self, name, params=None, headers=None):
"""
Deletes an existing enrich policy and its enrich index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html>`_
:arg name: The name of the enrich policy
@@ -22,6 +23,7 @@ class EnrichClient(NamespacedClient):
@query_params("wait_for_completion")
def execute_policy(self, name, params=None, headers=None):
"""
Creates the enrich index for an existing enrich policy.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html>`_
:arg name: The name of the enrich policy
@@ -41,6 +43,7 @@ class EnrichClient(NamespacedClient):
@query_params()
def get_policy(self, name=None, params=None, headers=None):
"""
Gets information about an enrich policy.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html>`_
:arg name: A comma-separated list of enrich policy names
@@ -52,6 +55,7 @@ class EnrichClient(NamespacedClient):
@query_params()
def put_policy(self, name, body, params=None, headers=None):
"""
Creates a new enrich policy.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html>`_
:arg name: The name of the enrich policy
@@ -72,8 +76,9 @@ class EnrichClient(NamespacedClient):
@query_params()
def stats(self, params=None, headers=None):
"""
Gets enrich coordinator statistics and information about enrich policies that
are currently executing.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html>`_
"""
return self.transport.perform_request(
"GET", "/_enrich/_stats", params=params, headers=headers
+1
View File
@@ -5,6 +5,7 @@ class EqlClient(NamespacedClient):
@query_params()
def search(self, index, body, params=None, headers=None):
"""
Returns results matching a query expressed in Event Query Language (EQL)
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/eql.html>`_
:arg index: The name of the index to scope the operation
+2
View File
@@ -5,6 +5,8 @@ class GraphClient(NamespacedClient):
@query_params("routing", "timeout")
def explore(self, index, body=None, doc_type=None, params=None, headers=None):
"""
Explore extracted and summarized information about the documents and terms in
an index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html>`_
:arg index: A comma-separated list of index names to search; use
+14 -3
View File
@@ -5,6 +5,8 @@ class IlmClient(NamespacedClient):
@query_params()
def delete_lifecycle(self, policy, params=None, headers=None):
"""
Deletes the specified lifecycle policy definition. A currently used policy
cannot be deleted.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html>`_
:arg policy: The name of the index lifecycle policy
@@ -22,6 +24,8 @@ class IlmClient(NamespacedClient):
@query_params("only_errors", "only_managed")
def explain_lifecycle(self, index, params=None, headers=None):
"""
Retrieves information about the index's current lifecycle state, such as the
currently executing phase, action, and step.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html>`_
:arg index: The name of the index to explain
@@ -40,6 +44,8 @@ class IlmClient(NamespacedClient):
@query_params()
def get_lifecycle(self, policy=None, params=None, headers=None):
"""
Returns the specified policy definition. Includes the policy version and last
modified date.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html>`_
:arg policy: The name of the index lifecycle policy
@@ -51,8 +57,8 @@ class IlmClient(NamespacedClient):
@query_params()
def get_status(self, params=None, headers=None):
"""
Retrieves the current index lifecycle management (ILM) status.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html>`_
"""
return self.transport.perform_request(
"GET", "/_ilm/status", params=params, headers=headers
@@ -61,6 +67,7 @@ class IlmClient(NamespacedClient):
@query_params()
def move_to_step(self, index, body=None, params=None, headers=None):
"""
Manually moves an index into the specified step and executes that step.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html>`_
:arg index: The name of the index whose lifecycle step is to
@@ -81,6 +88,7 @@ class IlmClient(NamespacedClient):
@query_params()
def put_lifecycle(self, policy, body=None, params=None, headers=None):
"""
Creates a lifecycle policy
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html>`_
:arg policy: The name of the index lifecycle policy
@@ -100,6 +108,7 @@ class IlmClient(NamespacedClient):
@query_params()
def remove_policy(self, index, params=None, headers=None):
"""
Removes the assigned lifecycle policy and stops managing the specified index
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html>`_
:arg index: The name of the index to remove policy on
@@ -114,6 +123,7 @@ class IlmClient(NamespacedClient):
@query_params()
def retry(self, index, params=None, headers=None):
"""
Retries executing the policy for an index that is in the ERROR step.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html>`_
:arg index: The name of the indices (comma-separated) whose
@@ -129,8 +139,8 @@ class IlmClient(NamespacedClient):
@query_params()
def start(self, params=None, headers=None):
"""
Start the index lifecycle management (ILM) plugin.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html>`_
"""
return self.transport.perform_request(
"POST", "/_ilm/start", params=params, headers=headers
@@ -139,8 +149,9 @@ class IlmClient(NamespacedClient):
@query_params()
def stop(self, params=None, headers=None):
"""
Halts all lifecycle management operations and stops the index lifecycle
management (ILM) plugin
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html>`_
"""
return self.transport.perform_request(
"POST", "/_ilm/stop", params=params, headers=headers
+12 -7
View File
@@ -528,7 +528,7 @@ class IndicesClient(NamespacedClient):
string or when no indices have been specified)
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, hidden, none, all Default: ['all']
closed, hidden, none, all Default: all
:arg ignore_unavailable: Whether specified concrete indices
should be ignored when unavailable (missing or closed)
:arg local: Return local information, do not retrieve the state
@@ -685,7 +685,7 @@ class IndicesClient(NamespacedClient):
string or when no indices have been specified)
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, hidden, none, all Default: ['open', 'closed']
closed, hidden, none, all Default: all
:arg flat_settings: Return settings in flat format (default:
false)
:arg ignore_unavailable: Whether specified concrete indices
@@ -1180,7 +1180,9 @@ class IndicesClient(NamespacedClient):
)
def freeze(self, index, params=None, headers=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html>`_
Freezes an index. A frozen index has almost no overhead on the cluster (except
for maintaining its metadata in memory) and is read-only.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/freeze-index-api.html>`_
:arg index: The name of the index to freeze
:arg allow_no_indices: Whether to ignore if a wildcard indices
@@ -1188,7 +1190,7 @@ class IndicesClient(NamespacedClient):
string or when no indices have been specified)
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, none, all Default: closed
closed, hidden, none, all Default: closed
:arg ignore_unavailable: Whether specified concrete indices
should be ignored when unavailable (missing or closed)
:arg master_timeout: Specify timeout for connection to master
@@ -1213,7 +1215,9 @@ class IndicesClient(NamespacedClient):
)
def unfreeze(self, index, params=None, headers=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html>`_
Unfreezes an index. When a frozen index is unfrozen, the index goes through the
normal recovery process and becomes writeable again.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html>`_
:arg index: The name of the index to unfreeze
:arg allow_no_indices: Whether to ignore if a wildcard indices
@@ -1221,7 +1225,7 @@ class IndicesClient(NamespacedClient):
string or when no indices have been specified)
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, none, all Default: closed
closed, hidden, none, all Default: closed
:arg ignore_unavailable: Whether specified concrete indices
should be ignored when unavailable (missing or closed)
:arg master_timeout: Specify timeout for connection to master
@@ -1239,6 +1243,7 @@ class IndicesClient(NamespacedClient):
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
def reload_search_analyzers(self, index, params=None, headers=None):
"""
Reloads an index's search analyzers and their resources.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html>`_
:arg index: A comma-separated list of index names to reload
@@ -1248,7 +1253,7 @@ class IndicesClient(NamespacedClient):
string or when no indices have been specified)
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, none, all Default: open
closed, hidden, none, all Default: open
:arg ignore_unavailable: Whether specified concrete indices
should be ignored when unavailable (missing or closed)
"""
-1
View File
@@ -89,7 +89,6 @@ class IngestClient(NamespacedClient):
"""
Returns a list of the built-in patterns.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get>`_
"""
return self.transport.perform_request(
"GET", "/_ingest/processor/grok", params=params, headers=headers
+7 -3
View File
@@ -5,8 +5,8 @@ class LicenseClient(NamespacedClient):
@query_params()
def delete(self, params=None, headers=None):
"""
Deletes licensing information for the cluster
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html>`_
"""
return self.transport.perform_request(
"DELETE", "/_license", params=params, headers=headers
@@ -15,6 +15,7 @@ class LicenseClient(NamespacedClient):
@query_params("accept_enterprise", "local")
def get(self, params=None, headers=None):
"""
Retrieves licensing information for the cluster
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html>`_
:arg accept_enterprise: If the active license is an enterprise
@@ -29,8 +30,8 @@ class LicenseClient(NamespacedClient):
@query_params()
def get_basic_status(self, params=None, headers=None):
"""
Retrieves information about the status of the basic license.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html>`_
"""
return self.transport.perform_request(
"GET", "/_license/basic_status", params=params, headers=headers
@@ -39,8 +40,8 @@ class LicenseClient(NamespacedClient):
@query_params()
def get_trial_status(self, params=None, headers=None):
"""
Retrieves information about the status of the trial license.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html>`_
"""
return self.transport.perform_request(
"GET", "/_license/trial_status", params=params, headers=headers
@@ -49,6 +50,7 @@ class LicenseClient(NamespacedClient):
@query_params("acknowledge")
def post(self, body=None, params=None, headers=None):
"""
Updates the license for the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html>`_
:arg body: licenses to be installed
@@ -62,6 +64,7 @@ class LicenseClient(NamespacedClient):
@query_params("acknowledge")
def post_start_basic(self, params=None, headers=None):
"""
Starts an indefinite basic license.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html>`_
:arg acknowledge: whether the user has acknowledged acknowledge
@@ -74,6 +77,7 @@ class LicenseClient(NamespacedClient):
@query_params("acknowledge", "doc_type")
def post_start_trial(self, params=None, headers=None):
"""
starts a limited time trial license.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html>`_
:arg acknowledge: whether the user has acknowledged acknowledge
+3
View File
@@ -5,6 +5,9 @@ class MigrationClient(NamespacedClient):
@query_params()
def deprecations(self, index=None, params=None, headers=None):
"""
Retrieves information about different cluster, node, and index level settings
that use deprecated features that will be removed or changed in the next major
version.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html>`_
:arg index: Index pattern
+85 -5
View File
@@ -5,6 +5,8 @@ class MlClient(NamespacedClient):
@query_params("allow_no_jobs", "force", "timeout")
def close_job(self, job_id, body=None, params=None, headers=None):
"""
Closes one or more anomaly detection jobs. A job can be opened and closed
multiple times throughout its lifecycle.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html>`_
:arg job_id: The name of the job to close
@@ -30,6 +32,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_calendar(self, calendar_id, params=None, headers=None):
"""
Deletes a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html>`_
:arg calendar_id: The ID of the calendar to delete
"""
@@ -48,6 +52,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_calendar_event(self, calendar_id, event_id, params=None, headers=None):
"""
Deletes scheduled events from a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html>`_
:arg calendar_id: The ID of the calendar to modify
:arg event_id: The ID of the event to remove from the calendar
@@ -66,6 +72,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_calendar_job(self, calendar_id, job_id, params=None, headers=None):
"""
Deletes anomaly detection jobs from a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html>`_
:arg calendar_id: The ID of the calendar to modify
:arg job_id: The ID of the job to remove from the calendar
@@ -84,6 +92,7 @@ class MlClient(NamespacedClient):
@query_params("force")
def delete_datafeed(self, datafeed_id, params=None, headers=None):
"""
Deletes an existing datafeed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to delete
@@ -104,7 +113,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_expired_data(self, params=None, headers=None):
"""
Deletes expired and unused machine learning data.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html>`_
"""
return self.transport.perform_request(
"DELETE", "/_ml/_delete_expired_data", params=params, headers=headers
@@ -113,6 +123,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_filter(self, filter_id, params=None, headers=None):
"""
Deletes a filter.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html>`_
:arg filter_id: The ID of the filter to delete
"""
@@ -129,6 +141,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_forecasts", "timeout")
def delete_forecast(self, job_id, forecast_id=None, params=None, headers=None):
"""
Deletes forecasts from a machine learning job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_
:arg job_id: The ID of the job from which to delete forecasts
@@ -152,6 +165,7 @@ class MlClient(NamespacedClient):
@query_params("force", "wait_for_completion")
def delete_job(self, job_id, params=None, headers=None):
"""
Deletes an existing anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_
:arg job_id: The ID of the job to delete
@@ -172,6 +186,7 @@ class MlClient(NamespacedClient):
@query_params()
def delete_model_snapshot(self, job_id, snapshot_id, params=None, headers=None):
"""
Deletes an existing model snapshot.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_
:arg job_id: The ID of the job to fetch
@@ -208,6 +223,8 @@ class MlClient(NamespacedClient):
)
def find_file_structure(self, body, params=None, headers=None):
"""
Finds the structure of a text file. The text file must contain data that is
suitable to be ingested into Elasticsearch.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html>`_
:arg body: The contents of the file to be analyzed
@@ -258,6 +275,7 @@ class MlClient(NamespacedClient):
@query_params("advance_time", "calc_interim", "end", "skip_time", "start")
def flush_job(self, job_id, body=None, params=None, headers=None):
"""
Forces any buffered data to be processed by the job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_
:arg job_id: The name of the job to flush
@@ -287,6 +305,8 @@ class MlClient(NamespacedClient):
@query_params("duration", "expires_in")
def forecast(self, job_id, params=None, headers=None):
"""
Predicts the future behavior of a time series by using its historical behavior.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html>`_
:arg job_id: The ID of the job to forecast for
:arg duration: The duration of the forecast
@@ -316,6 +336,7 @@ class MlClient(NamespacedClient):
)
def get_buckets(self, job_id, body=None, timestamp=None, params=None, headers=None):
"""
Retrieves anomaly detection job results for one or more buckets.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_
:arg job_id: ID of the job to get bucket results from
@@ -352,6 +373,8 @@ class MlClient(NamespacedClient):
@query_params("end", "from_", "job_id", "size", "start")
def get_calendar_events(self, calendar_id, params=None, headers=None):
"""
Retrieves information about the scheduled events in calendars.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html>`_
:arg calendar_id: The ID of the calendar containing the events
:arg end: Get events before this time
@@ -380,6 +403,8 @@ class MlClient(NamespacedClient):
@query_params("from_", "size")
def get_calendars(self, body=None, calendar_id=None, params=None, headers=None):
"""
Retrieves configuration information for calendars.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html>`_
:arg body: The from and size parameters optionally sent in the
body
@@ -404,6 +429,7 @@ class MlClient(NamespacedClient):
self, job_id, body=None, category_id=None, params=None, headers=None
):
"""
Retrieves anomaly detection job results for one or more categories.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_
:arg job_id: The name of the job
@@ -433,6 +459,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_datafeeds")
def get_datafeed_stats(self, datafeed_id=None, params=None, headers=None):
"""
Retrieves usage information for datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
@@ -450,6 +477,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_datafeeds")
def get_datafeeds(self, datafeed_id=None, params=None, headers=None):
"""
Retrieves configuration information for datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_
:arg datafeed_id: The ID of the datafeeds to fetch
@@ -467,6 +495,8 @@ class MlClient(NamespacedClient):
@query_params("from_", "size")
def get_filters(self, filter_id=None, params=None, headers=None):
"""
Retrieves filters.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html>`_
:arg filter_id: The ID of the filter to fetch
:arg from_: skips a number of filters
@@ -495,9 +525,10 @@ class MlClient(NamespacedClient):
)
def get_influencers(self, job_id, body=None, params=None, headers=None):
"""
Retrieves anomaly detection job results for one or more influencers.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html>`_
:arg job_id:
:arg job_id: Identifier for the anomaly detection job
:arg body: Influencer selection criteria
:arg desc: whether the results should be sorted in decending
order
@@ -528,6 +559,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_jobs")
def get_job_stats(self, job_id=None, params=None, headers=None):
"""
Retrieves usage information for anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_
:arg job_id: The ID of the jobs stats to fetch
@@ -545,6 +577,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_jobs")
def get_jobs(self, job_id=None, params=None, headers=None):
"""
Retrieves configuration information for anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_
:arg job_id: The ID of the jobs to fetch
@@ -564,6 +597,7 @@ class MlClient(NamespacedClient):
self, job_id, body=None, snapshot_id=None, params=None, headers=None
):
"""
Retrieves information about model snapshots.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_
:arg job_id: The ID of the job to fetch
@@ -606,6 +640,8 @@ class MlClient(NamespacedClient):
)
def get_overall_buckets(self, job_id, body=None, params=None, headers=None):
"""
Retrieves overall bucket results that summarize the bucket results of multiple
anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html>`_
:arg job_id: The job IDs for which to calculate overall bucket
@@ -653,15 +689,17 @@ class MlClient(NamespacedClient):
)
def get_records(self, job_id, body=None, params=None, headers=None):
"""
Retrieves anomaly records for an anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html>`_
:arg job_id:
:arg job_id: The ID of the job
:arg body: Record selection criteria
:arg desc: Set the sort direction
:arg end: End time filter for records
:arg exclude_interim: Exclude interim results
:arg from_: skips a number of records
:arg record_score:
:arg record_score: Returns records with anomaly scores greater
or equal than this value
:arg size: specifies a max number of records to get
:arg sort: Sort records by a particular field
:arg start: Start time filter for records
@@ -684,7 +722,8 @@ class MlClient(NamespacedClient):
@query_params()
def info(self, params=None, headers=None):
"""
Returns defaults and limits used by machine learning.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html>`_
"""
return self.transport.perform_request(
"GET", "/_ml/info", params=params, headers=headers
@@ -693,6 +732,7 @@ class MlClient(NamespacedClient):
@query_params()
def open_job(self, job_id, params=None, headers=None):
"""
Opens one or more anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html>`_
:arg job_id: The ID of the job to open
@@ -710,6 +750,8 @@ class MlClient(NamespacedClient):
@query_params()
def post_calendar_events(self, calendar_id, body, params=None, headers=None):
"""
Posts scheduled events in a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html>`_
:arg calendar_id: The ID of the calendar to modify
:arg body: A list of events
@@ -729,6 +771,7 @@ class MlClient(NamespacedClient):
@query_params("reset_end", "reset_start")
def post_data(self, job_id, body, params=None, headers=None):
"""
Sends data to an anomaly detection job for analysis.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_
:arg job_id: The name of the job receiving the data
@@ -754,6 +797,7 @@ class MlClient(NamespacedClient):
@query_params()
def preview_datafeed(self, datafeed_id, params=None, headers=None):
"""
Previews a datafeed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to preview
@@ -773,6 +817,8 @@ class MlClient(NamespacedClient):
@query_params()
def put_calendar(self, calendar_id, body=None, params=None, headers=None):
"""
Instantiates a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html>`_
:arg calendar_id: The ID of the calendar to create
:arg body: The calendar details
@@ -793,6 +839,8 @@ class MlClient(NamespacedClient):
@query_params()
def put_calendar_job(self, calendar_id, job_id, params=None, headers=None):
"""
Adds an anomaly detection job to a calendar.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html>`_
:arg calendar_id: The ID of the calendar to modify
:arg job_id: The ID of the job to add to the calendar
@@ -813,6 +861,7 @@ class MlClient(NamespacedClient):
)
def put_datafeed(self, datafeed_id, body, params=None, headers=None):
"""
Instantiates a datafeed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to create
@@ -842,6 +891,8 @@ class MlClient(NamespacedClient):
@query_params()
def put_filter(self, filter_id, body, params=None, headers=None):
"""
Instantiates a filter.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html>`_
:arg filter_id: The ID of the filter to create
:arg body: The filter details
@@ -861,6 +912,7 @@ class MlClient(NamespacedClient):
@query_params()
def put_job(self, job_id, body, params=None, headers=None):
"""
Instantiates an anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html>`_
:arg job_id: The ID of the job to create
@@ -883,6 +935,7 @@ class MlClient(NamespacedClient):
self, job_id, snapshot_id, body=None, params=None, headers=None
):
"""
Reverts to a specific snapshot.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html>`_
:arg job_id: The ID of the job to fetch
@@ -913,6 +966,8 @@ class MlClient(NamespacedClient):
@query_params("enabled", "timeout")
def set_upgrade_mode(self, params=None, headers=None):
"""
Sets a cluster wide upgrade_mode setting that prepares machine learning indices
for an upgrade.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html>`_
:arg enabled: Whether to enable upgrade_mode ML setting or not.
@@ -927,6 +982,7 @@ class MlClient(NamespacedClient):
@query_params("end", "start", "timeout")
def start_datafeed(self, datafeed_id, body=None, params=None, headers=None):
"""
Starts one or more datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to start
@@ -953,6 +1009,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_datafeeds", "force", "timeout")
def stop_datafeed(self, datafeed_id, params=None, headers=None):
"""
Stops one or more datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to stop
@@ -980,6 +1037,7 @@ class MlClient(NamespacedClient):
)
def update_datafeed(self, datafeed_id, body, params=None, headers=None):
"""
Updates certain properties of a datafeed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to update
@@ -1009,6 +1067,8 @@ class MlClient(NamespacedClient):
@query_params()
def update_filter(self, filter_id, body, params=None, headers=None):
"""
Updates the description of a filter, adds items, or removes items.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html>`_
:arg filter_id: The ID of the filter to update
:arg body: The filter update
@@ -1028,6 +1088,7 @@ class MlClient(NamespacedClient):
@query_params()
def update_job(self, job_id, body, params=None, headers=None):
"""
Updates certain properties of an anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html>`_
:arg job_id: The ID of the job to create
@@ -1050,6 +1111,7 @@ class MlClient(NamespacedClient):
self, job_id, snapshot_id, body, params=None, headers=None
):
"""
Updates certain properties of a snapshot.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_
:arg job_id: The ID of the job to fetch
@@ -1078,6 +1140,7 @@ class MlClient(NamespacedClient):
@query_params()
def validate(self, body, params=None, headers=None):
"""
Validates an anomaly detection job.
:arg body: The job config
"""
@@ -1095,6 +1158,7 @@ class MlClient(NamespacedClient):
@query_params()
def validate_detector(self, body, params=None, headers=None):
"""
Validates an anomaly detection detector.
:arg body: The detector
"""
@@ -1112,6 +1176,7 @@ class MlClient(NamespacedClient):
@query_params("force")
def delete_data_frame_analytics(self, id, params=None, headers=None):
"""
Deletes an existing data frame analytics job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to delete
@@ -1130,6 +1195,7 @@ class MlClient(NamespacedClient):
@query_params()
def evaluate_data_frame(self, body, params=None, headers=None):
"""
Evaluates the data frame analytics for an annotated index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html>`_
:arg body: The evaluation definition
@@ -1148,6 +1214,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_match", "from_", "size")
def get_data_frame_analytics(self, id=None, params=None, headers=None):
"""
Retrieves configuration information for data frame analytics jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to fetch
@@ -1172,6 +1239,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_match", "from_", "size")
def get_data_frame_analytics_stats(self, id=None, params=None, headers=None):
"""
Retrieves usage information for data frame analytics jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html>`_
:arg id: The ID of the data frame analytics stats to fetch
@@ -1196,6 +1264,7 @@ class MlClient(NamespacedClient):
@query_params()
def put_data_frame_analytics(self, id, body, params=None, headers=None):
"""
Instantiates a data frame analytics job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to create
@@ -1216,6 +1285,7 @@ class MlClient(NamespacedClient):
@query_params("timeout")
def start_data_frame_analytics(self, id, body=None, params=None, headers=None):
"""
Starts a data frame analytics job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to start
@@ -1237,6 +1307,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_match", "force", "timeout")
def stop_data_frame_analytics(self, id, body=None, params=None, headers=None):
"""
Stops one or more data frame analytics jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to stop
@@ -1263,6 +1334,8 @@ class MlClient(NamespacedClient):
@query_params()
def delete_trained_model(self, model_id, params=None, headers=None):
"""
Deletes an existing trained inference model that is currently not referenced by
an ingest pipeline.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference.html>`_
:arg model_id: The ID of the trained model to delete
@@ -1282,6 +1355,7 @@ class MlClient(NamespacedClient):
self, body=None, id=None, params=None, headers=None
):
"""
Explains a data frame analytics config.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html>`_
:arg body: The data frame analytics config to explain
@@ -1305,6 +1379,7 @@ class MlClient(NamespacedClient):
)
def get_trained_models(self, model_id=None, params=None, headers=None):
"""
Retrieves configuration information for a trained inference model.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference.html>`_
:arg model_id: The ID of the trained models to fetch
@@ -1337,6 +1412,7 @@ class MlClient(NamespacedClient):
@query_params("allow_no_match", "from_", "size")
def get_trained_models_stats(self, model_id=None, params=None, headers=None):
"""
Retrieves usage information for trained inference models.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html>`_
:arg model_id: The ID of the trained models stats to fetch
@@ -1361,6 +1437,8 @@ class MlClient(NamespacedClient):
@query_params()
def put_trained_model(self, model_id, body, params=None, headers=None):
"""
Creates an inference trained model.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference.html>`_
:arg model_id: The ID of the trained models to store
:arg body: The trained model configuration
@@ -1380,6 +1458,8 @@ class MlClient(NamespacedClient):
@query_params()
def estimate_model_memory(self, body, params=None, headers=None):
"""
Estimates the model memory
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html>`_
:arg body: The analysis config, plus cardinality estimates for
fields it references
+1
View File
@@ -5,6 +5,7 @@ class MonitoringClient(NamespacedClient):
@query_params("interval", "system_api_version", "system_id")
def bulk(self, body, doc_type=None, params=None, headers=None):
"""
Used by the monitoring features to send monitoring data.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html>`_
:arg body: The operation definition and data (action-data
+18
View File
@@ -5,6 +5,8 @@ class RollupClient(NamespacedClient):
@query_params()
def delete_job(self, id, params=None, headers=None):
"""
Deletes an existing rollup job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html>`_
:arg id: The ID of the job to delete
"""
@@ -18,6 +20,8 @@ class RollupClient(NamespacedClient):
@query_params()
def get_jobs(self, id=None, params=None, headers=None):
"""
Retrieves the configuration, stats, and status of rollup jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html>`_
:arg id: The ID of the job(s) to fetch. Accepts glob patterns,
or left blank for all jobs
@@ -29,6 +33,9 @@ class RollupClient(NamespacedClient):
@query_params()
def get_rollup_caps(self, id=None, params=None, headers=None):
"""
Returns the capabilities of any rollup jobs that have been configured for a
specific index or index pattern.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html>`_
:arg id: The ID of the index to check rollup capabilities on, or
left blank for all jobs
@@ -40,6 +47,9 @@ class RollupClient(NamespacedClient):
@query_params()
def get_rollup_index_caps(self, index, params=None, headers=None):
"""
Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the
index where rollup data is stored).
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html>`_
:arg index: The rollup index or index pattern to obtain rollup
capabilities from.
@@ -54,6 +64,8 @@ class RollupClient(NamespacedClient):
@query_params()
def put_job(self, id, body, params=None, headers=None):
"""
Creates a rollup job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html>`_
:arg id: The ID of the job to create
:arg body: The job configuration
@@ -73,6 +85,8 @@ class RollupClient(NamespacedClient):
@query_params("rest_total_hits_as_int", "typed_keys")
def rollup_search(self, index, body, doc_type=None, params=None, headers=None):
"""
Enables searching rolled-up data using the standard query DSL.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html>`_
:arg index: The indices or index-pattern(s) (containing rollup
or regular data) that should be searched
@@ -98,6 +112,8 @@ class RollupClient(NamespacedClient):
@query_params()
def start_job(self, id, params=None, headers=None):
"""
Starts an existing, stopped rollup job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html>`_
:arg id: The ID of the job to start
"""
@@ -114,6 +130,8 @@ class RollupClient(NamespacedClient):
@query_params("timeout", "wait_for_completion")
def stop_job(self, id, params=None, headers=None):
"""
Stops an existing, started rollup job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html>`_
:arg id: The ID of the job to stop
:arg timeout: Block for (at maximum) the specified duration
+30 -3
View File
@@ -5,8 +5,9 @@ class SecurityClient(NamespacedClient):
@query_params()
def authenticate(self, params=None, headers=None):
"""
Enables authentication as a user and retrieve information about the
authenticated user.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html>`_
"""
return self.transport.perform_request(
"GET", "/_security/_authenticate", params=params, headers=headers
@@ -15,6 +16,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def change_password(self, body, username=None, params=None, headers=None):
"""
Changes the passwords of users in the native realm and built-in users.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html>`_
:arg body: the new password for the user
@@ -39,6 +41,8 @@ class SecurityClient(NamespacedClient):
@query_params("usernames")
def clear_cached_realms(self, realms, params=None, headers=None):
"""
Evicts users from the user cache. Can completely clear the cache or evict
specific users.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html>`_
:arg realms: Comma-separated list of realms to clear
@@ -58,6 +62,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def clear_cached_roles(self, name, params=None, headers=None):
"""
Evicts roles from the native role cache.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html>`_
:arg name: Role name
@@ -75,6 +80,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def create_api_key(self, body, params=None, headers=None):
"""
Creates an API key for access without requiring basic authentication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html>`_
:arg body: The api key request to create an API key
@@ -93,6 +99,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def delete_privileges(self, application, name, params=None, headers=None):
"""
Removes application privileges.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html>`_
:arg application: Application name
@@ -116,6 +123,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def delete_role(self, name, params=None, headers=None):
"""
Removes roles in the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html>`_
:arg name: Role name
@@ -137,6 +145,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def delete_role_mapping(self, name, params=None, headers=None):
"""
Removes role mappings.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html>`_
:arg name: Role-mapping name
@@ -158,6 +167,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def delete_user(self, username, params=None, headers=None):
"""
Deletes users from the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html>`_
:arg username: username
@@ -179,6 +189,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def disable_user(self, username, params=None, headers=None):
"""
Disables users in the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html>`_
:arg username: The username of the user to disable
@@ -200,6 +211,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def enable_user(self, username, params=None, headers=None):
"""
Enables users in the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html>`_
:arg username: The username of the user to enable
@@ -221,6 +233,7 @@ class SecurityClient(NamespacedClient):
@query_params("id", "name", "owner", "realm_name", "username")
def get_api_key(self, params=None, headers=None):
"""
Retrieves information for one or more API keys.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html>`_
:arg id: API key id of the API key to be retrieved
@@ -239,6 +252,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_privileges(self, application=None, name=None, params=None, headers=None):
"""
Retrieves application privileges.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html>`_
:arg application: Application name
@@ -254,6 +268,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_role(self, name=None, params=None, headers=None):
"""
Retrieves roles in the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html>`_
:arg name: Role name
@@ -265,6 +280,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_role_mapping(self, name=None, params=None, headers=None):
"""
Retrieves role mappings.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html>`_
:arg name: Role-Mapping name
@@ -279,6 +295,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_token(self, body, params=None, headers=None):
"""
Creates a bearer token for access without requiring basic authentication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html>`_
:arg body: The token request to get
@@ -293,6 +310,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_user(self, username=None, params=None, headers=None):
"""
Retrieves information about users in the native realm and built-in users.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html>`_
:arg username: A comma-separated list of usernames
@@ -307,8 +325,8 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_user_privileges(self, params=None, headers=None):
"""
Retrieves application privileges.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html>`_
"""
return self.transport.perform_request(
"GET", "/_security/user/_privileges", params=params, headers=headers
@@ -317,6 +335,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def has_privileges(self, body, user=None, params=None, headers=None):
"""
Determines whether the specified user has a specified list of privileges.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html>`_
:arg body: The privileges to test
@@ -336,6 +355,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def invalidate_api_key(self, body, params=None, headers=None):
"""
Invalidates one or more API keys.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html>`_
:arg body: The api key request to invalidate API key(s)
@@ -350,6 +370,7 @@ class SecurityClient(NamespacedClient):
@query_params()
def invalidate_token(self, body, params=None, headers=None):
"""
Invalidates one or more access tokens or refresh tokens.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html>`_
:arg body: The token to invalidate
@@ -368,6 +389,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def put_privileges(self, body, params=None, headers=None):
"""
Adds or updates application privileges.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html>`_
:arg body: The privilege(s) to add
@@ -386,6 +408,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def put_role(self, name, body, params=None, headers=None):
"""
Adds and updates roles in the native realm.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html>`_
:arg name: Role name
@@ -410,6 +433,7 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def put_role_mapping(self, name, body, params=None, headers=None):
"""
Creates and updates role mappings.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html>`_
:arg name: Role-mapping name
@@ -434,6 +458,8 @@ class SecurityClient(NamespacedClient):
@query_params("refresh")
def put_user(self, username, body, params=None, headers=None):
"""
Adds and updates users in the native realm. These users are commonly referred
to as native users.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html>`_
:arg username: The username of the User
@@ -458,8 +484,9 @@ class SecurityClient(NamespacedClient):
@query_params()
def get_builtin_privileges(self, params=None, headers=None):
"""
Retrieves the list of cluster privileges and index privileges that are
available in this version of Elasticsearch.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html>`_
"""
return self.transport.perform_request(
"GET", "/_security/privilege/_builtin", params=params, headers=headers
+13 -5
View File
@@ -5,6 +5,7 @@ class SlmClient(NamespacedClient):
@query_params()
def delete_lifecycle(self, policy_id, params=None, headers=None):
"""
Deletes an existing snapshot lifecycle policy.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html>`_
:arg policy_id: The id of the snapshot lifecycle policy to
@@ -23,6 +24,8 @@ class SlmClient(NamespacedClient):
@query_params()
def execute_lifecycle(self, policy_id, params=None, headers=None):
"""
Immediately creates a snapshot according to the lifecycle policy, without
waiting for the scheduled time.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html>`_
:arg policy_id: The id of the snapshot lifecycle policy to be
@@ -41,8 +44,9 @@ class SlmClient(NamespacedClient):
@query_params()
def execute_retention(self, params=None, headers=None):
"""
Deletes any snapshots that are expired according to the policy's retention
rules.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html>`_
"""
return self.transport.perform_request(
"POST", "/_slm/_execute_retention", params=params, headers=headers
@@ -51,6 +55,8 @@ class SlmClient(NamespacedClient):
@query_params()
def get_lifecycle(self, policy_id=None, params=None, headers=None):
"""
Retrieves one or more snapshot lifecycle policy definitions and information
about the latest snapshot attempts.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html>`_
:arg policy_id: Comma-separated list of snapshot lifecycle
@@ -66,8 +72,9 @@ class SlmClient(NamespacedClient):
@query_params()
def get_stats(self, params=None, headers=None):
"""
Returns global and policy-level statistics about actions taken by snapshot
lifecycle management.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html>`_
"""
return self.transport.perform_request(
"GET", "/_slm/stats", params=params, headers=headers
@@ -76,6 +83,7 @@ class SlmClient(NamespacedClient):
@query_params()
def put_lifecycle(self, policy_id, body=None, params=None, headers=None):
"""
Creates or updates a snapshot lifecycle policy.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html>`_
:arg policy_id: The id of the snapshot lifecycle policy
@@ -95,8 +103,8 @@ class SlmClient(NamespacedClient):
@query_params()
def get_status(self, params=None, headers=None):
"""
Retrieves the status of snapshot lifecycle management (SLM).
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html>`_
"""
return self.transport.perform_request(
"GET", "/_slm/status", params=params, headers=headers
@@ -105,8 +113,8 @@ class SlmClient(NamespacedClient):
@query_params()
def start(self, params=None, headers=None):
"""
Turns on snapshot lifecycle management (SLM).
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html>`_
"""
return self.transport.perform_request(
"POST", "/_slm/start", params=params, headers=headers
@@ -115,8 +123,8 @@ class SlmClient(NamespacedClient):
@query_params()
def stop(self, params=None, headers=None):
"""
Turns off snapshot lifecycle management (SLM).
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html>`_
"""
return self.transport.perform_request(
"POST", "/_slm/stop", params=params, headers=headers
+1 -1
View File
@@ -21,7 +21,7 @@ class SqlClient(NamespacedClient):
@query_params("format")
def query(self, body, params=None, headers=None):
"""
Executes an SQL request
Executes a SQL request
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html>`_
:arg body: Use the `query` element to start a query. Use the
+2 -1
View File
@@ -5,8 +5,9 @@ class SslClient(NamespacedClient):
@query_params()
def certificates(self, params=None, headers=None):
"""
Retrieves information about the X.509 certificates used to encrypt
communications in the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html>`_
"""
return self.transport.perform_request(
"GET", "/_ssl/certificates", params=params, headers=headers
+8
View File
@@ -5,6 +5,7 @@ class TransformClient(NamespacedClient):
@query_params("force")
def delete_transform(self, transform_id, params=None, headers=None):
"""
Deletes an existing transform.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html>`_
:arg transform_id: The id of the transform to delete
@@ -27,6 +28,7 @@ class TransformClient(NamespacedClient):
@query_params("allow_no_match", "from_", "size")
def get_transform(self, transform_id=None, params=None, headers=None):
"""
Retrieves configuration information for transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html>`_
:arg transform_id: The id or comma delimited list of id
@@ -53,6 +55,7 @@ class TransformClient(NamespacedClient):
@query_params("allow_no_match", "from_", "size")
def get_transform_stats(self, transform_id, params=None, headers=None):
"""
Retrieves usage information for transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html>`_
:arg transform_id: The id of the transform for which to get
@@ -83,6 +86,7 @@ class TransformClient(NamespacedClient):
@query_params()
def preview_transform(self, body, params=None, headers=None):
"""
Previews a transform.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html>`_
:arg body: The definition for the transform to preview
@@ -97,6 +101,7 @@ class TransformClient(NamespacedClient):
@query_params("defer_validation")
def put_transform(self, transform_id, body, params=None, headers=None):
"""
Instantiates a transform.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html>`_
:arg transform_id: The id of the new transform.
@@ -119,6 +124,7 @@ class TransformClient(NamespacedClient):
@query_params("timeout")
def start_transform(self, transform_id, params=None, headers=None):
"""
Starts one or more transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html>`_
:arg transform_id: The id of the transform to start
@@ -146,6 +152,7 @@ class TransformClient(NamespacedClient):
)
def stop_transform(self, transform_id, params=None, headers=None):
"""
Stops one or more transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html>`_
:arg transform_id: The id of the transform to stop
@@ -176,6 +183,7 @@ class TransformClient(NamespacedClient):
@query_params("defer_validation")
def update_transform(self, transform_id, body, params=None, headers=None):
"""
Updates certain properties of a transform.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html>`_
:arg transform_id: The id of the transform.
+10 -2
View File
@@ -5,6 +5,7 @@ class WatcherClient(NamespacedClient):
@query_params()
def ack_watch(self, watch_id, action_id=None, params=None, headers=None):
"""
Acknowledges a watch, manually throttling the execution of the watch's actions.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html>`_
:arg watch_id: Watch ID
@@ -24,6 +25,7 @@ class WatcherClient(NamespacedClient):
@query_params()
def activate_watch(self, watch_id, params=None, headers=None):
"""
Activates a currently inactive watch.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html>`_
:arg watch_id: Watch ID
@@ -41,6 +43,7 @@ class WatcherClient(NamespacedClient):
@query_params()
def deactivate_watch(self, watch_id, params=None, headers=None):
"""
Deactivates a currently active watch.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html>`_
:arg watch_id: Watch ID
@@ -58,6 +61,7 @@ class WatcherClient(NamespacedClient):
@query_params()
def delete_watch(self, id, params=None, headers=None):
"""
Removes a watch from Watcher.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html>`_
:arg id: Watch ID
@@ -75,6 +79,7 @@ class WatcherClient(NamespacedClient):
@query_params("debug")
def execute_watch(self, body=None, id=None, params=None, headers=None):
"""
Forces the execution of a stored watch.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html>`_
:arg body: Execution control
@@ -93,6 +98,7 @@ class WatcherClient(NamespacedClient):
@query_params()
def get_watch(self, id, params=None, headers=None):
"""
Retrieves a watch by its ID.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html>`_
:arg id: Watch ID
@@ -107,6 +113,7 @@ class WatcherClient(NamespacedClient):
@query_params("active", "if_primary_term", "if_seq_no", "version")
def put_watch(self, id, body=None, params=None, headers=None):
"""
Creates a new watch, or updates an existing one.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html>`_
:arg id: Watch ID
@@ -132,8 +139,8 @@ class WatcherClient(NamespacedClient):
@query_params()
def start(self, params=None, headers=None):
"""
Starts Watcher if it is not already running.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html>`_
"""
return self.transport.perform_request(
"POST", "/_watcher/_start", params=params, headers=headers
@@ -142,6 +149,7 @@ class WatcherClient(NamespacedClient):
@query_params("emit_stacktraces")
def stats(self, metric=None, params=None, headers=None):
"""
Retrieves the current Watcher metrics.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html>`_
:arg metric: Controls what additional stat metrics should be
@@ -160,8 +168,8 @@ class WatcherClient(NamespacedClient):
@query_params()
def stop(self, params=None, headers=None):
"""
Stops Watcher if it is running.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html>`_
"""
return self.transport.perform_request(
"POST", "/_watcher/_stop", params=params, headers=headers
+2
View File
@@ -9,6 +9,7 @@ class XPackClient(NamespacedClient):
@query_params("categories")
def info(self, params=None, headers=None):
"""
Retrieves information about the installed X-Pack features.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html>`_
:arg categories: Comma-separated list of info categories. Can be
@@ -21,6 +22,7 @@ class XPackClient(NamespacedClient):
@query_params("master_timeout")
def usage(self, params=None, headers=None):
"""
Retrieves usage information about the installed X-Pack features.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html>`_
:arg master_timeout: Specify timeout for watch write operation
+1 -1
View File
@@ -5,7 +5,7 @@ import sys
VERSION = (7, 7, 0)
__version__ = VERSION
__versionstr__ = "7.7.0a1"
__versionstr__ = "7.7.0a2"
with open(join(dirname(__file__), "README")) as f:
long_description = f.read().strip()
@@ -3,6 +3,7 @@ Dynamically generated set of TestCases based on set of yaml files decribing
some integration tests. These files are shared among all official Elasticsearch
clients.
"""
import sys
import re
from os import walk, environ
from os.path import exists, join, dirname, pardir
@@ -41,12 +42,14 @@ SKIP_TESTS = {
"TestIndicesGetAlias10Basic",
# Disallowing expensive queries is 7.7+
"TestSearch320DisallowQueries",
"TestIndicesPutIndexTemplate10Basic",
"TestIndicesGetIndexTemplate10Basic",
"TestIndicesGetIndexTemplate20GetMissing",
}
}
# Test is inconsistent due to dictionaries not being ordered.
if sys.version_info < (3, 6):
SKIP_TESTS["*"].add("TestSearchAggregation250MovingFn")
XPACK_FEATURES = None
+1 -1
View File
@@ -8,7 +8,7 @@
{% if api.doc_url %}
`<{{ api.doc_url }}>`_
{% endif %}
{% if api.params %}
{% if api.params|list|length %}
{% for p, info in api.params %}
{% filter wordwrap(72, wrapstring="\n ") %}