From 388fb9d9839f1ecbb7db6bc1a9e81c000d04b693 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:55:51 -0700 Subject: [PATCH] Generate cat client from API specs (#529) Signed-off-by: saimedhi --- CHANGELOG.md | 1 + opensearchpy/_async/client/cat.py | 655 ++++++++++++++++------------- opensearchpy/_async/client/cat.pyi | 85 +++- opensearchpy/client/cat.py | 653 +++++++++++++++------------- opensearchpy/client/cat.pyi | 85 +++- 5 files changed, 861 insertions(+), 618 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b6e968..06675018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Generate `ingest` client from API specs ([#513](https://github.com/opensearch-project/opensearch-py/pull/513)) - Generate `dangling_indices` client from API specs ([#511](https://github.com/opensearch-project/opensearch-py/pull/511)) - Generate `nodes` client from API specs ([#514](https://github.com/opensearch-project/opensearch-py/pull/514)) +- Generate `cat` client from API specs ([#529](https://github.com/opensearch-project/opensearch-py/pull/529)) ### Deprecated - Deprecated point-in-time APIs (list_all_point_in_time, create_point_in_time, delete_point_in_time) and Security Client APIs (health_check and update_audit_config) ([#502](https://github.com/opensearch-project/opensearch-py/pull/502)) ### Removed diff --git a/opensearchpy/_async/client/cat.py b/opensearchpy/_async/client/cat.py index f7268308..a4dd9786 100644 --- a/opensearchpy/_async/client/cat.py +++ b/opensearchpy/_async/client/cat.py @@ -25,6 +25,16 @@ # under the License. +# ---------------------------------------------------- +# THIS CODE IS GENERATED AND MANUAL EDITS WILL BE LOST. +# +# To contribute, kindly make essential modifications through either the "opensearch-py client generator": +# https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate-api.py +# or the "OpenSearch API specification" available at: +# https://github.com/opensearch-project/opensearch-api-specification/blob/main/OpenSearch.openapi.json +# ----------------------------------------------------- + + from .utils import NamespacedClient, _make_path, query_params @@ -36,19 +46,19 @@ async def aliases(self, name=None, params=None, headers=None): filter and routing infos. - :arg name: A comma-separated list of alias names to return + :arg name: Comma-separated list of alias names. :arg expand_wildcards: Whether to expand wildcard expression to - concrete indices that are open, closed or both. Valid choices: open, - closed, hidden, none, all Default: all - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + concrete indices that are open, closed or both. Valid choices: all, + open, closed, hidden, none + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) + from cluster-manager node. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "aliases", name), params=params, headers=headers @@ -56,12 +66,12 @@ async def aliases(self, name=None, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -71,25 +81,24 @@ async def allocation(self, node_id=None, params=None, headers=None): much disk space they are using. - :arg node_id: A comma-separated list of node IDs or names to - limit the returned information - :arg bytes: The unit in which to display byte values Valid + :arg node_id: Comma-separated list of node IDs or names to limit + the returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", @@ -105,15 +114,15 @@ async def count(self, index=None, params=None, headers=None): individual indices. - :arg index: A comma-separated list of index names to limit the - returned information - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg index: Comma-separated list of indices to limit the + returned information. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "count", index), params=params, headers=headers @@ -125,16 +134,16 @@ async def health(self, params=None, headers=None): Returns a concise representation of the cluster health. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg ts: Set to false to disable timestamping Default: True - :arg v: Verbose mode. Display column headers + :arg ts: Set to false to disable timestamping. (default: True) + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/health", params=params, headers=headers @@ -146,9 +155,9 @@ async def help(self, params=None, headers=None): Returns help for the Cat APIs. - :arg help: Return help information + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by + to sort by. """ return await self.transport.perform_request( "GET", "/_cat", params=params, headers=headers @@ -156,6 +165,7 @@ async def help(self, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "expand_wildcards", "format", "h", @@ -164,7 +174,6 @@ async def help(self, params=None, headers=None): "include_unloaded_segments", "local", "master_timeout", - "cluster_manager_timeout", "pri", "s", "time", @@ -176,93 +185,110 @@ async def indices(self, index=None, params=None, headers=None): counts, disk size, ... - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. :arg expand_wildcards: Whether to expand wildcard expression to - concrete indices that are open, closed or both. Valid choices: open, - closed, hidden, none, all Default: all - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg health: A health status ("green", "yellow", or "red" to - filter only indices matching the specified health status Valid choices: - green, yellow, red - :arg help: Return help information + concrete indices that are open, closed or both. Valid choices: all, + open, closed, hidden, none + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg health: Health status ('green', 'yellow', or 'red') to + filter only indices matching the specified health status. Valid + choices: green, yellow, red + :arg help: Return help information. (default: false) :arg include_unloaded_segments: If set to true segment stats will include stats for segments that are not currently loaded into - memory + memory. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node - :arg pri: Set to true to return stats only for primary shards + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. + :arg pri: Set to true to return stats only for primary shards. + (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "indices", index), params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) async def master(self, params=None, headers=None): """ - Returns information about the master node. + Returns information about the cluster-manager node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ from warnings import warn - warn("Deprecated: use `cluster_manager` instead") + warn( + "Deprecated: To promote inclusive language, please use '/_cat/cluster_manager' instead." + ) return await self.transport.perform_request( "GET", "/_cat/master", params=params, headers=headers ) - @query_params("format", "h", "help", "local", "cluster_manager", "s", "v") + @query_params( + "cluster_manager_timeout", + "format", + "h", + "help", + "local", + "master_timeout", + "s", + "v", + ) async def cluster_manager(self, params=None, headers=None): """ - Returns information about the cluster_manager node. + Returns information about the cluster-manager node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/cluster_manager", params=params, headers=headers @@ -270,14 +296,13 @@ async def cluster_manager(self, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "full_id", "h", "help", - "include_unloaded_segments", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -287,28 +312,27 @@ async def nodes(self, params=None, headers=None): Returns basic statistics about performance of cluster nodes. - :arg bytes: The unit in which to display byte values Valid + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. :arg full_id: Return the full node ID instead of the shortened - version (default: false) - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg include_unloaded_segments: If set to true segment stats - will include stats for segments that are not currently loaded into - memory - :arg local: Calculate the selected nodes using the local cluster - state rather than the state from master node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + version. (default: false) + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg local (Deprecated: This parameter does not cause this API + to act locally): Return local information, do not retrieve the state + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/nodes", params=params, headers=headers @@ -323,22 +347,22 @@ async def recovery(self, index=None, params=None, headers=None): :arg index: Comma-separated list or wildcard expression of index - names to limit the returned information + names to limit the returned information. :arg active_only: If `true`, the response only includes ongoing - shard recoveries - :arg bytes: The unit in which to display byte values Valid + shard recoveries. (default: false) + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb :arg detailed: If `true`, the response includes detailed - information about shard recoveries - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + information about shard recoveries. (default: false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "recovery", index), params=params, headers=headers @@ -346,12 +370,12 @@ async def recovery(self, index=None, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -361,59 +385,74 @@ async def shards(self, index=None, params=None, headers=None): Provides a detailed view of shard allocation on nodes. - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "shards", index), params=params, headers=headers ) - @query_params("bytes", "format", "h", "help", "s", "v") + @query_params( + "bytes", + "cluster_manager_timeout", + "format", + "h", + "help", + "master_timeout", + "s", + "v", + ) async def segments(self, index=None, params=None, headers=None): """ Provides low-level information about the segments in the shards of an index. - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "segments", index), params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -423,33 +462,34 @@ async def pending_tasks(self, params=None, headers=None): Returns a concise representation of the cluster pending tasks. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/pending_tasks", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "size", "v", @@ -460,23 +500,23 @@ async def thread_pool(self, thread_pool_patterns=None, params=None, headers=None queue and rejected statistics are returned for all thread pools. - :arg thread_pool_patterns: A comma-separated list of regular- - expressions to filter the thread pools in the output - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg thread_pool_patterns: Comma-separated list of regular- + expressions to filter the thread pools in the output. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg size: The multiplier in which to display values Valid - choices: , k, m, g, t, p - :arg v: Verbose mode. Display column headers + to sort by. + :arg size: The multiplier in which to display values. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", @@ -492,17 +532,17 @@ async def fielddata(self, fields=None, params=None, headers=None): node in the cluster. - :arg fields: A comma-separated list of fields to return in the - output - :arg bytes: The unit in which to display byte values Valid + :arg fields: Comma-separated list of fields to return in the + output. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", @@ -512,13 +552,12 @@ async def fielddata(self, fields=None, params=None, headers=None): ) @query_params( + "cluster_manager_timeout", "format", "h", "help", - "include_bootstrap", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -527,33 +566,32 @@ async def plugins(self, params=None, headers=None): Returns information about installed plugins across nodes node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg include_bootstrap: Include bootstrap plugins in the - response + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/plugins", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -562,31 +600,32 @@ async def nodeattrs(self, params=None, headers=None): Returns information about custom node attributes. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/nodeattrs", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -595,31 +634,32 @@ async def repositories(self, params=None, headers=None): Returns information about snapshot repositories registered in the cluster. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from master node - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/repositories", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "ignore_unavailable", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -629,23 +669,23 @@ async def snapshots(self, repository=None, params=None, headers=None): Returns all snapshots in a specific repository. - :arg repository: Name of repository from which to fetch the - snapshot information - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg ignore_unavailable: Set to true to ignore unavailable - snapshots - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + :arg repository: Comma-separated list of repository names. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg ignore_unavailable: Whether specified concrete indices + should be ignored when unavailable (missing or closed). (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", @@ -672,35 +712,37 @@ async def tasks(self, params=None, headers=None): the cluster. - :arg actions: A comma-separated list of actions that should be + :arg actions: Comma-separated list of actions that should be returned. Leave empty to return all. - :arg detailed: Return detailed task information (default: false) - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg nodes: A comma-separated list of node IDs or names to limit + :arg detailed: Return detailed task information. (default: + false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg nodes: Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the - node you're connecting to, leave empty to get information from all nodes + node you're connecting to, leave empty to get information from all + nodes. :arg parent_task_id: Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", "/_cat/tasks", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -709,58 +751,91 @@ async def templates(self, name=None, params=None, headers=None): Returns information about existing templates. - :arg name: A pattern that returned template names must match - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg name: The name of the template. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return await self.transport.perform_request( "GET", _make_path("_cat", "templates", name), params=params, headers=headers ) + @query_params() + async def all_pit_segments(self, params=None, headers=None): + """ + Lists all active point-in-time segments. + + """ + return await self.transport.perform_request( + "GET", "/_cat/pit_segments/_all", params=params, headers=headers + ) + + @query_params() + async def pit_segments(self, body=None, params=None, headers=None): + """ + List segments for one or several PITs. + + + :arg body: + """ + return await self.transport.perform_request( + "GET", "/_cat/pit_segments", params=params, headers=headers, body=body + ) + @query_params( - "allow_no_match", "format", "from_", "h", "help", "s", "size", "time", "v" + "active_only", + "bytes", + "completed_only", + "detailed", + "format", + "h", + "help", + "s", + "shards", + "time", + "v", ) - async def transforms(self, transform_id=None, params=None, headers=None): + async def segment_replication(self, index=None, params=None, headers=None): """ - Gets configuration and usage information about transforms. + Returns information about both on-going and latest completed Segment + Replication events. - :arg transform_id: The id of the transform for which to get - stats. '_all' or '*' implies all transforms - :arg allow_no_match: Whether to ignore if a wildcard expression - matches no transforms. (This includes `_all` string or when no - transforms have been specified) - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg from_: skips a number of transform configs, defaults to 0 - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg index: Comma-separated list or wildcard expression of index + names to limit the returned information. + :arg active_only: If `true`, the response only includes ongoing + segment replication events. (default: false) + :arg bytes: The unit in which to display byte values. Valid + choices: b, k, kb, m, mb, g, gb, t, tb, p, pb + :arg completed_only: If `true`, the response only includes + latest completed segment replication events. (default: false) + :arg detailed: If `true`, the response includes detailed + information about segment replications. (default: false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg size: specifies a max number of transforms to get, defaults - to 100 - :arg time: The unit in which to display time values Valid + to sort by. + :arg shards: Comma-separated list of shards to display. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ - # from is a reserved word so it cannot be used, use from_ instead - if "from_" in params: - params["from"] = params.pop("from_") - return await self.transport.perform_request( "GET", - _make_path("_cat", "transforms", transform_id), + _make_path("_cat", "segment_replication", index), params=params, headers=headers, ) diff --git a/opensearchpy/_async/client/cat.pyi b/opensearchpy/_async/client/cat.pyi index c53d43bc..435403e9 100644 --- a/opensearchpy/_async/client/cat.pyi +++ b/opensearchpy/_async/client/cat.pyi @@ -24,6 +24,15 @@ # specific language governing permissions and limitations # under the License. +# ---------------------------------------------------- +# THIS CODE IS GENERATED AND MANUAL EDITS WILL BE LOST. +# +# To contribute, kindly make essential modifications through either the "opensearch-py client generator": +# https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate-api.py +# or the "OpenSearch API specification" available at: +# https://github.com/opensearch-project/opensearch-api-specification/blob/main/OpenSearch.openapi.json +# ----------------------------------------------------- + from typing import Any, Collection, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -57,12 +66,12 @@ class CatClient(NamespacedClient): *, node_id: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -143,6 +152,7 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., @@ -151,7 +161,6 @@ class CatClient(NamespacedClient): include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., pri: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., @@ -171,12 +180,12 @@ class CatClient(NamespacedClient): async def master( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -194,11 +203,12 @@ class CatClient(NamespacedClient): async def cluster_manager( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., + master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -217,14 +227,13 @@ class CatClient(NamespacedClient): self, *, bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., full_id: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -270,12 +279,12 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -296,9 +305,11 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., + master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -316,12 +327,12 @@ class CatClient(NamespacedClient): async def pending_tasks( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -341,12 +352,12 @@ class CatClient(NamespacedClient): self, *, thread_pool_patterns: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., v: Optional[Any] = ..., @@ -387,13 +398,12 @@ class CatClient(NamespacedClient): async def plugins( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., - include_bootstrap: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -411,12 +421,12 @@ class CatClient(NamespacedClient): async def nodeattrs( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -434,12 +444,12 @@ class CatClient(NamespacedClient): async def repositories( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -458,12 +468,12 @@ class CatClient(NamespacedClient): self, *, repository: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., ignore_unavailable: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -508,12 +518,12 @@ class CatClient(NamespacedClient): self, *, name: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -528,17 +538,52 @@ class CatClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., ) -> Any: ... - async def transforms( + async def all_pit_segments( self, *, - transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + http_auth: Optional[Union[str, Tuple[str, str]]] = ..., + api_key: Optional[Union[str, Tuple[str, str]]] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ..., + ) -> Any: ... + async def pit_segments( + self, + *, + body: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + http_auth: Optional[Union[str, Tuple[str, str]]] = ..., + api_key: Optional[Union[str, Tuple[str, str]]] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ..., + ) -> Any: ... + async def segment_replication( + self, + *, + index: Optional[Any] = ..., + active_only: Optional[Any] = ..., + bytes: Optional[Any] = ..., + completed_only: Optional[Any] = ..., + detailed: Optional[Any] = ..., format: Optional[Any] = ..., - from_: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., s: Optional[Any] = ..., - size: Optional[Any] = ..., + shards: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., diff --git a/opensearchpy/client/cat.py b/opensearchpy/client/cat.py index cc1106d5..8dac68cd 100644 --- a/opensearchpy/client/cat.py +++ b/opensearchpy/client/cat.py @@ -25,6 +25,16 @@ # under the License. +# ---------------------------------------------------- +# THIS CODE IS GENERATED AND MANUAL EDITS WILL BE LOST. +# +# To contribute, kindly make essential modifications through either the "opensearch-py client generator": +# https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate-api.py +# or the "OpenSearch API specification" available at: +# https://github.com/opensearch-project/opensearch-api-specification/blob/main/OpenSearch.openapi.json +# ----------------------------------------------------- + + from .utils import NamespacedClient, _make_path, query_params @@ -36,19 +46,19 @@ def aliases(self, name=None, params=None, headers=None): filter and routing infos. - :arg name: A comma-separated list of alias names to return + :arg name: Comma-separated list of alias names. :arg expand_wildcards: Whether to expand wildcard expression to - concrete indices that are open, closed or both. Valid choices: open, - closed, hidden, none, all Default: all - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + concrete indices that are open, closed or both. Valid choices: all, + open, closed, hidden, none + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) + from cluster-manager node. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "aliases", name), params=params, headers=headers @@ -56,12 +66,12 @@ def aliases(self, name=None, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -71,23 +81,24 @@ def allocation(self, node_id=None, params=None, headers=None): much disk space they are using. - :arg node_id: A comma-separated list of node IDs or names to - limit the returned information - :arg bytes: The unit in which to display byte values Valid + :arg node_id: Comma-separated list of node IDs or names to limit + the returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", @@ -103,15 +114,15 @@ def count(self, index=None, params=None, headers=None): individual indices. - :arg index: A comma-separated list of index names to limit the - returned information - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg index: Comma-separated list of indices to limit the + returned information. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "count", index), params=params, headers=headers @@ -123,16 +134,16 @@ def health(self, params=None, headers=None): Returns a concise representation of the cluster health. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg ts: Set to false to disable timestamping Default: True - :arg v: Verbose mode. Display column headers + :arg ts: Set to false to disable timestamping. (default: True) + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/health", params=params, headers=headers @@ -144,9 +155,9 @@ def help(self, params=None, headers=None): Returns help for the Cat APIs. - :arg help: Return help information + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by + to sort by. """ return self.transport.perform_request( "GET", "/_cat", params=params, headers=headers @@ -154,6 +165,7 @@ def help(self, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "expand_wildcards", "format", "h", @@ -162,7 +174,6 @@ def help(self, params=None, headers=None): "include_unloaded_segments", "local", "master_timeout", - "cluster_manager_timeout", "pri", "s", "time", @@ -174,93 +185,110 @@ def indices(self, index=None, params=None, headers=None): counts, disk size, ... - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. :arg expand_wildcards: Whether to expand wildcard expression to - concrete indices that are open, closed or both. Valid choices: open, - closed, hidden, none, all Default: all - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg health: A health status ("green", "yellow", or "red" to - filter only indices matching the specified health status Valid choices: - green, yellow, red - :arg help: Return help information + concrete indices that are open, closed or both. Valid choices: all, + open, closed, hidden, none + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg health: Health status ('green', 'yellow', or 'red') to + filter only indices matching the specified health status. Valid + choices: green, yellow, red + :arg help: Return help information. (default: false) :arg include_unloaded_segments: If set to true segment stats will include stats for segments that are not currently loaded into - memory + memory. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node - :arg pri: Set to true to return stats only for primary shards + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. + :arg pri: Set to true to return stats only for primary shards. + (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "indices", index), params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) def master(self, params=None, headers=None): """ - Returns information about the master node. + Returns information about the cluster-manager node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ from warnings import warn - warn("Deprecated: use `cluster_manager` instead") + warn( + "Deprecated: To promote inclusive language, please use '/_cat/cluster_manager' instead." + ) return self.transport.perform_request( "GET", "/_cat/master", params=params, headers=headers ) - @query_params("format", "h", "help", "local", "cluster_manager_timeout", "s", "v") + @query_params( + "cluster_manager_timeout", + "format", + "h", + "help", + "local", + "master_timeout", + "s", + "v", + ) def cluster_manager(self, params=None, headers=None): """ - Returns information about the cluster_manager node. + Returns information about the cluster-manager node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/cluster_manager", params=params, headers=headers @@ -268,14 +296,13 @@ def cluster_manager(self, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "full_id", "h", "help", - "include_unloaded_segments", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -285,28 +312,27 @@ def nodes(self, params=None, headers=None): Returns basic statistics about performance of cluster nodes. - :arg bytes: The unit in which to display byte values Valid + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. :arg full_id: Return the full node ID instead of the shortened - version (default: false) - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg include_unloaded_segments: If set to true segment stats - will include stats for segments that are not currently loaded into - memory - :arg local: Calculate the selected nodes using the local cluster - state rather than the state from master node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + version. (default: false) + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg local (Deprecated: This parameter does not cause this API + to act locally): Return local information, do not retrieve the state + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/nodes", params=params, headers=headers @@ -321,22 +347,22 @@ def recovery(self, index=None, params=None, headers=None): :arg index: Comma-separated list or wildcard expression of index - names to limit the returned information + names to limit the returned information. :arg active_only: If `true`, the response only includes ongoing - shard recoveries - :arg bytes: The unit in which to display byte values Valid + shard recoveries. (default: false) + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb :arg detailed: If `true`, the response includes detailed - information about shard recoveries - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + information about shard recoveries. (default: false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "recovery", index), params=params, headers=headers @@ -344,12 +370,12 @@ def recovery(self, index=None, params=None, headers=None): @query_params( "bytes", + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -359,59 +385,74 @@ def shards(self, index=None, params=None, headers=None): Provides a detailed view of shard allocation on nodes. - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "shards", index), params=params, headers=headers ) - @query_params("bytes", "format", "h", "help", "s", "v") + @query_params( + "bytes", + "cluster_manager_timeout", + "format", + "h", + "help", + "master_timeout", + "s", + "v", + ) def segments(self, index=None, params=None, headers=None): """ Provides low-level information about the segments in the shards of an index. - :arg index: A comma-separated list of index names to limit the - returned information - :arg bytes: The unit in which to display byte values Valid + :arg index: Comma-separated list of indices to limit the + returned information. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "segments", index), params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -421,33 +462,34 @@ def pending_tasks(self, params=None, headers=None): Returns a concise representation of the cluster pending tasks. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/pending_tasks", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "size", "v", @@ -458,23 +500,23 @@ def thread_pool(self, thread_pool_patterns=None, params=None, headers=None): queue and rejected statistics are returned for all thread pools. - :arg thread_pool_patterns: A comma-separated list of regular- - expressions to filter the thread pools in the output - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg thread_pool_patterns: Comma-separated list of regular- + expressions to filter the thread pools in the output. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg size: The multiplier in which to display values Valid - choices: , k, m, g, t, p - :arg v: Verbose mode. Display column headers + to sort by. + :arg size: The multiplier in which to display values. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", @@ -490,17 +532,17 @@ def fielddata(self, fields=None, params=None, headers=None): node in the cluster. - :arg fields: A comma-separated list of fields to return in the - output - :arg bytes: The unit in which to display byte values Valid + :arg fields: Comma-separated list of fields to return in the + output. + :arg bytes: The unit in which to display byte values. Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", @@ -510,13 +552,12 @@ def fielddata(self, fields=None, params=None, headers=None): ) @query_params( + "cluster_manager_timeout", "format", "h", "help", - "include_bootstrap", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -525,33 +566,32 @@ def plugins(self, params=None, headers=None): Returns information about installed plugins across nodes node. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg include_bootstrap: Include bootstrap plugins in the - response + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/plugins", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -560,31 +600,32 @@ def nodeattrs(self, params=None, headers=None): Returns information about custom node attributes. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/nodeattrs", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -593,31 +634,32 @@ def repositories(self, params=None, headers=None): Returns information about snapshot repositories registered in the cluster. - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from master node - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/repositories", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "ignore_unavailable", "master_timeout", - "cluster_manager_timeout", "s", "time", "v", @@ -627,23 +669,23 @@ def snapshots(self, repository=None, params=None, headers=None): Returns all snapshots in a specific repository. - :arg repository: Name of repository from which to fetch the - snapshot information - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg ignore_unavailable: Set to true to ignore unavailable - snapshots - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + :arg repository: Comma-separated list of repository names. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg ignore_unavailable: Whether specified concrete indices + should be ignored when unavailable (missing or closed). (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", @@ -670,35 +712,37 @@ def tasks(self, params=None, headers=None): the cluster. - :arg actions: A comma-separated list of actions that should be + :arg actions: Comma-separated list of actions that should be returned. Leave empty to return all. - :arg detailed: Return detailed task information (default: false) - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information - :arg nodes: A comma-separated list of node IDs or names to limit + :arg detailed: Return detailed task information. (default: + false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) + :arg nodes: Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the - node you're connecting to, leave empty to get information from all nodes + node you're connecting to, leave empty to get information from all + nodes. :arg parent_task_id: Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg time: The unit in which to display time values Valid + to sort by. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", "/_cat/tasks", params=params, headers=headers ) @query_params( + "cluster_manager_timeout", "format", "h", "help", "local", "master_timeout", - "cluster_manager_timeout", "s", "v", ) @@ -707,58 +751,91 @@ def templates(self, name=None, params=None, headers=None): Returns information about existing templates. - :arg name: A pattern that returned template names must match - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg name: The name of the template. + :arg cluster_manager_timeout: Operation timeout for connection + to cluster-manager node. + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg local: Return local information, do not retrieve the state - from cluster_manager node (default: false) - :arg master_timeout (Deprecated: use cluster_manager_timeout): Explicit operation timeout for connection - to master node - :arg cluster_manager_timeout: Explicit operation timeout for connection - to cluster_manager node + from cluster-manager node. (default: false) + :arg master_timeout (Deprecated: To promote inclusive language, + use 'cluster_manager_timeout' instead): Operation timeout for connection + to master node. :arg s: Comma-separated list of column names or column aliases - to sort by - :arg v: Verbose mode. Display column headers + to sort by. + :arg v: Verbose mode. Display column headers. (default: false) """ return self.transport.perform_request( "GET", _make_path("_cat", "templates", name), params=params, headers=headers ) + @query_params() + def all_pit_segments(self, params=None, headers=None): + """ + Lists all active point-in-time segments. + + """ + return self.transport.perform_request( + "GET", "/_cat/pit_segments/_all", params=params, headers=headers + ) + + @query_params() + def pit_segments(self, body=None, params=None, headers=None): + """ + List segments for one or several PITs. + + + :arg body: + """ + return self.transport.perform_request( + "GET", "/_cat/pit_segments", params=params, headers=headers, body=body + ) + @query_params( - "allow_no_match", "format", "from_", "h", "help", "s", "size", "time", "v" + "active_only", + "bytes", + "completed_only", + "detailed", + "format", + "h", + "help", + "s", + "shards", + "time", + "v", ) - def transforms(self, transform_id=None, params=None, headers=None): + def segment_replication(self, index=None, params=None, headers=None): """ - Gets configuration and usage information about transforms. + Returns information about both on-going and latest completed Segment + Replication events. - :arg transform_id: The id of the transform for which to get - stats. '_all' or '*' implies all transforms - :arg allow_no_match: Whether to ignore if a wildcard expression - matches no transforms. (This includes `_all` string or when no - transforms have been specified) - :arg format: a short version of the Accept header, e.g. json, - yaml - :arg from_: skips a number of transform configs, defaults to 0 - :arg h: Comma-separated list of column names to display - :arg help: Return help information + :arg index: Comma-separated list or wildcard expression of index + names to limit the returned information. + :arg active_only: If `true`, the response only includes ongoing + segment replication events. (default: false) + :arg bytes: The unit in which to display byte values. Valid + choices: b, k, kb, m, mb, g, gb, t, tb, p, pb + :arg completed_only: If `true`, the response only includes + latest completed segment replication events. (default: false) + :arg detailed: If `true`, the response includes detailed + information about segment replications. (default: false) + :arg format: A short version of the Accept header, e.g. json, + yaml. + :arg h: Comma-separated list of column names to display. + :arg help: Return help information. (default: false) :arg s: Comma-separated list of column names or column aliases - to sort by - :arg size: specifies a max number of transforms to get, defaults - to 100 - :arg time: The unit in which to display time values Valid + to sort by. + :arg shards: Comma-separated list of shards to display. + :arg time: The unit in which to display time values. Valid choices: d, h, m, s, ms, micros, nanos - :arg v: Verbose mode. Display column headers + :arg v: Verbose mode. Display column headers. (default: false) """ - # from is a reserved word so it cannot be used, use from_ instead - if "from_" in params: - params["from"] = params.pop("from_") - return self.transport.perform_request( "GET", - _make_path("_cat", "transforms", transform_id), + _make_path("_cat", "segment_replication", index), params=params, headers=headers, ) diff --git a/opensearchpy/client/cat.pyi b/opensearchpy/client/cat.pyi index e29e9253..fc076ef8 100644 --- a/opensearchpy/client/cat.pyi +++ b/opensearchpy/client/cat.pyi @@ -24,6 +24,15 @@ # specific language governing permissions and limitations # under the License. +# ---------------------------------------------------- +# THIS CODE IS GENERATED AND MANUAL EDITS WILL BE LOST. +# +# To contribute, kindly make essential modifications through either the "opensearch-py client generator": +# https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate-api.py +# or the "OpenSearch API specification" available at: +# https://github.com/opensearch-project/opensearch-api-specification/blob/main/OpenSearch.openapi.json +# ----------------------------------------------------- + from typing import Any, Collection, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -57,12 +66,12 @@ class CatClient(NamespacedClient): *, node_id: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -143,6 +152,7 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., @@ -151,7 +161,6 @@ class CatClient(NamespacedClient): include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., pri: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., @@ -171,12 +180,12 @@ class CatClient(NamespacedClient): def master( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -194,11 +203,12 @@ class CatClient(NamespacedClient): def cluster_manager( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., + master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -217,14 +227,13 @@ class CatClient(NamespacedClient): self, *, bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., full_id: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -270,12 +279,12 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -296,9 +305,11 @@ class CatClient(NamespacedClient): *, index: Optional[Any] = ..., bytes: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., + master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -316,12 +327,12 @@ class CatClient(NamespacedClient): def pending_tasks( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -341,12 +352,12 @@ class CatClient(NamespacedClient): self, *, thread_pool_patterns: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., v: Optional[Any] = ..., @@ -387,13 +398,12 @@ class CatClient(NamespacedClient): def plugins( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., - include_bootstrap: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -411,12 +421,12 @@ class CatClient(NamespacedClient): def nodeattrs( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -434,12 +444,12 @@ class CatClient(NamespacedClient): def repositories( self, *, + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -458,12 +468,12 @@ class CatClient(NamespacedClient): self, *, repository: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., ignore_unavailable: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., @@ -508,12 +518,12 @@ class CatClient(NamespacedClient): self, *, name: Optional[Any] = ..., + cluster_manager_timeout: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., local: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - cluster_manager_timeout: Optional[Any] = ..., s: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -528,17 +538,52 @@ class CatClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., ) -> Any: ... - def transforms( + def all_pit_segments( self, *, - transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + http_auth: Optional[Union[str, Tuple[str, str]]] = ..., + api_key: Optional[Union[str, Tuple[str, str]]] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ..., + ) -> Any: ... + def pit_segments( + self, + *, + body: Optional[Any] = ..., + pretty: Optional[bool] = ..., + human: Optional[bool] = ..., + error_trace: Optional[bool] = ..., + format: Optional[str] = ..., + filter_path: Optional[Union[str, Collection[str]]] = ..., + request_timeout: Optional[Union[int, float]] = ..., + ignore: Optional[Union[int, Collection[int]]] = ..., + opaque_id: Optional[str] = ..., + http_auth: Optional[Union[str, Tuple[str, str]]] = ..., + api_key: Optional[Union[str, Tuple[str, str]]] = ..., + params: Optional[MutableMapping[str, Any]] = ..., + headers: Optional[MutableMapping[str, str]] = ..., + ) -> Any: ... + def segment_replication( + self, + *, + index: Optional[Any] = ..., + active_only: Optional[Any] = ..., + bytes: Optional[Any] = ..., + completed_only: Optional[Any] = ..., + detailed: Optional[Any] = ..., format: Optional[Any] = ..., - from_: Optional[Any] = ..., h: Optional[Any] = ..., help: Optional[Any] = ..., s: Optional[Any] = ..., - size: Optional[Any] = ..., + shards: Optional[Any] = ..., time: Optional[Any] = ..., v: Optional[Any] = ..., pretty: Optional[bool] = ...,