Files
opensearch-pyd/elasticsearch/client/xpack.py
T

31 lines
1.0 KiB
Python
Raw Normal View History

from .utils import NamespacedClient, query_params
class XPackClient(NamespacedClient):
def __getattr__(self, attr_name):
return getattr(self.client, attr_name)
# AUTO-GENERATED-API-DEFINITIONS #
2019-12-17 22:31:35 +01:00
@query_params("categories")
2020-03-11 16:33:15 -05:00
def info(self, params=None, headers=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html>`_
2019-12-17 22:31:35 +01:00
:arg categories: Comma-separated list of info categories. Can be
any of: build, license, features
"""
2020-03-11 16:33:15 -05:00
return self.transport.perform_request(
"GET", "/_xpack", params=params, headers=headers
)
@query_params("master_timeout")
2020-03-11 16:33:15 -05:00
def usage(self, params=None, headers=None):
"""
2020-03-13 13:44:46 -05:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html>`_
:arg master_timeout: Specify timeout for watch write operation
"""
2020-03-11 16:33:15 -05:00
return self.transport.perform_request(
"GET", "/_xpack/usage", params=params, headers=headers
)