diff --git a/Changelog.rst b/Changelog.rst index b98ce4cf..e2578af1 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -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`` diff --git a/elasticsearch/__init__.py b/elasticsearch/__init__.py index d3045a5a..2cc5b403 100644 --- a/elasticsearch/__init__.py +++ b/elasticsearch/__init__.py @@ -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 diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 7f4d860e..1c5ada66 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -280,7 +280,6 @@ class Elasticsearch(object): """ Returns whether the cluster is running. ``_ - """ try: return self.transport.perform_request( @@ -294,7 +293,6 @@ class Elasticsearch(object): """ Returns basic information about the cluster. ``_ - """ 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. - + ``_ """ 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 - + ``_ """ return self.transport.perform_request( "GET", "/_script_language", params=params, headers=headers diff --git a/elasticsearch/client/async_search.py b/elasticsearch/client/async_search.py index 78e1f604..1c9bd472 100644 --- a/elasticsearch/client/async_search.py +++ b/elasticsearch/client/async_search.py @@ -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. ``_ :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. ``_ :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. ``_ :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) diff --git a/elasticsearch/client/autoscaling.py b/elasticsearch/client/autoscaling.py index fcd2be01..7b2f158c 100644 --- a/elasticsearch/client/autoscaling.py +++ b/elasticsearch/client/autoscaling.py @@ -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. ``_ - """ return self.transport.perform_request( "GET", "/_autoscaling/decision", params=params, headers=headers diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index c1211e72..5a344766 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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 diff --git a/elasticsearch/client/ccr.py b/elasticsearch/client/ccr.py index 5aa3bf24..5ef08c47 100644 --- a/elasticsearch/client/ccr.py +++ b/elasticsearch/client/ccr.py @@ -5,6 +5,7 @@ class CcrClient(NamespacedClient): @query_params() def delete_auto_follow_pattern(self, name, params=None, headers=None): """ + Deletes auto-follow patterns. ``_ :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. ``_ :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 ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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 ``_ :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. ``_ - """ 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. ``_ :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 ``_ :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 ``_ :arg name: The name of the auto follow pattern to resume diff --git a/elasticsearch/client/cluster.py b/elasticsearch/client/cluster.py index 1c270211..ea43f262 100644 --- a/elasticsearch/client/cluster.py +++ b/elasticsearch/client/cluster.py @@ -209,7 +209,6 @@ class ClusterClient(NamespacedClient): """ Returns the information about configured remote clusters. ``_ - """ return self.transport.perform_request( "GET", "/_remote/info", params=params, headers=headers diff --git a/elasticsearch/client/enrich.py b/elasticsearch/client/enrich.py index da1b5d4d..2237a3d0 100644 --- a/elasticsearch/client/enrich.py +++ b/elasticsearch/client/enrich.py @@ -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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ - """ return self.transport.perform_request( "GET", "/_enrich/_stats", params=params, headers=headers diff --git a/elasticsearch/client/eql.py b/elasticsearch/client/eql.py index 9e4ae89d..4562bfe9 100644 --- a/elasticsearch/client/eql.py +++ b/elasticsearch/client/eql.py @@ -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) ``_ :arg index: The name of the index to scope the operation diff --git a/elasticsearch/client/graph.py b/elasticsearch/client/graph.py index 526d1d27..d495ede6 100644 --- a/elasticsearch/client/graph.py +++ b/elasticsearch/client/graph.py @@ -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. ``_ :arg index: A comma-separated list of index names to search; use diff --git a/elasticsearch/client/ilm.py b/elasticsearch/client/ilm.py index a7a14700..bc8b7052 100644 --- a/elasticsearch/client/ilm.py +++ b/elasticsearch/client/ilm.py @@ -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. ``_ :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. ``_ :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. ``_ :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. ``_ - """ 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. ``_ :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 ``_ :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 ``_ :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. ``_ :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. ``_ - """ 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 ``_ - """ return self.transport.perform_request( "POST", "/_ilm/stop", params=params, headers=headers diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 36be9b57..e5816cf4 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -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): """ - ``_ + Freezes an index. A frozen index has almost no overhead on the cluster (except + for maintaining its metadata in memory) and is read-only. + ``_ :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): """ - ``_ + Unfreezes an index. When a frozen index is unfrozen, the index goes through the + normal recovery process and becomes writeable again. + ``_ :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. ``_ :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) """ diff --git a/elasticsearch/client/ingest.py b/elasticsearch/client/ingest.py index 50bd8831..40fd7a20 100644 --- a/elasticsearch/client/ingest.py +++ b/elasticsearch/client/ingest.py @@ -89,7 +89,6 @@ class IngestClient(NamespacedClient): """ Returns a list of the built-in patterns. ``_ - """ return self.transport.perform_request( "GET", "/_ingest/processor/grok", params=params, headers=headers diff --git a/elasticsearch/client/license.py b/elasticsearch/client/license.py index dc2d52fe..1564c533 100644 --- a/elasticsearch/client/license.py +++ b/elasticsearch/client/license.py @@ -5,8 +5,8 @@ class LicenseClient(NamespacedClient): @query_params() def delete(self, params=None, headers=None): """ + Deletes licensing information for the cluster ``_ - """ 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 ``_ :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. ``_ - """ 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. ``_ - """ 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. ``_ :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. ``_ :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. ``_ :arg acknowledge: whether the user has acknowledged acknowledge diff --git a/elasticsearch/client/migration.py b/elasticsearch/client/migration.py index 1ab4e41c..ebe9a97a 100644 --- a/elasticsearch/client/migration.py +++ b/elasticsearch/client/migration.py @@ -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. ``_ :arg index: Index pattern diff --git a/elasticsearch/client/ml.py b/elasticsearch/client/ml.py index 1268bdb8..52b8d8bc 100644 --- a/elasticsearch/client/ml.py +++ b/elasticsearch/client/ml.py @@ -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. ``_ :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. + ``_ :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. + ``_ :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. + ``_ :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. ``_ :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. + ``_ """ 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. + ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. + ``_ :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. ``_ :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. + ``_ :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. + ``_ :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. ``_ :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. ``_ :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. ``_ :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. + ``_ :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. ``_ - :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ - :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. + ``_ """ 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. ``_ :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. + ``_ :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. ``_ :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. ``_ :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. + ``_ :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. + ``_ :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. ``_ :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. + ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. + ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. + ``_ :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 + ``_ :arg body: The analysis config, plus cardinality estimates for fields it references diff --git a/elasticsearch/client/monitoring.py b/elasticsearch/client/monitoring.py index c5bd2066..48ca5d50 100644 --- a/elasticsearch/client/monitoring.py +++ b/elasticsearch/client/monitoring.py @@ -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. ``_ :arg body: The operation definition and data (action-data diff --git a/elasticsearch/client/rollup.py b/elasticsearch/client/rollup.py index e26288c6..afcd93ae 100644 --- a/elasticsearch/client/rollup.py +++ b/elasticsearch/client/rollup.py @@ -5,6 +5,8 @@ class RollupClient(NamespacedClient): @query_params() def delete_job(self, id, params=None, headers=None): """ + Deletes an existing rollup job. + ``_ :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. + ``_ :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. + ``_ :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). + ``_ :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. + ``_ :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. + ``_ :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. + ``_ :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. + ``_ :arg id: The ID of the job to stop :arg timeout: Block for (at maximum) the specified duration diff --git a/elasticsearch/client/security.py b/elasticsearch/client/security.py index 173a0514..9f54fc33 100644 --- a/elasticsearch/client/security.py +++ b/elasticsearch/client/security.py @@ -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. ``_ - """ 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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ - """ 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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ - """ return self.transport.perform_request( "GET", "/_security/privilege/_builtin", params=params, headers=headers diff --git a/elasticsearch/client/slm.py b/elasticsearch/client/slm.py index a2c0a0ca..576928f3 100644 --- a/elasticsearch/client/slm.py +++ b/elasticsearch/client/slm.py @@ -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. ``_ :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. ``_ :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. ``_ - """ 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. ``_ :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. ``_ - """ 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. ``_ :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). ``_ - """ 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). ``_ - """ 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). ``_ - """ return self.transport.perform_request( "POST", "/_slm/stop", params=params, headers=headers diff --git a/elasticsearch/client/sql.py b/elasticsearch/client/sql.py index 4f2ea1d3..eb79e8b4 100644 --- a/elasticsearch/client/sql.py +++ b/elasticsearch/client/sql.py @@ -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 ``_ :arg body: Use the `query` element to start a query. Use the diff --git a/elasticsearch/client/ssl.py b/elasticsearch/client/ssl.py index 66ec2855..da6fa0b7 100644 --- a/elasticsearch/client/ssl.py +++ b/elasticsearch/client/ssl.py @@ -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. ``_ - """ return self.transport.perform_request( "GET", "/_ssl/certificates", params=params, headers=headers diff --git a/elasticsearch/client/transform.py b/elasticsearch/client/transform.py index 6cab5377..92f472f8 100644 --- a/elasticsearch/client/transform.py +++ b/elasticsearch/client/transform.py @@ -5,6 +5,7 @@ class TransformClient(NamespacedClient): @query_params("force") def delete_transform(self, transform_id, params=None, headers=None): """ + Deletes an existing transform. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :arg transform_id: The id of the transform. diff --git a/elasticsearch/client/watcher.py b/elasticsearch/client/watcher.py index 43c88597..3a3450dd 100644 --- a/elasticsearch/client/watcher.py +++ b/elasticsearch/client/watcher.py @@ -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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ :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. ``_ - """ 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. ``_ :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. ``_ - """ return self.transport.perform_request( "POST", "/_watcher/_stop", params=params, headers=headers diff --git a/elasticsearch/client/xpack.py b/elasticsearch/client/xpack.py index 769e6817..2e1a85b4 100644 --- a/elasticsearch/client/xpack.py +++ b/elasticsearch/client/xpack.py @@ -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. ``_ :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. ``_ :arg master_timeout: Specify timeout for watch write operation diff --git a/setup.py b/setup.py index a2a75b5c..9fd29ed9 100644 --- a/setup.py +++ b/setup.py @@ -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() diff --git a/test_elasticsearch/test_server/test_common.py b/test_elasticsearch/test_server/test_common.py index 2ccef57f..559ed6e0 100644 --- a/test_elasticsearch/test_server/test_common.py +++ b/test_elasticsearch/test_server/test_common.py @@ -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 diff --git a/utils/templates/base b/utils/templates/base index 27aa8dde..b7f1bb74 100644 --- a/utils/templates/base +++ b/utils/templates/base @@ -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 ") %}