Apply license header changes and API gen
This commit is contained in:
committed by
Seth Michael Larson
parent
24c57840cb
commit
8e1798cf31
+7
-17
@@ -1,18 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Elasticsearch documentation build configuration file, created by
|
||||
# sphinx-quickstart on Mon May 6 15:38:41 2013.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import os
|
||||
import datetime
|
||||
import elasticsearch
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
@@ -49,9 +42,6 @@ copyright = u"%d, Elasticsearch B.V" % datetime.date.today().year
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
|
||||
import elasticsearch
|
||||
|
||||
# The short X.Y version.
|
||||
version = elasticsearch.__versionstr__
|
||||
@@ -191,11 +181,11 @@ htmlhelp_basename = "Elasticsearchdoc"
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# 'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# 'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# 'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
# flake8: noqa
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import logging
|
||||
|
||||
@@ -281,7 +285,7 @@ class Elasticsearch(object):
|
||||
def ping(self, params=None, headers=None):
|
||||
"""
|
||||
Returns whether the cluster is running.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index.html>`_
|
||||
"""
|
||||
try:
|
||||
return self.transport.perform_request(
|
||||
@@ -294,7 +298,7 @@ class Elasticsearch(object):
|
||||
def info(self, params=None, headers=None):
|
||||
"""
|
||||
Returns basic information about the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/", params=params, headers=headers
|
||||
@@ -314,7 +318,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Creates a new document in the index. Returns a 409 response when a document
|
||||
with a same ID already exists in the index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: Document ID
|
||||
@@ -370,7 +374,7 @@ class Elasticsearch(object):
|
||||
def index(self, index, body, doc_type=None, id=None, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates a document in an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg body: The document
|
||||
@@ -433,7 +437,7 @@ class Elasticsearch(object):
|
||||
def bulk(self, body, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to perform multiple index/update/delete operations in a single request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-bulk.html>`_
|
||||
|
||||
:arg body: The operation definition and data (action-data
|
||||
pairs), separated by newlines
|
||||
@@ -479,7 +483,7 @@ class Elasticsearch(object):
|
||||
def clear_scroll(self, body=None, scroll_id=None, params=None, headers=None):
|
||||
"""
|
||||
Explicitly clears the search context for a scroll.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-request-body.html#_clear_scroll_api>`_
|
||||
|
||||
:arg body: A comma-separated list of scroll IDs to clear if none
|
||||
was specified via the scroll_id parameter
|
||||
@@ -515,7 +519,7 @@ class Elasticsearch(object):
|
||||
def count(self, body=None, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns number of documents matching a query.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-count.html>`_
|
||||
|
||||
:arg body: A query to restrict the results specified with the
|
||||
Query DSL (optional)
|
||||
@@ -572,7 +576,7 @@ class Elasticsearch(object):
|
||||
def delete(self, index, id, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Removes a document from the index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-delete.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -647,7 +651,7 @@ class Elasticsearch(object):
|
||||
def delete_by_query(self, index, body, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Deletes documents matching the provided query.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-delete-by-query.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
@@ -743,7 +747,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Changes the number of requests per second for a particular Delete By Query
|
||||
operation.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-delete-by-query.html>`_
|
||||
|
||||
:arg task_id: The task id to rethrottle
|
||||
:arg requests_per_second: The throttle to set on this request in
|
||||
@@ -763,7 +767,7 @@ class Elasticsearch(object):
|
||||
def delete_script(self, id, params=None, headers=None):
|
||||
"""
|
||||
Deletes a script.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting.html>`_
|
||||
|
||||
:arg id: Script ID
|
||||
:arg master_timeout: Specify timeout for connection to master
|
||||
@@ -791,7 +795,7 @@ class Elasticsearch(object):
|
||||
def exists(self, index, id, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a document exists in an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-get.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -841,7 +845,7 @@ class Elasticsearch(object):
|
||||
def exists_source(self, index, id, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a document source exists in an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-get.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -892,7 +896,7 @@ class Elasticsearch(object):
|
||||
def explain(self, index, id, body=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about why a specific matches (or doesn't match) a query.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-explain.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -946,7 +950,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Returns the information about the capabilities of fields among multiple
|
||||
indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-field-caps.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -981,7 +985,7 @@ class Elasticsearch(object):
|
||||
def get(self, index, id, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns a document.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-get.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -1021,7 +1025,7 @@ class Elasticsearch(object):
|
||||
def get_script(self, id, params=None, headers=None):
|
||||
"""
|
||||
Returns a script.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting.html>`_
|
||||
|
||||
:arg id: Script ID
|
||||
:arg master_timeout: Specify timeout for connection to master
|
||||
@@ -1047,7 +1051,7 @@ class Elasticsearch(object):
|
||||
def get_source(self, index, id, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns the source of a document.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-get.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: The document ID
|
||||
@@ -1097,7 +1101,7 @@ class Elasticsearch(object):
|
||||
def mget(self, body, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to get multiple documents in one request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-multi-get.html>`_
|
||||
|
||||
:arg body: Document identifiers; can be either `docs`
|
||||
(containing full document information) or `ids` (when index and type is
|
||||
@@ -1143,7 +1147,7 @@ class Elasticsearch(object):
|
||||
def msearch(self, body, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to execute several search operations in one request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-multi-search.html>`_
|
||||
|
||||
:arg body: The request definitions (metadata-search request
|
||||
definition pairs), separated by newlines
|
||||
@@ -1199,7 +1203,7 @@ class Elasticsearch(object):
|
||||
):
|
||||
"""
|
||||
Allows to execute several search template operations in one request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-multi-search.html>`_
|
||||
|
||||
:arg body: The request definitions (metadata-search request
|
||||
definition pairs), separated by newlines
|
||||
@@ -1251,7 +1255,7 @@ class Elasticsearch(object):
|
||||
):
|
||||
"""
|
||||
Returns multiple termvectors in one request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-multi-termvectors.html>`_
|
||||
|
||||
:arg body: Define ids, documents, parameters or a list of
|
||||
parameters per document here. You must at least provide a list of
|
||||
@@ -1302,7 +1306,7 @@ class Elasticsearch(object):
|
||||
def put_script(self, id, body, context=None, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates a script.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting.html>`_
|
||||
|
||||
:arg id: Script ID
|
||||
:arg body: The document
|
||||
@@ -1329,7 +1333,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Allows to evaluate the quality of ranked search results over a set of typical
|
||||
search queries
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-rank-eval.html>`_
|
||||
|
||||
:arg body: The ranking evaluation search definition, including
|
||||
search requests, document ratings and ranking metric definition.
|
||||
@@ -1372,7 +1376,7 @@ class Elasticsearch(object):
|
||||
Allows to copy documents from one index to another, optionally filtering the
|
||||
source documents by a query, changing the destination index settings, or
|
||||
fetching the documents from a remote cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-reindex.html>`_
|
||||
|
||||
:arg body: The search definition using the Query DSL and the
|
||||
prototype for the index request.
|
||||
@@ -1407,7 +1411,7 @@ class Elasticsearch(object):
|
||||
def reindex_rethrottle(self, task_id, params=None, headers=None):
|
||||
"""
|
||||
Changes the number of requests per second for a particular Reindex operation.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-reindex.html>`_
|
||||
|
||||
:arg task_id: The task id to rethrottle
|
||||
:arg requests_per_second: The throttle to set on this request in
|
||||
@@ -1427,7 +1431,7 @@ class Elasticsearch(object):
|
||||
def render_search_template(self, body=None, id=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to use the Mustache language to pre-render a search definition.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-template.html#_validating_templates>`_
|
||||
|
||||
:arg body: The search definition template and its params
|
||||
:arg id: The id of the stored search template
|
||||
@@ -1460,7 +1464,7 @@ class Elasticsearch(object):
|
||||
def scroll(self, body=None, scroll_id=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to retrieve a large numbers of results from a single search request.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-request-body.html#request-body-search-scroll>`_
|
||||
|
||||
:arg body: The scroll ID if not passed by URL or query
|
||||
parameter.
|
||||
@@ -1528,7 +1532,7 @@ class Elasticsearch(object):
|
||||
def search(self, body=None, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns results matching a query.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-search.html>`_
|
||||
|
||||
:arg body: The search definition using the Query DSL
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
@@ -1650,7 +1654,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Returns information about the indices and shards that a search request would be
|
||||
executed against.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-shards.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
@@ -1692,7 +1696,7 @@ class Elasticsearch(object):
|
||||
):
|
||||
"""
|
||||
Allows to use the Mustache language to pre-render a search definition.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-template.html>`_
|
||||
|
||||
:arg body: The search definition template and its params
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
@@ -1758,7 +1762,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Returns information and statistics about terms in the fields of a particular
|
||||
document.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-termvectors.html>`_
|
||||
|
||||
:arg index: The index in which the document resides.
|
||||
:arg body: Define parameters and or supply a document to get
|
||||
@@ -1818,7 +1822,7 @@ class Elasticsearch(object):
|
||||
def update(self, index, id, body, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Updates a document with a script or partial document.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-update.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg id: Document ID
|
||||
@@ -1912,7 +1916,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Performs an update on every document in the index without changing the source,
|
||||
for example to pick up a mapping change.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-update-by-query.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
@@ -2011,7 +2015,7 @@ class Elasticsearch(object):
|
||||
"""
|
||||
Changes the number of requests per second for a particular Update By Query
|
||||
operation.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-update-by-query.html>`_
|
||||
|
||||
:arg task_id: The task id to rethrottle
|
||||
:arg requests_per_second: The throttle to set on this request in
|
||||
@@ -2041,7 +2045,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_script_language", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, SKIP_IN_PATH, query_params, _make_path
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class AsyncSearchClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/async-search.html>`_
|
||||
|
||||
:arg id: The async search ID
|
||||
"""
|
||||
@@ -23,7 +27,7 @@ class AsyncSearchClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/async-search.html>`_
|
||||
|
||||
:arg id: The async search ID
|
||||
:arg keep_alive: Specify the time interval in which the results
|
||||
@@ -86,7 +90,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/async-search.html>`_
|
||||
|
||||
:arg body: The search definition using the Query DSL
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, SKIP_IN_PATH, _make_path
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class AutoscalingClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/autoscaling-get-autoscaling-decision.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_autoscaling/decision", params=params, headers=headers
|
||||
@@ -16,7 +20,7 @@ class AutoscalingClient(NamespacedClient):
|
||||
@query_params()
|
||||
def delete_autoscaling_policy(self, name, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/autoscaling-delete-autoscaling-policy.html>`_
|
||||
|
||||
:arg name: the name of the autoscaling policy
|
||||
"""
|
||||
@@ -33,7 +37,7 @@ class AutoscalingClient(NamespacedClient):
|
||||
@query_params()
|
||||
def get_autoscaling_policy(self, name, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/autoscaling-get-autoscaling-policy.html>`_
|
||||
|
||||
:arg name: the name of the autoscaling policy
|
||||
"""
|
||||
@@ -50,7 +54,7 @@ class AutoscalingClient(NamespacedClient):
|
||||
@query_params()
|
||||
def put_autoscaling_policy(self, name, body, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/autoscaling-put-autoscaling-policy.html>`_
|
||||
|
||||
:arg name: the name of the autoscaling policy
|
||||
:arg body: the specification of the autoscaling policy
|
||||
|
||||
+29
-25
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Shows information about currently configured aliases to indices including
|
||||
filter and routing infos.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-alias.html>`_
|
||||
|
||||
:arg name: A comma-separated list of alias names to return
|
||||
:arg expand_wildcards: Whether to expand wildcard expression to
|
||||
@@ -32,7 +36,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Provides a snapshot of how many shards are allocated to each data node and how
|
||||
much disk space they are using.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-allocation.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information
|
||||
@@ -62,7 +66,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Provides quick access to the document count of the entire cluster, or
|
||||
individual indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-count.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to limit the
|
||||
returned information
|
||||
@@ -82,7 +86,7 @@ class CatClient(NamespacedClient):
|
||||
def health(self, params=None, headers=None):
|
||||
"""
|
||||
Returns a concise representation of the cluster health.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-health.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -103,7 +107,7 @@ class CatClient(NamespacedClient):
|
||||
def help(self, params=None, headers=None):
|
||||
"""
|
||||
Returns help for the Cat APIs.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat.html>`_
|
||||
|
||||
:arg help: Return help information
|
||||
:arg s: Comma-separated list of column names or column aliases
|
||||
@@ -132,7 +136,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Returns information about indices: number of primaries and replicas, document
|
||||
counts, disk size, ...
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-indices.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to limit the
|
||||
returned information
|
||||
@@ -170,7 +174,7 @@ class CatClient(NamespacedClient):
|
||||
def master(self, params=None, headers=None):
|
||||
"""
|
||||
Returns information about the master node.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-master.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -203,7 +207,7 @@ class CatClient(NamespacedClient):
|
||||
def nodes(self, params=None, headers=None):
|
||||
"""
|
||||
Returns basic statistics about performance of cluster nodes.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-nodes.html>`_
|
||||
|
||||
:arg bytes: The unit in which to display byte values Valid
|
||||
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
|
||||
@@ -233,7 +237,7 @@ class CatClient(NamespacedClient):
|
||||
def recovery(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about index shard recoveries, both on-going completed.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-recovery.html>`_
|
||||
|
||||
:arg index: Comma-separated list or wildcard expression of index
|
||||
names to limit the returned information
|
||||
@@ -263,7 +267,7 @@ class CatClient(NamespacedClient):
|
||||
def shards(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Provides a detailed view of shard allocation on nodes.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-shards.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to limit the
|
||||
returned information
|
||||
@@ -291,7 +295,7 @@ class CatClient(NamespacedClient):
|
||||
def segments(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Provides low-level information about the segments in the shards of an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-segments.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to limit the
|
||||
returned information
|
||||
@@ -313,7 +317,7 @@ class CatClient(NamespacedClient):
|
||||
def pending_tasks(self, params=None, headers=None):
|
||||
"""
|
||||
Returns a concise representation of the cluster pending tasks.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-pending-tasks.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -338,7 +342,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Returns cluster-wide thread pool statistics per node. By default the active,
|
||||
queue and rejected statistics are returned for all thread pools.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-thread-pool.html>`_
|
||||
|
||||
:arg thread_pool_patterns: A comma-separated list of regular-
|
||||
expressions to filter the thread pools in the output
|
||||
@@ -368,7 +372,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Shows how much heap memory is currently being used by fielddata on every data
|
||||
node in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-fielddata.html>`_
|
||||
|
||||
:arg fields: A comma-separated list of fields to return in the
|
||||
output
|
||||
@@ -393,7 +397,7 @@ class CatClient(NamespacedClient):
|
||||
def plugins(self, params=None, headers=None):
|
||||
"""
|
||||
Returns information about installed plugins across nodes node.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-plugins.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -415,7 +419,7 @@ class CatClient(NamespacedClient):
|
||||
def nodeattrs(self, params=None, headers=None):
|
||||
"""
|
||||
Returns information about custom node attributes.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-nodeattrs.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -437,7 +441,7 @@ class CatClient(NamespacedClient):
|
||||
def repositories(self, params=None, headers=None):
|
||||
"""
|
||||
Returns information about snapshot repositories registered in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-repositories.html>`_
|
||||
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
yaml
|
||||
@@ -461,7 +465,7 @@ class CatClient(NamespacedClient):
|
||||
def snapshots(self, repository=None, params=None, headers=None):
|
||||
"""
|
||||
Returns all snapshots in a specific repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-snapshots.html>`_
|
||||
|
||||
:arg repository: Name of repository from which to fetch the
|
||||
snapshot information
|
||||
@@ -502,7 +506,7 @@ class CatClient(NamespacedClient):
|
||||
"""
|
||||
Returns information about the tasks currently executing on one or more nodes in
|
||||
the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||
|
||||
:arg actions: A comma-separated list of actions that should be
|
||||
returned. Leave empty to return all.
|
||||
@@ -531,7 +535,7 @@ class CatClient(NamespacedClient):
|
||||
def templates(self, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about existing templates.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-templates.html>`_
|
||||
|
||||
:arg name: A pattern that returned template names must match
|
||||
:arg format: a short version of the Accept header, e.g. json,
|
||||
@@ -554,7 +558,7 @@ class CatClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -583,7 +587,7 @@ class CatClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-datafeeds.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeeds stats to fetch
|
||||
:arg allow_no_datafeeds: Whether to ignore if a wildcard
|
||||
@@ -610,7 +614,7 @@ class CatClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-anomaly-detectors.html>`_
|
||||
|
||||
:arg job_id: The ID of the jobs stats to fetch
|
||||
:arg allow_no_jobs: Whether to ignore if a wildcard expression
|
||||
@@ -650,7 +654,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-trained-model.html>`_
|
||||
|
||||
:arg model_id: The ID of the trained models stats to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -688,7 +692,7 @@ class CatClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cat-transforms.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform for which to get
|
||||
stats. '_all' or '*' implies all transforms
|
||||
|
||||
+17
-13
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-delete-auto-follow-pattern.html>`_
|
||||
|
||||
:arg name: The name of the auto follow pattern.
|
||||
"""
|
||||
@@ -24,7 +28,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-put-follow.html>`_
|
||||
|
||||
:arg index: The name of the follower index
|
||||
:arg body: The name of the leader index and other optional ccr
|
||||
@@ -52,7 +56,7 @@ class CcrClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-get-follow-info.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index patterns; use `_all`
|
||||
to perform the operation on all indices
|
||||
@@ -69,7 +73,7 @@ class CcrClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-get-follow-stats.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index patterns; use `_all`
|
||||
to perform the operation on all indices
|
||||
@@ -85,7 +89,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-post-forget-follower.html>`_
|
||||
|
||||
:arg index: the name of the leader index for which specified
|
||||
follower retention leases should be removed
|
||||
@@ -111,7 +115,7 @@ class CcrClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-get-auto-follow-pattern.html>`_
|
||||
|
||||
:arg name: The name of the auto follow pattern.
|
||||
"""
|
||||
@@ -127,7 +131,7 @@ class CcrClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-post-pause-follow.html>`_
|
||||
|
||||
:arg index: The name of the follower index that should pause
|
||||
following its leader index.
|
||||
@@ -148,7 +152,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-put-auto-follow-pattern.html>`_
|
||||
|
||||
:arg name: The name of the auto follow pattern.
|
||||
:arg body: The specification of the auto follow pattern
|
||||
@@ -169,7 +173,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-post-resume-follow.html>`_
|
||||
|
||||
:arg index: The name of the follow index to resume following.
|
||||
:arg body: The name of the leader index and other optional ccr
|
||||
@@ -190,7 +194,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-get-stats.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_ccr/stats", params=params, headers=headers
|
||||
@@ -201,7 +205,7 @@ class CcrClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-post-unfollow.html>`_
|
||||
|
||||
:arg index: The name of the follower index that should be turned
|
||||
into a regular index.
|
||||
@@ -220,7 +224,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-pause-auto-follow-pattern.html>`_
|
||||
|
||||
:arg name: The name of the auto follow pattern that should pause
|
||||
discovering new indices to follow.
|
||||
@@ -239,7 +243,7 @@ class CcrClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ccr-resume-auto-follow-pattern.html>`_
|
||||
|
||||
:arg name: The name of the auto follow pattern to resume
|
||||
discovering new indices to follow.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -18,7 +22,7 @@ class ClusterClient(NamespacedClient):
|
||||
def health(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Returns basic information about the health of the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-health.html>`_
|
||||
|
||||
:arg index: Limit the information returned to a specific index
|
||||
:arg expand_wildcards: Whether to expand wildcard expression to
|
||||
@@ -57,7 +61,7 @@ class ClusterClient(NamespacedClient):
|
||||
"""
|
||||
Returns a list of any cluster-level changes (e.g. create index, update mapping,
|
||||
allocate or fail shard) which have not yet been executed.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-pending.html>`_
|
||||
|
||||
:arg local: Return local information, do not retrieve the state
|
||||
from master node (default: false)
|
||||
@@ -80,7 +84,7 @@ class ClusterClient(NamespacedClient):
|
||||
def state(self, metric=None, index=None, params=None, headers=None):
|
||||
"""
|
||||
Returns a comprehensive information about the state of the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-state.html>`_
|
||||
|
||||
:arg metric: Limit the information returned to the specified
|
||||
metrics Valid choices: _all, blocks, metadata, nodes, routing_table,
|
||||
@@ -119,7 +123,7 @@ class ClusterClient(NamespacedClient):
|
||||
def stats(self, node_id=None, params=None, headers=None):
|
||||
"""
|
||||
Returns high-level overview of cluster statistics.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-stats.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information; use `_local` to return information from
|
||||
@@ -144,7 +148,7 @@ class ClusterClient(NamespacedClient):
|
||||
def reroute(self, body=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to manually change the allocation of individual shards in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-reroute.html>`_
|
||||
|
||||
:arg body: The definition of `commands` to perform (`move`,
|
||||
`cancel`, `allocate`)
|
||||
@@ -169,7 +173,7 @@ class ClusterClient(NamespacedClient):
|
||||
def get_settings(self, params=None, headers=None):
|
||||
"""
|
||||
Returns cluster settings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-update-settings.html>`_
|
||||
|
||||
:arg flat_settings: Return settings in flat format (default:
|
||||
false)
|
||||
@@ -187,7 +191,7 @@ class ClusterClient(NamespacedClient):
|
||||
def put_settings(self, body, params=None, headers=None):
|
||||
"""
|
||||
Updates the cluster settings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-update-settings.html>`_
|
||||
|
||||
:arg body: The settings to be updated. Can be either `transient`
|
||||
or `persistent` (survives cluster restart).
|
||||
@@ -208,7 +212,7 @@ class ClusterClient(NamespacedClient):
|
||||
def remote_info(self, params=None, headers=None):
|
||||
"""
|
||||
Returns the information about configured remote clusters.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-remote-info.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_remote/info", params=params, headers=headers
|
||||
@@ -218,7 +222,7 @@ class ClusterClient(NamespacedClient):
|
||||
def allocation_explain(self, body=None, params=None, headers=None):
|
||||
"""
|
||||
Provides explanations for shard allocations in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-allocation-explain.html>`_
|
||||
|
||||
:arg body: The index, shard, and primary flag to explain. Empty
|
||||
means 'explain the first unassigned shard'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class EnrichClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-enrich-policy-api.html>`_
|
||||
|
||||
:arg name: The name of the enrich policy
|
||||
"""
|
||||
@@ -24,7 +28,7 @@ class EnrichClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/execute-enrich-policy-api.html>`_
|
||||
|
||||
:arg name: The name of the enrich policy
|
||||
:arg wait_for_completion: Should the request should block until
|
||||
@@ -44,7 +48,7 @@ class EnrichClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-enrich-policy-api.html>`_
|
||||
|
||||
:arg name: A comma-separated list of enrich policy names
|
||||
"""
|
||||
@@ -56,7 +60,7 @@ class EnrichClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-enrich-policy-api.html>`_
|
||||
|
||||
:arg name: The name of the enrich policy
|
||||
:arg body: The enrich policy to register
|
||||
@@ -78,7 +82,7 @@ class EnrichClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/enrich-stats-api.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_enrich/_stats", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, SKIP_IN_PATH, query_params, _make_path
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class EqlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/eql.html>`_
|
||||
|
||||
:arg index: The name of the index to scope the operation
|
||||
:arg body: Eql request body. Use the `query` to limit the query
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class GraphClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/graph-explore-api.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
|
||||
+14
-10
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class IlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-delete-lifecycle.html>`_
|
||||
|
||||
:arg policy: The name of the index lifecycle policy
|
||||
"""
|
||||
@@ -26,7 +30,7 @@ class IlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-explain-lifecycle.html>`_
|
||||
|
||||
:arg index: The name of the index to explain
|
||||
:arg only_errors: filters the indices included in the response
|
||||
@@ -46,7 +50,7 @@ class IlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-get-lifecycle.html>`_
|
||||
|
||||
:arg policy: The name of the index lifecycle policy
|
||||
"""
|
||||
@@ -58,7 +62,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-get-status.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_ilm/status", params=params, headers=headers
|
||||
@@ -68,7 +72,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-move-to-step.html>`_
|
||||
|
||||
:arg index: The name of the index whose lifecycle step is to
|
||||
change
|
||||
@@ -89,7 +93,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-put-lifecycle.html>`_
|
||||
|
||||
:arg policy: The name of the index lifecycle policy
|
||||
:arg body: The lifecycle policy definition to register
|
||||
@@ -109,7 +113,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-remove-policy.html>`_
|
||||
|
||||
:arg index: The name of the index to remove policy on
|
||||
"""
|
||||
@@ -124,7 +128,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-retry-policy.html>`_
|
||||
|
||||
:arg index: The name of the indices (comma-separated) whose
|
||||
failed lifecycle step is to be retry
|
||||
@@ -140,7 +144,7 @@ class IlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-start.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_ilm/start", params=params, headers=headers
|
||||
@@ -151,7 +155,7 @@ class IlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-stop.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_ilm/stop", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
Performs the analysis process on a text and return the tokens breakdown of the
|
||||
text.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-analyze.html>`_
|
||||
|
||||
:arg body: Define analyzer/tokenizer parameters and the text on
|
||||
which the analysis should be performed
|
||||
@@ -25,7 +29,7 @@ class IndicesClient(NamespacedClient):
|
||||
def refresh(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Performs the refresh operation in one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-refresh.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -52,7 +56,7 @@ class IndicesClient(NamespacedClient):
|
||||
def flush(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Performs the flush operation on one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-flush.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string for all indices
|
||||
@@ -88,7 +92,7 @@ class IndicesClient(NamespacedClient):
|
||||
def create(self, index, body=None, params=None, headers=None):
|
||||
"""
|
||||
Creates an index with optional settings and mappings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-create-index.html>`_
|
||||
|
||||
:arg index: The name of the index
|
||||
:arg body: The configuration for the index (`settings` and
|
||||
@@ -113,7 +117,7 @@ class IndicesClient(NamespacedClient):
|
||||
def clone(self, index, target, body=None, params=None, headers=None):
|
||||
"""
|
||||
Clones an index
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-clone-index.html>`_
|
||||
|
||||
:arg index: The name of the source index to clone
|
||||
:arg target: The name of the target index to clone into
|
||||
@@ -149,7 +153,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get(self, index, params=None, headers=None):
|
||||
"""
|
||||
Returns information about one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-get-index.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names
|
||||
:arg allow_no_indices: Ignore if a wildcard expression resolves
|
||||
@@ -187,7 +191,7 @@ class IndicesClient(NamespacedClient):
|
||||
def open(self, index, params=None, headers=None):
|
||||
"""
|
||||
Opens an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-open-close.html>`_
|
||||
|
||||
:arg index: A comma separated list of indices to open
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indices
|
||||
@@ -221,7 +225,7 @@ class IndicesClient(NamespacedClient):
|
||||
def close(self, index, params=None, headers=None):
|
||||
"""
|
||||
Closes an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-open-close.html>`_
|
||||
|
||||
:arg index: A comma separated list of indices to close
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indices
|
||||
@@ -254,7 +258,7 @@ class IndicesClient(NamespacedClient):
|
||||
def delete(self, index, params=None, headers=None):
|
||||
"""
|
||||
Deletes an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-delete-index.html>`_
|
||||
|
||||
:arg index: A comma-separated list of indices to delete; use
|
||||
`_all` or `*` string to delete all indices
|
||||
@@ -286,7 +290,7 @@ class IndicesClient(NamespacedClient):
|
||||
def exists(self, index, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a particular index exists.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-exists.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names
|
||||
:arg allow_no_indices: Ignore if a wildcard expression resolves
|
||||
@@ -315,7 +319,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
Returns information about whether a particular document type exists.
|
||||
(DEPRECATED)
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-types-exists.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` to
|
||||
check the types across all indices
|
||||
@@ -353,7 +357,7 @@ class IndicesClient(NamespacedClient):
|
||||
def put_mapping(self, body, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Updates the index mappings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-put-mapping.html>`_
|
||||
|
||||
:arg body: The mapping definition
|
||||
:arg index: A comma-separated list of index names the mapping
|
||||
@@ -398,7 +402,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_mapping(self, index=None, doc_type=None, params=None, headers=None):
|
||||
"""
|
||||
Returns mappings for one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-get-mapping.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names
|
||||
:arg doc_type: A comma-separated list of document types
|
||||
@@ -436,7 +440,7 @@ class IndicesClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Returns mapping for one or more fields.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-get-field-mapping.html>`_
|
||||
|
||||
:arg fields: A comma-separated list of fields
|
||||
:arg index: A comma-separated list of index names
|
||||
@@ -470,7 +474,7 @@ class IndicesClient(NamespacedClient):
|
||||
def put_alias(self, index, name, body=None, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates an alias.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-aliases.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names the alias
|
||||
should point to (supports wildcards); use `_all` to perform the
|
||||
@@ -497,7 +501,7 @@ class IndicesClient(NamespacedClient):
|
||||
def exists_alias(self, name, index=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a particular alias exists.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-aliases.html>`_
|
||||
|
||||
:arg name: A comma-separated list of alias names to return
|
||||
:arg index: A comma-separated list of index names to filter
|
||||
@@ -524,7 +528,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_alias(self, index=None, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns an alias.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-aliases.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to filter
|
||||
aliases
|
||||
@@ -548,7 +552,7 @@ class IndicesClient(NamespacedClient):
|
||||
def update_aliases(self, body, params=None, headers=None):
|
||||
"""
|
||||
Updates index aliases.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-aliases.html>`_
|
||||
|
||||
:arg body: The definition of `actions` to perform
|
||||
:arg master_timeout: Specify timeout for connection to master
|
||||
@@ -565,7 +569,7 @@ class IndicesClient(NamespacedClient):
|
||||
def delete_alias(self, index, name, params=None, headers=None):
|
||||
"""
|
||||
Deletes an alias.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-aliases.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names (supports
|
||||
wildcards); use `_all` for all indices
|
||||
@@ -586,7 +590,7 @@ class IndicesClient(NamespacedClient):
|
||||
def put_template(self, name, body, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The name of the template
|
||||
:arg body: The template definition
|
||||
@@ -615,7 +619,7 @@ class IndicesClient(NamespacedClient):
|
||||
def exists_template(self, name, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a particular index template exists.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The comma separated names of the index templates
|
||||
:arg flat_settings: Return settings in flat format (default:
|
||||
@@ -636,7 +640,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_template(self, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The comma separated names of the index templates
|
||||
:arg flat_settings: Return settings in flat format (default:
|
||||
@@ -656,7 +660,7 @@ class IndicesClient(NamespacedClient):
|
||||
def delete_template(self, name, params=None, headers=None):
|
||||
"""
|
||||
Deletes an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The name of the template
|
||||
:arg master_timeout: Specify timeout for connection to master
|
||||
@@ -681,7 +685,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_settings(self, index=None, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns settings for one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-get-settings.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -718,7 +722,7 @@ class IndicesClient(NamespacedClient):
|
||||
def put_settings(self, body, index=None, params=None, headers=None):
|
||||
"""
|
||||
Updates the index settings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-update-settings.html>`_
|
||||
|
||||
:arg body: The index settings to be updated
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
@@ -765,7 +769,7 @@ class IndicesClient(NamespacedClient):
|
||||
def stats(self, index=None, metric=None, params=None, headers=None):
|
||||
"""
|
||||
Provides statistics on operations happening in an index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-stats.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -808,7 +812,7 @@ class IndicesClient(NamespacedClient):
|
||||
def segments(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Provides low-level information about segments in a Lucene index.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-segments.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -845,7 +849,7 @@ class IndicesClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Allows a user to validate a potentially expensive query without executing it.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-validate.html>`_
|
||||
|
||||
:arg body: The query definition specified with the Query DSL
|
||||
:arg index: A comma-separated list of index names to restrict
|
||||
@@ -898,7 +902,7 @@ class IndicesClient(NamespacedClient):
|
||||
def clear_cache(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Clears all or specific caches for one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-clearcache.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index name to limit the
|
||||
operation
|
||||
@@ -924,7 +928,7 @@ class IndicesClient(NamespacedClient):
|
||||
def recovery(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about ongoing index shard recoveries.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-recovery.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -947,7 +951,7 @@ class IndicesClient(NamespacedClient):
|
||||
def upgrade(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
The _upgrade API is no longer useful and will be removed.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -972,7 +976,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_upgrade(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
The _upgrade API is no longer useful and will be removed.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-upgrade.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -994,7 +998,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
Performs a synced flush operation on one or more indices. Synced flush is
|
||||
deprecated and will be removed in 8.0. Use flush instead
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-synced-flush-api.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string for all indices
|
||||
@@ -1020,7 +1024,7 @@ class IndicesClient(NamespacedClient):
|
||||
def shard_stores(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Provides store information for shard copies of indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-shards-stores.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -1051,7 +1055,7 @@ class IndicesClient(NamespacedClient):
|
||||
def forcemerge(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
Performs the force merge operation on one or more indices.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-forcemerge.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names; use `_all` or
|
||||
empty string to perform the operation on all indices
|
||||
@@ -1080,7 +1084,7 @@ class IndicesClient(NamespacedClient):
|
||||
def shrink(self, index, target, body=None, params=None, headers=None):
|
||||
"""
|
||||
Allow to shrink an existing index into a new index with fewer primary shards.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-shrink-index.html>`_
|
||||
|
||||
:arg index: The name of the source index to shrink
|
||||
:arg target: The name of the target index to shrink into
|
||||
@@ -1112,7 +1116,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
Allows you to split an existing index into a new index with more primary
|
||||
shards.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-split-index.html>`_
|
||||
|
||||
:arg index: The name of the source index to split
|
||||
:arg target: The name of the target index to split into
|
||||
@@ -1149,7 +1153,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
Updates an alias to point to a new index when the existing index is considered
|
||||
to be too large or too old.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-rollover-index.html>`_
|
||||
|
||||
:arg alias: The name of the alias to rollover
|
||||
:arg body: The conditions that needs to be met for executing
|
||||
@@ -1191,7 +1195,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/freeze-index-api.html>`_
|
||||
|
||||
:arg index: The name of the index to freeze
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indices
|
||||
@@ -1226,7 +1230,7 @@ class IndicesClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/unfreeze-index-api.html>`_
|
||||
|
||||
:arg index: The name of the index to unfreeze
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indices
|
||||
@@ -1253,7 +1257,7 @@ class IndicesClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-reload-analyzers.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names to reload
|
||||
analyzers for
|
||||
@@ -1280,7 +1284,7 @@ class IndicesClient(NamespacedClient):
|
||||
def create_data_stream(self, name, body, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates a data stream
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/data-streams.html>`_
|
||||
|
||||
:arg name: The name of the data stream
|
||||
:arg body: The data stream definition
|
||||
@@ -1301,7 +1305,7 @@ class IndicesClient(NamespacedClient):
|
||||
def delete_data_stream(self, name, params=None, headers=None):
|
||||
"""
|
||||
Deletes a data stream.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/data-streams.html>`_
|
||||
|
||||
:arg name: The name of the data stream
|
||||
"""
|
||||
@@ -1316,7 +1320,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_data_streams(self, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns data streams.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/data-streams.html>`_
|
||||
|
||||
:arg name: The name or wildcard expression of the requested data
|
||||
streams
|
||||
@@ -1329,7 +1333,7 @@ class IndicesClient(NamespacedClient):
|
||||
def delete_index_template(self, name, params=None, headers=None):
|
||||
"""
|
||||
Deletes an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The name of the template
|
||||
:arg master_timeout: Specify timeout for connection to master
|
||||
@@ -1349,7 +1353,7 @@ class IndicesClient(NamespacedClient):
|
||||
def exists_index_template(self, name, params=None, headers=None):
|
||||
"""
|
||||
Returns information about whether a particular index template exists.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The name of the template
|
||||
:arg flat_settings: Return settings in flat format (default:
|
||||
@@ -1370,7 +1374,7 @@ class IndicesClient(NamespacedClient):
|
||||
def get_index_template(self, name=None, params=None, headers=None):
|
||||
"""
|
||||
Returns an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The comma separated names of the index templates
|
||||
:arg flat_settings: Return settings in flat format (default:
|
||||
@@ -1388,7 +1392,7 @@ class IndicesClient(NamespacedClient):
|
||||
def put_index_template(self, name, body, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates an index template.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates.html>`_
|
||||
|
||||
:arg name: The name of the template
|
||||
:arg body: The template definition
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class IngestClient(NamespacedClient):
|
||||
def get_pipeline(self, id=None, params=None, headers=None):
|
||||
"""
|
||||
Returns a pipeline.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-pipeline-api.html>`_
|
||||
|
||||
:arg id: Comma separated list of pipeline ids. Wildcards
|
||||
supported
|
||||
@@ -21,7 +25,7 @@ class IngestClient(NamespacedClient):
|
||||
def put_pipeline(self, id, body, params=None, headers=None):
|
||||
"""
|
||||
Creates or updates a pipeline.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-pipeline-api.html>`_
|
||||
|
||||
:arg id: Pipeline ID
|
||||
:arg body: The ingest definition
|
||||
@@ -45,7 +49,7 @@ class IngestClient(NamespacedClient):
|
||||
def delete_pipeline(self, id, params=None, headers=None):
|
||||
"""
|
||||
Deletes a pipeline.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-pipeline-api.html>`_
|
||||
|
||||
:arg id: Pipeline ID
|
||||
:arg master_timeout: Explicit operation timeout for connection
|
||||
@@ -66,7 +70,7 @@ class IngestClient(NamespacedClient):
|
||||
def simulate(self, body, id=None, params=None, headers=None):
|
||||
"""
|
||||
Allows to simulate a pipeline with example documents.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/simulate-pipeline-api.html>`_
|
||||
|
||||
:arg body: The simulate definition
|
||||
:arg id: Pipeline ID
|
||||
@@ -88,7 +92,7 @@ class IngestClient(NamespacedClient):
|
||||
def processor_grok(self, params=None, headers=None):
|
||||
"""
|
||||
Returns a list of the built-in patterns.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/grok-processor.html#grok-processor-rest-get>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_ingest/processor/grok", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-license.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"DELETE", "/_license", params=params, headers=headers
|
||||
@@ -16,7 +20,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-license.html>`_
|
||||
|
||||
:arg accept_enterprise: If the active license is an enterprise
|
||||
license, return type as 'enterprise' (default: false)
|
||||
@@ -31,7 +35,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-basic-status.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_license/basic_status", params=params, headers=headers
|
||||
@@ -41,7 +45,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-trial-status.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_license/trial_status", params=params, headers=headers
|
||||
@@ -51,7 +55,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/update-license.html>`_
|
||||
|
||||
:arg body: licenses to be installed
|
||||
:arg acknowledge: whether the user has acknowledged acknowledge
|
||||
@@ -65,7 +69,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/start-basic.html>`_
|
||||
|
||||
:arg acknowledge: whether the user has acknowledged acknowledge
|
||||
messages (default: false)
|
||||
@@ -78,7 +82,7 @@ class LicenseClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/start-trial.html>`_
|
||||
|
||||
:arg acknowledge: whether the user has acknowledged acknowledge
|
||||
messages (default: false)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path
|
||||
|
||||
|
||||
@@ -8,7 +12,7 @@ class MigrationClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/migration-api-deprecation.html>`_
|
||||
|
||||
:arg index: Index pattern
|
||||
"""
|
||||
|
||||
+61
-57
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH, _bulk_body
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class MlClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-close-job.html>`_
|
||||
|
||||
:arg job_id: The name of the job to close
|
||||
:arg body: The URL params optionally sent in the body
|
||||
@@ -33,7 +37,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-calendar.html>`_
|
||||
|
||||
:arg calendar_id: The ID of the calendar to delete
|
||||
"""
|
||||
@@ -53,7 +57,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/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
|
||||
@@ -73,7 +77,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/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
|
||||
@@ -93,7 +97,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to delete
|
||||
:arg force: True if the datafeed should be forcefully deleted
|
||||
@@ -114,7 +118,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-expired-data.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"DELETE", "/_ml/_delete_expired_data", params=params, headers=headers
|
||||
@@ -124,7 +128,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-filter.html>`_
|
||||
|
||||
:arg filter_id: The ID of the filter to delete
|
||||
"""
|
||||
@@ -142,7 +146,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-forecast.html>`_
|
||||
|
||||
:arg job_id: The ID of the job from which to delete forecasts
|
||||
:arg forecast_id: The ID of the forecast to delete, can be comma
|
||||
@@ -166,7 +170,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-job.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to delete
|
||||
:arg force: True if the job should be forcefully deleted
|
||||
@@ -187,7 +191,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-delete-snapshot.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to fetch
|
||||
:arg snapshot_id: The ID of the snapshot to delete
|
||||
@@ -225,7 +229,7 @@ class MlClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-find-file-structure.html>`_
|
||||
|
||||
:arg body: The contents of the file to be analyzed
|
||||
:arg charset: Optional parameter to specify the character set of
|
||||
@@ -276,7 +280,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-flush-job.html>`_
|
||||
|
||||
:arg job_id: The name of the job to flush
|
||||
:arg body: Flush parameters
|
||||
@@ -306,7 +310,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-forecast.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to forecast for
|
||||
:arg duration: The duration of the forecast
|
||||
@@ -337,7 +341,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-bucket.html>`_
|
||||
|
||||
:arg job_id: ID of the job to get bucket results from
|
||||
:arg body: Bucket selection details if not provided in URI
|
||||
@@ -374,7 +378,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-calendar-event.html>`_
|
||||
|
||||
:arg calendar_id: The ID of the calendar containing the events
|
||||
:arg end: Get events before this time
|
||||
@@ -404,7 +408,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-calendar.html>`_
|
||||
|
||||
:arg body: The from and size parameters optionally sent in the
|
||||
body
|
||||
@@ -430,7 +434,7 @@ class MlClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Retrieves anomaly detection job results for one or more categories.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-category.html>`_
|
||||
|
||||
:arg job_id: The name of the job
|
||||
:arg body: Category selection details if not provided in URI
|
||||
@@ -460,7 +464,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-datafeed-stats.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeeds stats to fetch
|
||||
:arg allow_no_datafeeds: Whether to ignore if a wildcard
|
||||
@@ -478,7 +482,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeeds to fetch
|
||||
:arg allow_no_datafeeds: Whether to ignore if a wildcard
|
||||
@@ -496,7 +500,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-filter.html>`_
|
||||
|
||||
:arg filter_id: The ID of the filter to fetch
|
||||
:arg from_: skips a number of filters
|
||||
@@ -526,7 +530,7 @@ 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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-influencer.html>`_
|
||||
|
||||
:arg job_id: Identifier for the anomaly detection job
|
||||
:arg body: Influencer selection criteria
|
||||
@@ -560,7 +564,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-job-stats.html>`_
|
||||
|
||||
:arg job_id: The ID of the jobs stats to fetch
|
||||
:arg allow_no_jobs: Whether to ignore if a wildcard expression
|
||||
@@ -578,7 +582,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-job.html>`_
|
||||
|
||||
:arg job_id: The ID of the jobs to fetch
|
||||
:arg allow_no_jobs: Whether to ignore if a wildcard expression
|
||||
@@ -598,7 +602,7 @@ class MlClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Retrieves information about model snapshots.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-snapshot.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to fetch
|
||||
:arg body: Model snapshot selection criteria
|
||||
@@ -642,7 +646,7 @@ class MlClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-overall-buckets.html>`_
|
||||
|
||||
:arg job_id: The job IDs for which to calculate overall bucket
|
||||
results
|
||||
@@ -690,7 +694,7 @@ 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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-get-record.html>`_
|
||||
|
||||
:arg job_id: The ID of the job
|
||||
:arg body: Record selection criteria
|
||||
@@ -723,7 +727,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-ml-info.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_ml/info", params=params, headers=headers
|
||||
@@ -733,7 +737,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-open-job.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to open
|
||||
"""
|
||||
@@ -751,7 +755,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-post-calendar-event.html>`_
|
||||
|
||||
:arg calendar_id: The ID of the calendar to modify
|
||||
:arg body: A list of events
|
||||
@@ -772,7 +776,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-post-data.html>`_
|
||||
|
||||
:arg job_id: The name of the job receiving the data
|
||||
:arg body: The data to process
|
||||
@@ -798,7 +802,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-preview-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to preview
|
||||
"""
|
||||
@@ -818,7 +822,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-put-calendar.html>`_
|
||||
|
||||
:arg calendar_id: The ID of the calendar to create
|
||||
:arg body: The calendar details
|
||||
@@ -840,7 +844,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/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
|
||||
@@ -862,7 +866,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-put-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to create
|
||||
:arg body: The datafeed config
|
||||
@@ -892,7 +896,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-put-filter.html>`_
|
||||
|
||||
:arg filter_id: The ID of the filter to create
|
||||
:arg body: The filter details
|
||||
@@ -913,7 +917,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-put-job.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to create
|
||||
:arg body: The job
|
||||
@@ -936,7 +940,7 @@ class MlClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Reverts to a specific snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-revert-snapshot.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to fetch
|
||||
:arg snapshot_id: The ID of the snapshot to revert to
|
||||
@@ -968,7 +972,7 @@ class MlClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-set-upgrade-mode.html>`_
|
||||
|
||||
:arg enabled: Whether to enable upgrade_mode ML setting or not.
|
||||
Defaults to false.
|
||||
@@ -983,7 +987,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-start-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to start
|
||||
:arg body: The start datafeed parameters
|
||||
@@ -1010,7 +1014,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-stop-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to stop
|
||||
:arg allow_no_datafeeds: Whether to ignore if a wildcard
|
||||
@@ -1038,7 +1042,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-update-datafeed.html>`_
|
||||
|
||||
:arg datafeed_id: The ID of the datafeed to update
|
||||
:arg body: The datafeed update settings
|
||||
@@ -1068,7 +1072,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-update-filter.html>`_
|
||||
|
||||
:arg filter_id: The ID of the filter to update
|
||||
:arg body: The filter update
|
||||
@@ -1089,7 +1093,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-update-job.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to create
|
||||
:arg body: The job update settings
|
||||
@@ -1112,7 +1116,7 @@ class MlClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Updates certain properties of a snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-update-snapshot.html>`_
|
||||
|
||||
:arg job_id: The ID of the job to fetch
|
||||
:arg snapshot_id: The ID of the snapshot to update
|
||||
@@ -1177,7 +1181,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to delete
|
||||
:arg force: True if the job should be forcefully deleted
|
||||
@@ -1196,7 +1200,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/evaluate-dfanalytics.html>`_
|
||||
|
||||
:arg body: The evaluation definition
|
||||
"""
|
||||
@@ -1215,7 +1219,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -1240,7 +1244,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-dfanalytics-stats.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics stats to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -1265,7 +1269,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to create
|
||||
:arg body: The data frame analytics configuration
|
||||
@@ -1286,7 +1290,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/start-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to start
|
||||
:arg body: The start data frame analytics parameters
|
||||
@@ -1308,7 +1312,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/stop-dfanalytics.html>`_
|
||||
|
||||
:arg id: The ID of the data frame analytics to stop
|
||||
:arg body: The stop data frame analytics parameters
|
||||
@@ -1336,7 +1340,7 @@ class MlClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-inference.html>`_
|
||||
|
||||
:arg model_id: The ID of the trained model to delete
|
||||
"""
|
||||
@@ -1356,7 +1360,7 @@ class MlClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Explains a data frame analytics config.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/explain-dfanalytics.html>`_
|
||||
|
||||
:arg body: The data frame analytics config to explain
|
||||
:arg id: The ID of the data frame analytics to explain
|
||||
@@ -1380,7 +1384,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-inference.html>`_
|
||||
|
||||
:arg model_id: The ID of the trained models to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -1413,7 +1417,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-inference-stats.html>`_
|
||||
|
||||
:arg model_id: The ID of the trained models stats to fetch
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -1438,7 +1442,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-inference.html>`_
|
||||
|
||||
:arg model_id: The ID of the trained models to store
|
||||
:arg body: The trained model configuration
|
||||
@@ -1459,7 +1463,7 @@ class MlClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-apis.html>`_
|
||||
|
||||
:arg body: The analysis config, plus cardinality estimates for
|
||||
fields it references
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH, _bulk_body
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class MonitoringClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/monitor-elasticsearch-cluster.html>`_
|
||||
|
||||
:arg body: The operation definition and data (action-data
|
||||
pairs), separated by newlines
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path
|
||||
|
||||
|
||||
@@ -8,7 +12,7 @@ class NodesClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Reloads secure settings.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/secure-settings.html#reloadable-secure-settings>`_
|
||||
|
||||
:arg body: An object containing the password for the
|
||||
elasticsearch keystore
|
||||
@@ -29,7 +33,7 @@ class NodesClient(NamespacedClient):
|
||||
def info(self, node_id=None, metric=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about nodes in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-info.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information; use `_local` to return information from
|
||||
@@ -61,7 +65,7 @@ class NodesClient(NamespacedClient):
|
||||
):
|
||||
"""
|
||||
Returns statistical information about nodes in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-stats.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information; use `_local` to return information from
|
||||
@@ -105,7 +109,7 @@ class NodesClient(NamespacedClient):
|
||||
def hot_threads(self, node_id=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about hot threads on each node in the cluster.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-hot-threads.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information; use `_local` to return information from
|
||||
@@ -138,7 +142,7 @@ class NodesClient(NamespacedClient):
|
||||
def usage(self, node_id=None, metric=None, params=None, headers=None):
|
||||
"""
|
||||
Returns low-level information about REST actions usage on nodes.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-usage.html>`_
|
||||
|
||||
:arg node_id: A comma-separated list of node IDs or names to
|
||||
limit the returned information; use `_local` to return information from
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-delete-job.html>`_
|
||||
|
||||
:arg id: The ID of the job to delete
|
||||
"""
|
||||
@@ -21,7 +25,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-get-job.html>`_
|
||||
|
||||
:arg id: The ID of the job(s) to fetch. Accepts glob patterns,
|
||||
or left blank for all jobs
|
||||
@@ -35,7 +39,7 @@ class RollupClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-get-rollup-caps.html>`_
|
||||
|
||||
:arg id: The ID of the index to check rollup capabilities on, or
|
||||
left blank for all jobs
|
||||
@@ -49,7 +53,7 @@ class RollupClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-get-rollup-index-caps.html>`_
|
||||
|
||||
:arg index: The rollup index or index pattern to obtain rollup
|
||||
capabilities from.
|
||||
@@ -65,7 +69,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-put-job.html>`_
|
||||
|
||||
:arg id: The ID of the job to create
|
||||
:arg body: The job configuration
|
||||
@@ -86,7 +90,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-search.html>`_
|
||||
|
||||
:arg index: The indices or index-pattern(s) (containing rollup
|
||||
or regular data) that should be searched
|
||||
@@ -113,7 +117,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-start-job.html>`_
|
||||
|
||||
:arg id: The ID of the job to start
|
||||
"""
|
||||
@@ -131,7 +135,7 @@ class RollupClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-stop-job.html>`_
|
||||
|
||||
:arg id: The ID of the job to stop
|
||||
:arg timeout: Block for (at maximum) the specified duration
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -5,7 +9,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
||||
@query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable")
|
||||
def clear_cache(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-clear-cache.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/searchable-snapshots-api-clear-cache.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index name to limit the
|
||||
operation
|
||||
@@ -55,7 +59,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
||||
@query_params()
|
||||
def repository_stats(self, repository, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-repository-stats.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/searchable-snapshots-repository-stats.html>`_
|
||||
|
||||
:arg repository: The repository for which to get the stats for
|
||||
"""
|
||||
@@ -72,7 +76,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
||||
@query_params()
|
||||
def stats(self, index=None, params=None, headers=None):
|
||||
"""
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-stats.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/searchable-snapshots-api-stats.html>`_
|
||||
|
||||
:arg index: A comma-separated list of index names
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class SecurityClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-authenticate.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_security/_authenticate", params=params, headers=headers
|
||||
@@ -17,7 +21,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-change-password.html>`_
|
||||
|
||||
:arg body: the new password for the user
|
||||
:arg username: The username of the user to change the password
|
||||
@@ -43,7 +47,7 @@ class SecurityClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-clear-cache.html>`_
|
||||
|
||||
:arg realms: Comma-separated list of realms to clear
|
||||
:arg usernames: Comma-separated list of usernames to clear from
|
||||
@@ -63,7 +67,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-clear-role-cache.html>`_
|
||||
|
||||
:arg name: Role name
|
||||
"""
|
||||
@@ -81,7 +85,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html>`_
|
||||
|
||||
:arg body: The api key request to create an API key
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -100,7 +104,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-delete-privilege.html>`_
|
||||
|
||||
:arg application: Application name
|
||||
:arg name: Privilege name
|
||||
@@ -124,7 +128,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-delete-role.html>`_
|
||||
|
||||
:arg name: Role name
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -146,7 +150,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-delete-role-mapping.html>`_
|
||||
|
||||
:arg name: Role-mapping name
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -168,7 +172,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-delete-user.html>`_
|
||||
|
||||
:arg username: username
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -190,7 +194,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-disable-user.html>`_
|
||||
|
||||
:arg username: The username of the user to disable
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -212,7 +216,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-enable-user.html>`_
|
||||
|
||||
:arg username: The username of the user to enable
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -234,7 +238,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-api-key.html>`_
|
||||
|
||||
:arg id: API key id of the API key to be retrieved
|
||||
:arg name: API key name of the API key to be retrieved
|
||||
@@ -253,7 +257,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-privileges.html>`_
|
||||
|
||||
:arg application: Application name
|
||||
:arg name: Privilege name
|
||||
@@ -269,7 +273,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-role.html>`_
|
||||
|
||||
:arg name: Role name
|
||||
"""
|
||||
@@ -281,7 +285,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-role-mapping.html>`_
|
||||
|
||||
:arg name: Role-Mapping name
|
||||
"""
|
||||
@@ -296,7 +300,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-token.html>`_
|
||||
|
||||
:arg body: The token request to get
|
||||
"""
|
||||
@@ -311,7 +315,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-user.html>`_
|
||||
|
||||
:arg username: A comma-separated list of usernames
|
||||
"""
|
||||
@@ -326,7 +330,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-privileges.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_security/user/_privileges", params=params, headers=headers
|
||||
@@ -336,7 +340,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-has-privileges.html>`_
|
||||
|
||||
:arg body: The privileges to test
|
||||
:arg user: Username
|
||||
@@ -356,7 +360,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-invalidate-api-key.html>`_
|
||||
|
||||
:arg body: The api key request to invalidate API key(s)
|
||||
"""
|
||||
@@ -371,7 +375,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-invalidate-token.html>`_
|
||||
|
||||
:arg body: The token to invalidate
|
||||
"""
|
||||
@@ -390,7 +394,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-put-privileges.html>`_
|
||||
|
||||
:arg body: The privilege(s) to add
|
||||
:arg refresh: If `true` (the default) then refresh the affected
|
||||
@@ -409,7 +413,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-put-role.html>`_
|
||||
|
||||
:arg name: Role name
|
||||
:arg body: The role to add
|
||||
@@ -434,7 +438,7 @@ class SecurityClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-put-role-mapping.html>`_
|
||||
|
||||
:arg name: Role-mapping name
|
||||
:arg body: The role mapping to add
|
||||
@@ -460,7 +464,7 @@ class SecurityClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-put-user.html>`_
|
||||
|
||||
:arg username: The username of the User
|
||||
:arg body: The user to add
|
||||
@@ -486,7 +490,7 @@ class SecurityClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-builtin-privileges.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_security/privilege/_builtin", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class SlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-delete-policy.html>`_
|
||||
|
||||
:arg policy_id: The id of the snapshot lifecycle policy to
|
||||
remove
|
||||
@@ -26,7 +30,7 @@ class SlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-execute-lifecycle.html>`_
|
||||
|
||||
:arg policy_id: The id of the snapshot lifecycle policy to be
|
||||
executed
|
||||
@@ -46,7 +50,7 @@ class SlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-execute-retention.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_slm/_execute_retention", params=params, headers=headers
|
||||
@@ -57,7 +61,7 @@ class SlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-get-policy.html>`_
|
||||
|
||||
:arg policy_id: Comma-separated list of snapshot lifecycle
|
||||
policies to retrieve
|
||||
@@ -74,7 +78,7 @@ class SlmClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-get-stats.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_slm/stats", params=params, headers=headers
|
||||
@@ -84,7 +88,7 @@ class SlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-put-policy.html>`_
|
||||
|
||||
:arg policy_id: The id of the snapshot lifecycle policy
|
||||
:arg body: The snapshot lifecycle policy definition to register
|
||||
@@ -104,7 +108,7 @@ class SlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-get-status.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_slm/status", params=params, headers=headers
|
||||
@@ -114,7 +118,7 @@ class SlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-start.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_slm/start", params=params, headers=headers
|
||||
@@ -124,7 +128,7 @@ class SlmClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/slm-api-stop.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_slm/stop", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def create(self, repository, snapshot, body=None, params=None, headers=None):
|
||||
"""
|
||||
Creates a snapshot in a repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg snapshot: A snapshot name
|
||||
@@ -32,7 +36,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def delete(self, repository, snapshot, params=None, headers=None):
|
||||
"""
|
||||
Deletes a snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg snapshot: A snapshot name
|
||||
@@ -54,7 +58,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def get(self, repository, snapshot, params=None, headers=None):
|
||||
"""
|
||||
Returns information about a snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg snapshot: A comma-separated list of snapshot names
|
||||
@@ -81,7 +85,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def delete_repository(self, repository, params=None, headers=None):
|
||||
"""
|
||||
Deletes a repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A comma-separated list of repository names
|
||||
:arg master_timeout: Explicit operation timeout for connection
|
||||
@@ -102,7 +106,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def get_repository(self, repository=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about a repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A comma-separated list of repository names
|
||||
:arg local: Return local information, do not retrieve the state
|
||||
@@ -118,7 +122,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def create_repository(self, repository, body, params=None, headers=None):
|
||||
"""
|
||||
Creates a repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg body: The repository definition
|
||||
@@ -143,7 +147,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def restore(self, repository, snapshot, body=None, params=None, headers=None):
|
||||
"""
|
||||
Restores a snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg snapshot: A snapshot name
|
||||
@@ -169,7 +173,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def status(self, repository=None, snapshot=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about the status of a snapshot.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg snapshot: A comma-separated list of snapshot names
|
||||
@@ -190,7 +194,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def verify_repository(self, repository, params=None, headers=None):
|
||||
"""
|
||||
Verifies a repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg master_timeout: Explicit operation timeout for connection
|
||||
@@ -211,7 +215,7 @@ class SnapshotClient(NamespacedClient):
|
||||
def cleanup_repository(self, repository, params=None, headers=None):
|
||||
"""
|
||||
Removes stale data from repository.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg master_timeout: Explicit operation timeout for connection
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class SqlClient(NamespacedClient):
|
||||
def clear_cursor(self, body, params=None, headers=None):
|
||||
"""
|
||||
Clears the SQL cursor
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-pagination.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-pagination.html>`_
|
||||
|
||||
:arg body: Specify the cursor value in the `cursor` element to
|
||||
clean the cursor.
|
||||
@@ -22,7 +26,7 @@ class SqlClient(NamespacedClient):
|
||||
def query(self, body, params=None, headers=None):
|
||||
"""
|
||||
Executes a SQL request
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-rest-overview.html>`_
|
||||
|
||||
:arg body: Use the `query` element to start a query. Use the
|
||||
`cursor` element to continue a query.
|
||||
@@ -40,7 +44,7 @@ class SqlClient(NamespacedClient):
|
||||
def translate(self, body, params=None, headers=None):
|
||||
"""
|
||||
Translates SQL into Elasticsearch queries
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-translate.html>`_
|
||||
|
||||
:arg body: Specify the query in the `query` element.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params
|
||||
|
||||
|
||||
@@ -7,7 +11,7 @@ class SslClient(NamespacedClient):
|
||||
"""
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-ssl.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_ssl/certificates", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import warnings
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
@@ -15,7 +19,7 @@ class TasksClient(NamespacedClient):
|
||||
def list(self, params=None, headers=None):
|
||||
"""
|
||||
Returns a list of tasks.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||
|
||||
:arg actions: A comma-separated list of actions that should be
|
||||
returned. Leave empty to return all.
|
||||
@@ -39,7 +43,7 @@ class TasksClient(NamespacedClient):
|
||||
def cancel(self, task_id=None, params=None, headers=None):
|
||||
"""
|
||||
Cancels a task, if it can be cancelled through an API.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||
|
||||
:arg task_id: Cancel the task with specified task id
|
||||
(node_id:task_number)
|
||||
@@ -65,7 +69,7 @@ class TasksClient(NamespacedClient):
|
||||
def get(self, task_id=None, params=None, headers=None):
|
||||
"""
|
||||
Returns information about a task.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/tasks.html>`_
|
||||
|
||||
:arg task_id: Return the task with specified id
|
||||
(node_id:task_number)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/delete-transform.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform to delete
|
||||
:arg force: When `true`, the transform is deleted regardless of
|
||||
@@ -29,7 +33,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-transform.html>`_
|
||||
|
||||
:arg transform_id: The id or comma delimited list of id
|
||||
expressions of the transforms to get, '_all' or '*' implies get all
|
||||
@@ -56,7 +60,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/get-transform-stats.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform for which to get
|
||||
stats. '_all' or '*' implies all transforms
|
||||
@@ -87,7 +91,7 @@ class TransformClient(NamespacedClient):
|
||||
def preview_transform(self, body, params=None, headers=None):
|
||||
"""
|
||||
Previews a transform.
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/preview-transform.html>`_
|
||||
|
||||
:arg body: The definition for the transform to preview
|
||||
"""
|
||||
@@ -102,7 +106,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/put-transform.html>`_
|
||||
|
||||
:arg transform_id: The id of the new transform.
|
||||
:arg body: The transform definition
|
||||
@@ -125,7 +129,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/start-transform.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform to start
|
||||
:arg timeout: Controls the time to wait for the transform to
|
||||
@@ -153,7 +157,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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/stop-transform.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform to stop
|
||||
:arg allow_no_match: Whether to ignore if a wildcard expression
|
||||
@@ -184,7 +188,7 @@ class TransformClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/update-transform.html>`_
|
||||
|
||||
:arg transform_id: The id of the transform.
|
||||
:arg body: The update transform definition
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import weakref
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
|
||||
|
||||
|
||||
@@ -6,7 +10,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-ack-watch.html>`_
|
||||
|
||||
:arg watch_id: Watch ID
|
||||
:arg action_id: A comma-separated list of the action ids to be
|
||||
@@ -26,7 +30,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-activate-watch.html>`_
|
||||
|
||||
:arg watch_id: Watch ID
|
||||
"""
|
||||
@@ -44,7 +48,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-deactivate-watch.html>`_
|
||||
|
||||
:arg watch_id: Watch ID
|
||||
"""
|
||||
@@ -62,7 +66,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-delete-watch.html>`_
|
||||
|
||||
:arg id: Watch ID
|
||||
"""
|
||||
@@ -80,7 +84,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-execute-watch.html>`_
|
||||
|
||||
:arg body: Execution control
|
||||
:arg id: Watch ID
|
||||
@@ -99,7 +103,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-get-watch.html>`_
|
||||
|
||||
:arg id: Watch ID
|
||||
"""
|
||||
@@ -114,7 +118,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-put-watch.html>`_
|
||||
|
||||
:arg id: Watch ID
|
||||
:arg body: The watch
|
||||
@@ -140,7 +144,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-start.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_watcher/_start", params=params, headers=headers
|
||||
@@ -150,7 +154,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-stats.html>`_
|
||||
|
||||
:arg metric: Controls what additional stat metrics should be
|
||||
include in the response Valid choices: _all, queued_watches,
|
||||
@@ -169,7 +173,7 @@ class WatcherClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/watcher-api-stop.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_watcher/_stop", params=params, headers=headers
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .utils import NamespacedClient, query_params
|
||||
|
||||
|
||||
@@ -10,7 +14,7 @@ class XPackClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/info-api.html>`_
|
||||
|
||||
:arg categories: Comma-separated list of info categories. Can be
|
||||
any of: build, license, features
|
||||
@@ -23,7 +27,7 @@ class XPackClient(NamespacedClient):
|
||||
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>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/usage-api.html>`_
|
||||
|
||||
:arg master_timeout: Specify timeout for watch write operation
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import sys
|
||||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .base import Connection
|
||||
from .http_requests import RequestsHttpConnection
|
||||
from .http_urllib3 import Urllib3HttpConnection, create_ssl_context
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import logging
|
||||
import binascii
|
||||
import gzip
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
import warnings
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
import ssl
|
||||
import urllib3
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
try:
|
||||
import queue
|
||||
except ImportError:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
import random
|
||||
import logging
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
__all__ = [
|
||||
"ImproperlyConfigured",
|
||||
"ElasticsearchException",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from .errors import BulkIndexError, ScanError
|
||||
from .actions import expand_action, streaming_bulk, bulk, parallel_bulk
|
||||
from .actions import scan, reindex
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from operator import methodcaller
|
||||
import time
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from ..exceptions import ElasticsearchException
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
import os
|
||||
from unittest import TestCase, SkipTest
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
from itertools import chain
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from os.path import join, dirname
|
||||
from setuptools import setup, find_packages
|
||||
import sys
|
||||
|
||||
VERSION = (7, 7, 0)
|
||||
__version__ = VERSION
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from collections import defaultdict
|
||||
from unittest import TestCase
|
||||
from unittest import SkipTest # noqa: F401
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import warnings
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from test_elasticsearch.test_cases import ElasticsearchTestCase
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from test_elasticsearch.test_cases import ElasticsearchTestCase
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from elasticsearch.client.utils import _bulk_body, _make_path, _escape, query_params
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import re
|
||||
import ssl
|
||||
import gzip
|
||||
@@ -397,7 +402,7 @@ class TestUrllib3Connection(TestCase):
|
||||
buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
|
||||
con = self._get_mock_connection(response_body=buf)
|
||||
status, headers, data = con.perform_request("GET", "/")
|
||||
self.assertEqual("你好\uda6a", data)
|
||||
self.assertEqual(u"你好\uda6a", data)
|
||||
|
||||
|
||||
class TestRequestsConnection(TestCase):
|
||||
@@ -782,4 +787,4 @@ class TestRequestsConnection(TestCase):
|
||||
buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
|
||||
con = self._get_mock_connection(response_body=buf)
|
||||
status, headers, data = con.perform_request("GET", "/")
|
||||
self.assertEqual("你好\uda6a", data)
|
||||
self.assertEqual(u"你好\uda6a", data)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import time
|
||||
|
||||
from elasticsearch.connection_pool import (
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from elasticsearch.exceptions import TransportError
|
||||
|
||||
from .test_cases import TestCase
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import mock
|
||||
import time
|
||||
import threading
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from unittest import SkipTest
|
||||
from elasticsearch.helpers import test
|
||||
from elasticsearch.helpers.test import ElasticsearchTestCase as BaseTestCase
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from . import ElasticsearchTestCase
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
"""
|
||||
Dynamically generated set of TestCases based on set of yaml files decribing
|
||||
some integration tests. These files are shared among all official Elasticsearch
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from mock import patch
|
||||
|
||||
from elasticsearch import helpers, TransportError
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to Elasticsearch B.V under one or more agreements.
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import time
|
||||
from mock import patch
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
# See the LICENSE file in the project root for more information
|
||||
|
||||
|
||||
import os
|
||||
import json
|
||||
import re
|
||||
@@ -198,8 +197,8 @@ class API:
|
||||
((p, parts[p]) for p in parts if parts[p]["required"]),
|
||||
(("body", self.body),) if self.body else (),
|
||||
((p, parts[p]) for p in parts
|
||||
if not parts[p]["required"] and
|
||||
p not in params),
|
||||
if not parts[p]["required"]
|
||||
and p not in params),
|
||||
sorted(params.items(), key=lambda x: (x[0] not in parts, x[0])),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user