From 3b62e4c64a4aea1206c687e4af98b1ccb594f896 Mon Sep 17 00:00:00 2001 From: saimedhi Date: Fri, 3 May 2024 03:34:20 +0000 Subject: [PATCH] Updated opensearch-py to reflect the latest OpenSearch API spec (2024-05-03) Signed-off-by: GitHub --- CHANGELOG.md | 1 + opensearchpy/_async/client/__init__.py | 630 +------------ opensearchpy/_async/client/cat.py | 424 +-------- opensearchpy/_async/client/cluster.py | 348 +------- .../_async/client/dangling_indices.py | 53 +- opensearchpy/_async/client/indices.py | 836 +----------------- opensearchpy/_async/client/ingest.py | 87 +- opensearchpy/_async/client/nodes.py | 81 +- opensearchpy/_async/client/remote_store.py | 20 +- opensearchpy/_async/client/search_pipeline.py | 59 +- opensearchpy/_async/client/security.py | 577 +----------- opensearchpy/_async/client/snapshot.py | 229 +---- opensearchpy/_async/client/tasks.py | 57 +- opensearchpy/_async/plugins/knn.py | 77 +- opensearchpy/_async/plugins/notifications.py | 121 +-- opensearchpy/client/__init__.py | 630 +------------ opensearchpy/client/cat.py | 424 +-------- opensearchpy/client/cluster.py | 348 +------- opensearchpy/client/dangling_indices.py | 53 +- opensearchpy/client/indices.py | 836 +----------------- opensearchpy/client/ingest.py | 87 +- opensearchpy/client/nodes.py | 81 +- opensearchpy/client/remote_store.py | 20 +- opensearchpy/client/search_pipeline.py | 59 +- opensearchpy/client/security.py | 577 +----------- opensearchpy/client/snapshot.py | 229 +---- opensearchpy/client/tasks.py | 57 +- opensearchpy/plugins/knn.py | 77 +- opensearchpy/plugins/notifications.py | 121 +-- 29 files changed, 319 insertions(+), 6880 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25443c331..4e9814402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Updated code generator to use native OpenAPI specification ([#721](https://github.com/opensearch-project/opensearch-py/pull/721)) ### Updated APIs +- Updated opensearch-py APIs to reflect [opensearch-api-specification@287ea69](https://github.com/opensearch-project/opensearch-api-specification/commit/287ea69229e840aba7699000d9d4b332eb1247c7) - Updated opensearch-py APIs to reflect [opensearch-api-specification@d3783f1](https://github.com/opensearch-project/opensearch-api-specification/commit/d3783f1200fdc5799eba861842ee611f2c7e30e7) - Updated opensearch-py APIs to reflect [opensearch-api-specification@3ed6aaf](https://github.com/opensearch-project/opensearch-api-specification/commit/3ed6aaff0ce51af3aad00fe57c34d1a7056bd6d1) - Updated opensearch-py APIs to reflect [opensearch-api-specification@af4a34f](https://github.com/opensearch-project/opensearch-api-specification/commit/af4a34f9847d36709b5a394be7c76fda4649ccc8) diff --git a/opensearchpy/_async/client/__init__.py b/opensearchpy/_async/client/__init__.py index abca30670..905a41e87 100644 --- a/opensearchpy/_async/client/__init__.py +++ b/opensearchpy/_async/client/__init__.py @@ -258,7 +258,7 @@ async def close(self) -> None: await self.transport.close() # AUTO-GENERATED-API-DEFINITIONS # - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def ping( self, params: Any = None, @@ -267,17 +267,6 @@ async def ping( """ Returns whether the cluster is running. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ try: return await self.transport.perform_request( @@ -286,7 +275,7 @@ async def ping( except TransportError: return False - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def info( self, params: Any = None, @@ -295,31 +284,15 @@ async def info( """ Returns basic information about the cluster. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/", params=params, headers=headers ) @query_params( - "error_trace", - "filter_path", - "human", "pipeline", - "pretty", "refresh", "routing", - "source", "timeout", "version", "version_type", @@ -345,27 +318,17 @@ async def create( stream template, this request creates the index. :arg id: Unique identifier for the document. :arg body: The document - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg pipeline: ID of the pipeline to use to preprocess incoming documents.If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -391,18 +354,13 @@ async def create( ) @query_params( - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", "op_type", "pipeline", - "pretty", "refresh", "require_alias", "routing", - "source", "timeout", "version", "version_type", @@ -423,12 +381,6 @@ async def index( :arg index: Name of the data stream or index to target. :arg body: The document :arg id: Unique identifier for the document. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has @@ -444,8 +396,6 @@ async def index( setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do @@ -454,8 +404,6 @@ async def index( alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -486,15 +434,10 @@ async def index( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "pipeline", - "pretty", "refresh", "require_alias", "routing", - "source", "timeout", "wait_for_active_shards", ) @@ -519,19 +462,11 @@ async def bulk( to exclude from the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg pipeline: ID of the pipeline to use to preprocess incoming documents.If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do @@ -540,8 +475,6 @@ async def bulk( an index alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -562,7 +495,7 @@ async def bulk( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def clear_scroll( self, body: Any = None, @@ -578,16 +511,6 @@ async def clear_scroll( was specified via the scroll_id parameter :arg scroll_id: Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: raise ValueError("You need to supply scroll_id or body.") @@ -606,19 +529,14 @@ async def clear_scroll( "analyzer", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_throttled", "ignore_unavailable", "lenient", "min_score", "preference", - "pretty", "q", "routing", - "source", "terminate_after", ) async def count( @@ -653,17 +571,11 @@ async def count( :arg df: Field to use as default where no field prefix is given in the query string.This parameter can only be used when the `q` query string parameter is specified. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased indices are ignored when frozen. :arg ignore_unavailable: If `false`, the request returns an @@ -674,13 +586,9 @@ async def count( must have to be included in the result. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg terminate_after: Maximum number of documents to collect for each shard.If a query reaches this limit, Opensearch terminates the query early.Opensearch collects documents before sorting. @@ -694,15 +602,10 @@ async def count( ) @query_params( - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", - "pretty", "refresh", "routing", - "source", "timeout", "version", "version_type", @@ -721,26 +624,16 @@ async def delete( :arg index: Name of the target index. :arg id: Unique identifier for the document. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for active shards. :arg version: Explicit version number for concurrency control.The specified version must match the current version of the @@ -771,16 +664,12 @@ async def delete( "conflicts", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", "from_", - "human", "ignore_unavailable", "lenient", "max_docs", "preference", - "pretty", "q", "refresh", "request_cache", @@ -793,7 +682,6 @@ async def delete( "size", "slices", "sort", - "source", "stats", "terminate_after", "timeout", @@ -837,18 +725,12 @@ async def delete_by_query( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as @@ -857,8 +739,6 @@ async def delete_by_query( to all documents. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. @@ -880,8 +760,6 @@ async def delete_by_query( :arg slices: The number of slices this task should be divided into. Valid choices are auto. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg terminate_after: Maximum number of documents to collect for @@ -918,9 +796,7 @@ async def delete_by_query( body=body, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") async def delete_by_query_rethrottle( self, task_id: Any, @@ -933,18 +809,8 @@ async def delete_by_query_rethrottle( :arg task_id: The ID for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -956,16 +822,7 @@ async def delete_by_query_rethrottle( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_script( self, id: Any, @@ -979,20 +836,10 @@ async def delete_script( :arg id: Identifier for the stored script or search template. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1008,15 +855,10 @@ async def delete_script( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", "version", "version_type", @@ -1041,23 +883,13 @@ async def exists( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: List of stored fields to return as part of a hit.If no fields are specified, no stored fields are included in the response.If this field is specified, the `_source` parameter defaults to @@ -1081,15 +913,10 @@ async def exists( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "version", "version_type", ) @@ -1113,23 +940,13 @@ async def exists_source( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg version: Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed. @@ -1155,15 +972,10 @@ async def exists_source( "analyzer", "default_operator", "df", - "error_trace", - "filter_path", - "human", "lenient", "preference", - "pretty", "q", "routing", - "source", "stored_fields", ) async def explain( @@ -1197,23 +1009,13 @@ async def explain( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. Default is _all. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: A comma-separated list of stored fields to return in the response. """ @@ -1229,15 +1031,10 @@ async def explain( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", "fields", - "filter_path", - "human", "ignore_unavailable", "include_unmapped", - "pretty", - "source", ) async def field_caps( self, @@ -1261,8 +1058,6 @@ async def field_caps( targets other open indices. For example, a requesttargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma- @@ -1270,18 +1065,10 @@ async def field_caps( closed, hidden, none. :arg fields: Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. :arg include_unmapped: If true, unmapped fields are included in the response. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -1295,15 +1082,10 @@ async def field_caps( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", "version", "version_type", @@ -1327,24 +1109,14 @@ async def get( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If true, Opensearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: List of stored fields to return as part of a hit.If no fields are specified, no stored fields are included in the response.If this field is specified, the `_source` parameter defaults to @@ -1363,15 +1135,7 @@ async def get( "GET", _make_path(index, "_doc", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") async def get_script( self, id: Any, @@ -1385,19 +1149,9 @@ async def get_script( :arg id: Identifier for the stored script or search template. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'id'.") @@ -1410,15 +1164,10 @@ async def get_script( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "version", "version_type", ) @@ -1441,24 +1190,14 @@ async def get_source( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: Boolean) If true, the request is real-time as opposed to near-real-time. :arg refresh: If true, Opensearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg version: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. @@ -1479,15 +1218,10 @@ async def get_source( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", ) async def mget( @@ -1517,24 +1251,14 @@ async def mget( source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.If the `_source` parameter is `false`, this parameter is ignored. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, the request refreshes relevant shards before retrieving documents. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: If `true`, retrieves the document fields stored in the index rather than the document `_source`. """ @@ -1551,16 +1275,11 @@ async def mget( @query_params( "ccs_minimize_roundtrips", - "error_trace", - "filter_path", - "human", "max_concurrent_searches", "max_concurrent_shard_requests", "pre_filter_shard_size", - "pretty", "rest_total_hits_as_int", "search_type", - "source", "typed_keys", ) async def msearch( @@ -1581,12 +1300,6 @@ async def msearch( :arg ccs_minimize_roundtrips: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_concurrent_searches: Maximum number of concurrent searches the multi search API can execute. :arg max_concurrent_shard_requests: Maximum number of concurrent @@ -1599,16 +1312,12 @@ async def msearch( significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. Default is false. :arg search_type: Indicates whether global term and document frequencies should be used when scoring returned documents. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. """ @@ -1626,14 +1335,9 @@ async def msearch( @query_params( "ccs_minimize_roundtrips", - "error_trace", - "filter_path", - "human", "max_concurrent_searches", - "pretty", "rest_total_hits_as_int", "search_type", - "source", "typed_keys", ) async def msearch_template( @@ -1654,24 +1358,14 @@ async def msearch_template( and indices, omit this parameter or use `*`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_concurrent_searches: Maximum number of concurrent searches the API can run. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If `true`, the response returns `hits.total` as an integer.If `false`, it returns `hits.total` as an object. Default is false. :arg search_type: The type of the search operation.Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: If `true`, the response prefixes aggregation and suggester names with their respective types. """ @@ -1688,20 +1382,15 @@ async def msearch_template( ) @query_params( - "error_trace", "field_statistics", "fields", - "filter_path", - "human", "ids", "offsets", "payloads", "positions", "preference", - "pretty", "realtime", "routing", - "source", "term_statistics", "version", "version_type", @@ -1721,8 +1410,6 @@ async def mtermvectors( parameters per document here. You must at least provide a list of document ids. See documentation. :arg index: Name of the index that contains the documents. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Default is True. @@ -1730,10 +1417,6 @@ async def mtermvectors( fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ids: A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body :arg offsets: If `true`, the response includes term offsets. @@ -1744,14 +1427,10 @@ async def mtermvectors( Default is True. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg term_statistics: If true, the response includes term frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of @@ -1765,16 +1444,7 @@ async def mtermvectors( "POST", path, params=params, headers=headers, body=body ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def put_script( self, id: Any, @@ -1795,20 +1465,10 @@ async def put_script( or template in this context. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1826,15 +1486,7 @@ async def put_script( ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "search_type", - "source", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "search_type" ) async def rank_eval( self, @@ -1860,22 +1512,12 @@ async def rank_eval( targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. - :arg pretty: Whether to pretty format the returned JSON - response. :arg search_type: Search operation type - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1889,16 +1531,11 @@ async def rank_eval( ) @query_params( - "error_trace", - "filter_path", - "human", "max_docs", - "pretty", "refresh", "requests_per_second", "scroll", "slices", - "source", "timeout", "wait_for_active_shards", "wait_for_completion", @@ -1917,16 +1554,8 @@ async def reindex( :arg body: The search definition using the Query DSL and the prototype for the index request. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_docs: Maximum number of documents to process. By default, all documents. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, the request refreshes affected shards to make this operation visible to search. :arg requests_per_second: The throttle for this request in sub- @@ -1936,8 +1565,6 @@ async def reindex( :arg slices: The number of slices this task should be divided into.Defaults to 1 slice, meaning the task isn’t sliced into subtasks. Valid choices are auto. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. :arg wait_for_active_shards: The number of shard copies that @@ -1954,9 +1581,7 @@ async def reindex( "POST", "/_reindex", params=params, headers=headers, body=body ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") async def reindex_rethrottle( self, task_id: Any, @@ -1968,18 +1593,8 @@ async def reindex_rethrottle( :arg task_id: Identifier for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -1991,7 +1606,7 @@ async def reindex_rethrottle( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def render_search_template( self, body: Any = None, @@ -2006,16 +1621,6 @@ async def render_search_template( :arg body: The search definition template and its params :arg id: ID of the search template to render. If no `source` is specified, this or the `id` request body parameter is required. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -2025,7 +1630,7 @@ async def render_search_template( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def scripts_painless_execute( self, body: Any = None, @@ -2037,16 +1642,6 @@ async def scripts_painless_execute( :arg body: The script to execute - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -2056,15 +1651,7 @@ async def scripts_painless_execute( body=body, ) - @query_params( - "error_trace", - "filter_path", - "human", - "pretty", - "rest_total_hits_as_int", - "scroll", - "source", - ) + @query_params("rest_total_hits_as_int", "scroll") async def scroll( self, body: Any = None, @@ -2079,21 +1666,11 @@ async def scroll( :arg body: The scroll ID if not passed by URL or query parameter. :arg scroll_id: The scroll ID for scrolled search - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. Default is false. :arg scroll: Period to retain the search context for scrolling. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: raise ValueError("You need to supply scroll_id or body.") @@ -2119,12 +1696,9 @@ async def scroll( "default_operator", "df", "docvalue_fields", - "error_trace", "expand_wildcards", "explain", - "filter_path", "from_", - "human", "ignore_throttled", "ignore_unavailable", "include_named_queries_score", @@ -2132,7 +1706,6 @@ async def scroll( "max_concurrent_shard_requests", "pre_filter_shard_size", "preference", - "pretty", "q", "request_cache", "rest_total_hits_as_int", @@ -2143,7 +1716,6 @@ async def scroll( "seq_no_primary_term", "size", "sort", - "source", "stats", "stored_fields", "suggest_field", @@ -2219,8 +1791,6 @@ async def search( string parameter is specified. :arg docvalue_fields: A comma-separated list of fields to return as the docvalue representation for each hit. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -2228,14 +1798,10 @@ async def search( closed, hidden, none. :arg explain: If `true`, returns detailed information about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting document offset.Needs to be non-negative.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` parameter. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased indices will be ignored when frozen. :arg ignore_unavailable: If `false`, the request returns an @@ -2280,8 +1846,6 @@ async def search( string that does not start with `_`) to route searches with the same `` to the same shards in the same order. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax using query parameter search.Query parameter searches do not support the full Opensearch Query DSL but are handy for testing. @@ -2309,8 +1873,6 @@ async def search( parameters.To page through more hits, use the `search_after` parameter. Default is 10. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg stored_fields: A comma-separated list of stored fields to @@ -2366,16 +1928,11 @@ async def search( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "local", "preference", - "pretty", "routing", - "source", ) async def search_shards( self, @@ -2396,29 +1953,19 @@ async def search_shards( targets other open indices.For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from the local node only. Default is false. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_search_shards"), params=params, headers=headers @@ -2427,21 +1974,16 @@ async def search_shards( @query_params( "allow_no_indices", "ccs_minimize_roundtrips", - "error_trace", "expand_wildcards", "explain", - "filter_path", - "human", "ignore_throttled", "ignore_unavailable", "preference", - "pretty", "profile", "rest_total_hits_as_int", "routing", "scroll", "search_type", - "source", "typed_keys", ) async def search_template( @@ -2466,8 +2008,6 @@ async def search_template( `bar`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -2475,18 +2015,12 @@ async def search_template( `closed`, `hidden`, `none`. :arg explain: If `true`, the response includes additional details about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg profile: If `true`, the query execution is profiled. :arg rest_total_hits_as_int: If true, hits.total are rendered as an integer in the response. Default is false. @@ -2496,8 +2030,6 @@ async def search_template( indexshould be maintained for scrolled search. :arg search_type: The type of the search operation. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: If `true`, the response prefixes aggregation and suggester names with their respective types. """ @@ -2513,19 +2045,14 @@ async def search_template( ) @query_params( - "error_trace", "field_statistics", "fields", - "filter_path", - "human", "offsets", "payloads", "positions", "preference", - "pretty", "realtime", "routing", - "source", "term_statistics", "version", "version_type", @@ -2547,8 +2074,6 @@ async def termvectors( :arg body: Define parameters and or supply a document to get termvectors for. See documentation. :arg id: Unique identifier of the document. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Default is True. @@ -2556,10 +2081,6 @@ async def termvectors( fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg offsets: If `true`, the response includes term offsets. Default is True. :arg payloads: If `true`, the response includes term payloads. @@ -2568,14 +2089,10 @@ async def termvectors( Default is True. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg term_statistics: If `true`, the response includes term frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of @@ -2596,18 +2113,13 @@ async def termvectors( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", "lang", - "pretty", "refresh", "require_alias", "retry_on_conflict", "routing", - "source", "timeout", "wait_for_active_shards", ) @@ -2633,19 +2145,11 @@ async def update( exclude. :arg _source_includes: Specify the source fields you want to retrieve. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. :arg lang: The script language. Default is painless. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If 'true', Opensearch refreshes the affected shards to make this operationvisible to search, if 'wait_for' then wait for a refresh to make this operationvisible to search, if 'false' do @@ -2656,8 +2160,6 @@ async def update( operation be retried when a conflict occurs. Default is 0. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for dynamic mapping updates and active shards.This guarantees Opensearch waits for at least the timeout before failing.The actual wait time could be longer, particularly when @@ -2688,17 +2190,13 @@ async def update( "conflicts", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", "from_", - "human", "ignore_unavailable", "lenient", "max_docs", "pipeline", "preference", - "pretty", "q", "refresh", "request_cache", @@ -2711,7 +2209,6 @@ async def update( "size", "slices", "sort", - "source", "stats", "terminate_after", "timeout", @@ -2756,18 +2253,12 @@ async def update_by_query( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as @@ -2781,8 +2272,6 @@ async def update_by_query( regardless of the value of this parameter. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg refresh: If `true`, Opensearch refreshes affected shards to make the operation visible to search. @@ -2803,8 +2292,6 @@ async def update_by_query( :arg slices: The number of slices this task should be divided into. Valid choices are auto. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg terminate_after: Maximum number of documents to collect for @@ -2840,9 +2327,7 @@ async def update_by_query( body=body, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") async def update_by_query_rethrottle( self, task_id: Any, @@ -2855,18 +2340,8 @@ async def update_by_query_rethrottle( :arg task_id: The ID for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -2878,7 +2353,7 @@ async def update_by_query_rethrottle( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_script_context( self, params: Any = None, @@ -2887,23 +2362,12 @@ async def get_script_context( """ Returns all script contexts. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_script_context", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_script_languages( self, params: Any = None, @@ -2912,17 +2376,6 @@ async def get_script_languages( """ Returns available script types, languages and contexts. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_script_language", params=params, headers=headers @@ -2930,15 +2383,10 @@ async def get_script_languages( @query_params( "allow_partial_pit_creation", - "error_trace", "expand_wildcards", - "filter_path", - "human", "keep_alive", "preference", - "pretty", "routing", - "source", ) async def create_pit( self, @@ -2954,23 +2402,13 @@ async def create_pit( string to perform the operation on all indices. :arg allow_partial_pit_creation: Allow if point in time can be created with partial failures. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg keep_alive: Specify the keep alive for point in time. :arg preference: Specify the node or shard the operation should be performed on. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg routing: Comma-separated list of specific routing values. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -2982,7 +2420,7 @@ async def create_pit( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_all_pits( self, params: Any = None, @@ -2991,23 +2429,12 @@ async def delete_all_pits( """ Deletes all active point in time searches. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", "/_search/point_in_time/_all", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_pit( self, body: Any = None, @@ -3019,16 +2446,6 @@ async def delete_pit( :arg body: The point-in-time ids to be deleted - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", @@ -3038,7 +2455,7 @@ async def delete_pit( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_all_pits( self, params: Any = None, @@ -3047,17 +2464,6 @@ async def get_all_pits( """ Lists all active point in time searches. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_search/point_in_time/_all", params=params, headers=headers diff --git a/opensearchpy/_async/client/cat.py b/opensearchpy/_async/client/cat.py index 70779bce8..204df39b2 100644 --- a/opensearchpy/_async/client/cat.py +++ b/opensearchpy/_async/client/cat.py @@ -40,20 +40,7 @@ class CatClient(NamespacedClient): - @query_params( - "error_trace", - "expand_wildcards", - "filter_path", - "format", - "h", - "help", - "human", - "local", - "pretty", - "s", - "source", - "v", - ) + @query_params("expand_wildcards", "format", "h", "help", "local", "s", "v") async def aliases( self, name: Any = None, @@ -68,46 +55,24 @@ async def aliases( :arg name: A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( "GET", _make_path("_cat", "aliases", name), params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") async def all_pit_segments( self, params: Any = None, @@ -119,22 +84,12 @@ async def all_pit_segments( :arg bytes: The unit in which to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -144,17 +99,12 @@ async def all_pit_segments( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def allocation( @@ -174,27 +124,17 @@ async def allocation( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -206,17 +146,12 @@ async def allocation( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def cluster_manager( @@ -230,45 +165,24 @@ async def cluster_manager( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( "GET", "/_cat/cluster_manager", params=params, headers=headers ) - @query_params( - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("format", "h", "help", "s", "v") async def count( self, index: Any = None, @@ -283,41 +197,19 @@ async def count( :arg index: Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( "GET", _make_path("_cat", "count", index), params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") async def fielddata( self, fields: Any = None, @@ -333,22 +225,12 @@ async def fielddata( returned information. :arg bytes: The unit used to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -358,20 +240,7 @@ async def fielddata( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "time", - "ts", - "v", - ) + @query_params("format", "h", "help", "s", "time", "ts", "v") async def health( self, params: Any = None, @@ -381,22 +250,12 @@ async def health( Returns a concise representation of the cluster health. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. @@ -407,9 +266,7 @@ async def health( "GET", "/_cat/health", params=params, headers=headers ) - @query_params( - "error_trace", "filter_path", "help", "human", "pretty", "s", "source" - ) + @query_params("help", "s") async def help( self, params: Any = None, @@ -419,19 +276,9 @@ async def help( Returns help for the Cat APIs. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_cat", params=params, headers=headers @@ -440,21 +287,16 @@ async def help( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "format", "h", "health", "help", - "human", "include_unloaded_segments", "local", "master_timeout", - "pretty", "pri", "s", - "source", "time", "v", ) @@ -476,12 +318,8 @@ async def indices( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: The type of index that wildcard patterns can match. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg format: A short version of the Accept header, e.g. json, yaml. :arg h: Comma-separated list of column names to display. @@ -489,8 +327,6 @@ async def indices( By default, the response includes indices of any health status. Valid choices are green, yellow, red. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg include_unloaded_segments: If true, the response includes information from segments that are not loaded into memory. Default is false. @@ -499,14 +335,10 @@ async def indices( :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg pri: If true, the response only includes information from primary shards. Default is false. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -517,17 +349,12 @@ async def indices( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def master( @@ -541,27 +368,17 @@ async def master( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ from warnings import warn @@ -575,17 +392,12 @@ async def master( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def nodeattrs( @@ -599,27 +411,17 @@ async def nodeattrs( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -629,18 +431,13 @@ async def nodeattrs( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "full_id", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -657,29 +454,19 @@ async def nodes( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg format: A short version of the Accept header, e.g. json, yaml. :arg full_id: If `true`, return the full node ID. If `false`, return the shortened node ID. Default is false. :arg h: Comma-separated list of column names to display. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -690,17 +477,12 @@ async def nodes( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -715,27 +497,17 @@ async def pending_tasks( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -744,19 +516,7 @@ async def pending_tasks( "GET", "/_cat/pending_tasks", params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") async def pit_segments( self, body: Any = None, @@ -769,22 +529,12 @@ async def pit_segments( :arg bytes: The unit in which to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -793,17 +543,12 @@ async def pit_segments( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def plugins( @@ -817,27 +562,17 @@ async def plugins( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -845,20 +580,7 @@ async def plugins( ) @query_params( - "active_only", - "bytes", - "detailed", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "time", - "v", + "active_only", "bytes", "detailed", "format", "h", "help", "s", "time", "v" ) async def recovery( self, @@ -878,22 +600,12 @@ async def recovery( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -904,17 +616,12 @@ async def recovery( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def repositories( @@ -928,27 +635,17 @@ async def repositories( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -961,19 +658,14 @@ async def repositories( "bytes", "completed_only", "detailed", - "error_trace", "expand_wildcards", - "filter_path", "format", "h", "help", - "human", "ignore_throttled", "ignore_unavailable", - "pretty", "s", "shards", - "source", "time", "timeout", "v", @@ -1002,30 +694,20 @@ async def segment_replication( latest completed segment replication events. Default is false. :arg detailed: If `true`, the response includes detailed information about segment replications. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: Whether specified concrete, expanded or aliased indices should be ignored when throttled. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. :arg shards: Comma-separated list of shards to display. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg timeout: Operation timeout. @@ -1041,16 +723,11 @@ async def segment_replication( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "master_timeout", - "pretty", "s", - "source", "v", ) async def segments( @@ -1070,25 +747,15 @@ async def segments( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -1098,17 +765,12 @@ async def segments( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -1129,27 +791,17 @@ async def shards( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1160,18 +812,13 @@ async def shards( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", "size", - "source", "v", ) async def thread_pool( @@ -1189,28 +836,18 @@ async def thread_pool( names used to limit the request. Accepts wildcard expressions. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. :arg size: The multiplier in which to display values. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -1222,17 +859,12 @@ async def thread_pool( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "ignore_unavailable", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -1252,27 +884,17 @@ async def snapshots( returns an error. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, the response does not include information from unavailable snapshots. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1287,17 +909,12 @@ async def snapshots( @query_params( "actions", "detailed", - "error_trace", - "filter_path", "format", "h", "help", - "human", "nodes", "parent_task_id", - "pretty", "s", - "source", "time", "v", ) @@ -1315,28 +932,18 @@ async def tasks( response. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :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. :arg parent_task_id: The parent task identifier, which is used to limit the response. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1347,17 +954,12 @@ async def tasks( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) async def templates( @@ -1374,27 +976,17 @@ async def templates( expressions. If omitted, all templates are returned. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( diff --git a/opensearchpy/_async/client/cluster.py b/opensearchpy/_async/client/cluster.py index 04682b265..d5c79e9ef 100644 --- a/opensearchpy/_async/client/cluster.py +++ b/opensearchpy/_async/client/cluster.py @@ -43,15 +43,10 @@ class ClusterClient(NamespacedClient): @query_params( "awareness_attribute", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "level", "local", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", "wait_for_events", @@ -78,15 +73,9 @@ async def health( health is required. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg level: Can be one of cluster, indices or shards. Controls the details level of the health information returned. Valid choices are cluster, indices, shards, awareness_attributes. @@ -97,10 +86,6 @@ async def health( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -135,16 +120,7 @@ async def health( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") async def pending_tasks( self, params: Any = None, @@ -157,12 +133,6 @@ async def pending_tasks( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master node. Default is false. @@ -170,10 +140,6 @@ async def pending_tasks( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_cluster/pending_tasks", params=params, headers=headers @@ -182,16 +148,11 @@ async def pending_tasks( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "local", "master_timeout", - "pretty", - "source", "wait_for_metadata_version", "wait_for_timeout", ) @@ -215,17 +176,11 @@ async def state( string or when no indices have been specified) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg local: Return local information, do not retrieve the state @@ -233,10 +188,6 @@ async def state( :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_metadata_version: Wait for the metadata version to be equal or greater than the specified metadata version :arg wait_for_timeout: The maximum time to wait for @@ -252,15 +203,7 @@ async def state( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "flat_settings", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("flat_settings", "timeout") async def stats( self, node_id: Any = None, @@ -273,18 +216,8 @@ async def stats( :arg node_id: Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for each node to respond.If a node does not respond before its timeout expires, the response does not include its stats.However, timed out nodes are included in the @@ -304,15 +237,10 @@ async def stats( @query_params( "cluster_manager_timeout", "dry_run", - "error_trace", "explain", - "filter_path", - "human", "master_timeout", "metric", - "pretty", "retry_failed", - "source", "timeout", ) async def reroute( @@ -331,26 +259,16 @@ async def reroute( to cluster-manager node. :arg dry_run: If true, then the request simulates the operation only and returns the resulting state. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg explain: If true, then the response contains an explanation of why the commands can or cannot be executed. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. :arg metric: Limits the information returned to the specified metrics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg retry_failed: If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -361,14 +279,9 @@ async def reroute( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "flat_settings", - "human", "include_defaults", "master_timeout", - "pretty", - "source", "timeout", ) async def get_settings( @@ -382,24 +295,14 @@ async def get_settings( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg include_defaults: If `true`, returns default cluster settings from the local node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -409,15 +312,7 @@ async def get_settings( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "cluster_manager_timeout", "flat_settings", "master_timeout", "timeout" ) async def put_settings( self, @@ -433,21 +328,11 @@ async def put_settings( or `persistent` (survives cluster restart). :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if body in SKIP_IN_PATH: @@ -457,7 +342,7 @@ async def put_settings( "PUT", "/_cluster/settings", params=params, headers=headers, body=body ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def remote_info( self, params: Any = None, @@ -466,31 +351,12 @@ async def remote_info( """ Returns the information about configured remote clusters. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_remote/info", params=params, headers=headers ) - @query_params( - "error_trace", - "filter_path", - "human", - "include_disk_info", - "include_yes_decisions", - "pretty", - "source", - ) + @query_params("include_disk_info", "include_yes_decisions") async def allocation_explain( self, body: Any = None, @@ -503,20 +369,10 @@ async def allocation_explain( :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg include_disk_info: If true, returns information about disk usage and shard sizes. Default is false. :arg include_yes_decisions: If true, returns YES decisions in explanation. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -526,16 +382,7 @@ async def allocation_explain( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_component_template( self, name: Any, @@ -550,20 +397,10 @@ async def delete_component_template( (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -578,16 +415,7 @@ async def delete_component_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") async def get_component_template( self, name: Any = None, @@ -602,12 +430,6 @@ async def get_component_template( (`*`) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master node. Default is false. @@ -615,10 +437,6 @@ async def get_component_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -627,17 +445,7 @@ async def get_component_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "create", "master_timeout", "timeout") async def put_component_template( self, name: Any, @@ -664,20 +472,10 @@ async def put_component_template( to cluster-manager node. :arg create: If `true`, this request cannot replace or update existing component templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ for param in (name, body): @@ -692,16 +490,7 @@ async def put_component_template( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") async def exists_component_template( self, name: Any, @@ -716,12 +505,6 @@ async def exists_component_template( Wildcard (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If true, the request retrieves information from the local node only.Defaults to false, which means information is retrieved from the master node. Default is false. @@ -729,10 +512,6 @@ async def exists_component_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -744,9 +523,7 @@ async def exists_component_template( headers=headers, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "source", "wait_for_removal" - ) + @query_params("wait_for_removal") async def delete_voting_config_exclusions( self, params: Any = None, @@ -756,16 +533,6 @@ async def delete_voting_config_exclusions( Clears cluster voting config exclusions. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_removal: Specifies whether to wait for all excluded nodes to be removed from thecluster before clearing the voting configuration exclusions list.Defaults to true, meaning that all @@ -781,16 +548,7 @@ async def delete_voting_config_exclusions( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "human", - "node_ids", - "node_names", - "pretty", - "source", - "timeout", - ) + @query_params("node_ids", "node_names", "timeout") async def post_voting_config_exclusions( self, params: Any = None, @@ -800,22 +558,12 @@ async def post_voting_config_exclusions( Updates the cluster voting config exclusions by node ids or node names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg node_ids: A comma-separated list of the persistent ids of the nodes to excludefrom the voting configuration. If specified, you may not also specify node_names. :arg node_names: A comma-separated list of the names of the nodes to exclude from thevoting configuration. If specified, you may not also specify node_ids. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: When adding a voting configuration exclusion, the API waits for thespecified nodes to be excluded from the voting configuration beforereturning. If the timeout expires before the @@ -826,7 +574,7 @@ async def post_voting_config_exclusions( "POST", "/_cluster/voting_config_exclusions", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_decommission_awareness( self, params: Any = None, @@ -835,23 +583,12 @@ async def delete_decommission_awareness( """ Delete any existing decommission. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", "/_cluster/decommission/awareness", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_weighted_routing( self, params: Any = None, @@ -860,17 +597,6 @@ async def delete_weighted_routing( """ Delete weighted shard routing weights. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", @@ -879,7 +605,7 @@ async def delete_weighted_routing( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_decommission_awareness( self, awareness_attribute_name: Any, @@ -891,16 +617,6 @@ async def get_decommission_awareness( :arg awareness_attribute_name: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if awareness_attribute_name in SKIP_IN_PATH: raise ValueError( @@ -920,7 +636,7 @@ async def get_decommission_awareness( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_weighted_routing( self, attribute: Any, @@ -932,16 +648,6 @@ async def get_weighted_routing( :arg attribute: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if attribute in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'attribute'.") @@ -953,7 +659,7 @@ async def get_weighted_routing( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def put_decommission_awareness( self, awareness_attribute_name: Any, @@ -967,16 +673,6 @@ async def put_decommission_awareness( :arg awareness_attribute_name: Awareness attribute name. :arg awareness_attribute_value: Awareness attribute value. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (awareness_attribute_name, awareness_attribute_value): if param in SKIP_IN_PATH: @@ -995,7 +691,7 @@ async def put_decommission_awareness( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def put_weighted_routing( self, attribute: Any, @@ -1007,16 +703,6 @@ async def put_weighted_routing( :arg attribute: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if attribute in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'attribute'.") diff --git a/opensearchpy/_async/client/dangling_indices.py b/opensearchpy/_async/client/dangling_indices.py index 75e64013d..904fe6af0 100644 --- a/opensearchpy/_async/client/dangling_indices.py +++ b/opensearchpy/_async/client/dangling_indices.py @@ -41,15 +41,7 @@ class DanglingIndicesClient(NamespacedClient): @query_params( - "accept_data_loss", - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "accept_data_loss", "cluster_manager_timeout", "master_timeout", "timeout" ) async def delete_dangling_index( self, @@ -66,19 +58,9 @@ async def delete_dangling_index( the dangling index :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if index_uuid in SKIP_IN_PATH: @@ -92,15 +74,7 @@ async def delete_dangling_index( ) @query_params( - "accept_data_loss", - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "accept_data_loss", "cluster_manager_timeout", "master_timeout", "timeout" ) async def import_dangling_index( self, @@ -117,19 +91,9 @@ async def import_dangling_index( the dangling index :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if index_uuid in SKIP_IN_PATH: @@ -139,7 +103,7 @@ async def import_dangling_index( "POST", _make_path("_dangling", index_uuid), params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def list_dangling_indices( self, params: Any = None, @@ -148,17 +112,6 @@ async def list_dangling_indices( """ Returns all dangling indices. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_dangling", params=params, headers=headers diff --git a/opensearchpy/_async/client/indices.py b/opensearchpy/_async/client/indices.py index 66e4e60f1..8292907ad 100644 --- a/opensearchpy/_async/client/indices.py +++ b/opensearchpy/_async/client/indices.py @@ -40,7 +40,7 @@ class IndicesClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def analyze( self, body: Any = None, @@ -56,16 +56,6 @@ async def analyze( :arg body: Define analyzer/tokenizer parameters and the text on which the analysis should be performed :arg index: The name of the index to scope the operation. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -75,16 +65,7 @@ async def analyze( body=body, ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable") async def refresh( self, index: Any = None, @@ -102,23 +83,13 @@ async def refresh( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", _make_path(index, "_refresh"), params=params, headers=headers @@ -126,14 +97,9 @@ async def refresh( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "force", - "human", "ignore_unavailable", - "pretty", - "source", "wait_if_ongoing", ) async def flush( @@ -153,25 +119,15 @@ async def flush( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg force: If `true`, the request forces a flush even if there are no changes to commit to the index. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_if_ongoing: If `true`, the flush operation blocks until execution when another flush operation is running.If `false`, Opensearch returns an error if you request a flush when another flush @@ -182,15 +138,7 @@ async def flush( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - "wait_for_active_shards", + "cluster_manager_timeout", "master_timeout", "timeout", "wait_for_active_shards" ) async def create( self, @@ -208,20 +156,10 @@ async def create( `mappings`) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -239,12 +177,7 @@ async def create( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -268,20 +201,10 @@ async def clone( and `aliases`) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -309,17 +232,12 @@ async def clone( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", "master_timeout", - "pretty", - "source", ) async def get( self, @@ -342,19 +260,13 @@ async def get( is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard expressions can match. If the request can target data streams, this argumentdetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,such as open,hidden. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If false, requests that target a missing index return an error. Default is false. :arg include_defaults: If true, return all default settings in @@ -366,10 +278,6 @@ async def get( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -381,14 +289,9 @@ async def get( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -417,27 +320,17 @@ async def open( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -460,14 +353,9 @@ async def open( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", ) @@ -489,27 +377,17 @@ async def close( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -528,14 +406,9 @@ async def close( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", ) async def delete( @@ -558,27 +431,17 @@ async def delete( targets other open indices. Default is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -592,16 +455,11 @@ async def delete( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", - "pretty", - "source", ) async def exists( self, @@ -619,29 +477,19 @@ async def exists( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. Default is false. :arg include_defaults: If `true`, return all default settings in the response. Default is false. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -653,14 +501,9 @@ async def exists( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", "write_index_only", ) @@ -684,27 +527,17 @@ async def put_mapping( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -728,15 +561,10 @@ async def put_mapping( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "local", "master_timeout", - "pretty", - "source", ) async def get_mapping( self, @@ -757,17 +585,11 @@ async def get_mapping( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from @@ -776,10 +598,6 @@ async def get_mapping( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_mapping"), params=params, headers=headers @@ -787,15 +605,10 @@ async def get_mapping( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "include_defaults", "local", - "pretty", - "source", ) async def get_field_mapping( self, @@ -817,27 +630,17 @@ async def get_field_mapping( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in the response. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if fields in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'fields'.") @@ -849,16 +652,7 @@ async def get_field_mapping( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def put_alias( self, index: Any, @@ -880,20 +674,10 @@ async def put_alias( `filter` :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -910,17 +694,7 @@ async def put_alias( body=body, ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "local", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable", "local") async def exists_alias( self, name: Any, @@ -941,26 +715,16 @@ async def exists_alias( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, requests that include a missing data stream or index in the target indices or data streams return an error. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -969,17 +733,7 @@ async def exists_alias( "HEAD", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "local", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable", "local") async def get_alias( self, index: Any = None, @@ -1001,40 +755,21 @@ async def get_alias( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def update_aliases( self, body: Any, @@ -1048,20 +783,10 @@ async def update_aliases( :arg body: The definition of `actions` to perform :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1073,16 +798,7 @@ async def update_aliases( "POST", "/_aliases", params=params, headers=headers, body=body ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_alias( self, index: Any, @@ -1100,20 +816,10 @@ async def delete_alias( wildcards (`*`). To remove all aliases, use `*` or `_all`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1126,17 +832,7 @@ async def delete_alias( "DELETE", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "order", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "create", "master_timeout", "order") async def put_template( self, name: Any, @@ -1154,12 +850,6 @@ async def put_template( to cluster-manager node. :arg create: If true, this request cannot replace or update existing index templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -1168,10 +858,6 @@ async def put_template( indexmatches multiple templates.Templates with lower 'order' values are merged first. Templates with higher'order' values are merged later, overriding templates with lower values. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (name, body): if param in SKIP_IN_PATH: @@ -1185,17 +871,7 @@ async def put_template( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") async def exists_template( self, name: Any, @@ -1209,23 +885,13 @@ async def exists_template( :arg name: The comma separated names of the index templates :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -1234,17 +900,7 @@ async def exists_template( "HEAD", _make_path("_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") async def get_template( self, name: Any = None, @@ -1261,39 +917,20 @@ async def get_template( `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_template( self, name: Any, @@ -1308,20 +945,10 @@ async def delete_template( Wildcard (`*`) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1336,17 +963,12 @@ async def delete_template( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", "master_timeout", - "pretty", - "source", ) async def get_settings( self, @@ -1372,19 +994,13 @@ async def get_settings( `bar`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in @@ -1396,10 +1012,6 @@ async def get_settings( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_settings", name), params=params, headers=headers @@ -1408,16 +1020,11 @@ async def get_settings( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "master_timeout", "preserve_existing", - "pretty", - "source", "timeout", ) async def put_settings( @@ -1442,19 +1049,13 @@ async def put_settings( `bar`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can targetdata streams, this argument determines whether wildcard expressions matchhidden data streams. Supports comma- separated values, such as`open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). :arg master_timeout (Deprecated: To promote inclusive language, @@ -1463,10 +1064,6 @@ async def put_settings( expires, the request fails and returns anerror. :arg preserve_existing: If `true`, existing index settings remain unchanged. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -1484,19 +1081,14 @@ async def put_settings( @query_params( "completion_fields", - "error_trace", "expand_wildcards", "fielddata_fields", "fields", - "filter_path", "forbid_closed_indices", "groups", - "human", "include_segment_file_sizes", "include_unloaded_segments", "level", - "pretty", - "source", ) async def stats( self, @@ -1515,8 +1107,6 @@ async def stats( metrics. :arg completion_fields: Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams, this argumentdetermines whether wildcard expressions match hidden data streams. Supports comma- @@ -1526,14 +1116,10 @@ async def stats( expressions of fields to include in fielddata statistics. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg forbid_closed_indices: If true, statistics are not collected from closed indices. Default is True. :arg groups: Comma-separated list of search groups to include in the search statistics. - :arg human: Whether to return human readable values for - statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). Default is false. @@ -1543,25 +1129,13 @@ async def stats( :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_stats", metric), params=params, headers=headers ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - "verbose", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "verbose" ) async def segments( self, @@ -1580,23 +1154,13 @@ async def segments( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the request returns a verbose response. Default is false. """ @@ -1611,17 +1175,12 @@ async def segments( "analyzer", "default_operator", "df", - "error_trace", "expand_wildcards", "explain", - "filter_path", - "human", "ignore_unavailable", "lenient", - "pretty", "q", "rewrite", - "source", ) async def validate_query( self, @@ -1654,8 +1213,6 @@ async def validate_query( :arg df: Field to use as default where no field prefix is given in the query string.This parameter can only be used when the `q` query string parameter is specified. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -1663,21 +1220,13 @@ async def validate_query( `closed`, `hidden`, `none`. :arg explain: If `true`, the response returns detailed information if an error has occurred. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg rewrite: If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -1689,17 +1238,12 @@ async def validate_query( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", "fielddata", "fields", - "filter_path", - "human", "ignore_unavailable", - "pretty", "query", "request", - "source", ) async def clear_cache( self, @@ -1717,8 +1261,6 @@ async def clear_cache( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -1728,32 +1270,16 @@ async def clear_cache( `fields` parameter to clear the cache of specific fields only. :arg fields: Comma-separated list of field names used to limit the `fielddata` parameter. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. :arg query: If `true`, clears the query cache. :arg request: If `true`, clears the request cache. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", _make_path(index, "_cache", "clear"), params=params, headers=headers ) - @query_params( - "active_only", - "detailed", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("active_only", "detailed") async def recovery( self, index: Any = None, @@ -1771,16 +1297,6 @@ async def recovery( shard recoveries. Default is false. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_recovery"), params=params, headers=headers @@ -1788,14 +1304,9 @@ async def recovery( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "only_ancient_segments", - "pretty", - "source", "wait_for_completion", ) async def upgrade( @@ -1813,23 +1324,13 @@ async def upgrade( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). :arg only_ancient_segments: If true, only ancient (an older Lucene major release) segments will be upgraded. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning. Default is false. """ @@ -1837,16 +1338,7 @@ async def upgrade( "POST", _make_path(index, "_upgrade"), params=params, headers=headers ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable") async def get_upgrade( self, index: Any = None, @@ -1862,36 +1354,18 @@ async def get_upgrade( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path(index, "_upgrade"), params=params, headers=headers ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - "status", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "status" ) async def shard_stores( self, @@ -1909,22 +1383,12 @@ async def shard_stores( any wildcard expression, index alias, or _allvalue targets only missing or closed indices. This behavior applies even if the requesttargets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams,this argument determines whether wildcard expressions match hidden data streams. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If true, missing or closed indices are not included in the response. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg status: List of shard health statuses used to limit the request. """ @@ -1934,17 +1398,12 @@ async def shard_stores( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "flush", - "human", "ignore_unavailable", "max_num_segments", "only_expunge_deletes", - "pretty", "primary_only", - "source", "wait_for_completion", ) async def forcemerge( @@ -1962,17 +1421,11 @@ async def forcemerge( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flush: Specify whether the index should be flushed after performing the operation. Default is True. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg max_num_segments: The number of larger segments into which @@ -1981,12 +1434,8 @@ async def forcemerge( as necessary. :arg only_expunge_deletes: Specify whether the operation should only expunge deleted documents - :arg pretty: Whether to pretty format the returned JSON - response. :arg primary_only: Specify whether the operation should only perform on primary shards. Defaults to false. Default is false. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request wait until the force merge is completed. Default is True. """ @@ -1997,12 +1446,7 @@ async def forcemerge( @query_params( "cluster_manager_timeout", "copy_settings", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -2028,20 +1472,10 @@ async def shrink( to cluster-manager node. :arg copy_settings: whether or not to copy settings from the source index. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -2069,12 +1503,7 @@ async def shrink( @query_params( "cluster_manager_timeout", "copy_settings", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -2101,20 +1530,10 @@ async def split( to cluster-manager node. :arg copy_settings: whether or not to copy settings from the source index. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -2142,12 +1561,7 @@ async def split( @query_params( "cluster_manager_timeout", "dry_run", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", ) @@ -2174,20 +1588,10 @@ async def rollover( :arg dry_run: If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -2207,7 +1611,7 @@ async def rollover( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_data_stream( self, name: Any, @@ -2226,16 +1630,6 @@ async def create_data_stream( longer than 255 bytes. Multi-byte characters count towards this limit faster. :arg body: The data stream definition - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2248,7 +1642,7 @@ async def create_data_stream( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_data_stream( self, name: Any, @@ -2261,16 +1655,6 @@ async def delete_data_stream( :arg name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2279,16 +1663,7 @@ async def delete_data_stream( "DELETE", _make_path("_data_stream", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_index_template( self, name: Any, @@ -2303,20 +1678,10 @@ async def delete_index_template( expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -2331,17 +1696,7 @@ async def delete_index_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") async def exists_index_template( self, name: Any, @@ -2356,24 +1711,14 @@ async def exists_index_template( Wildcard (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2382,17 +1727,7 @@ async def exists_index_template( "HEAD", _make_path("_index_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") async def get_index_template( self, name: Any = None, @@ -2407,14 +1742,8 @@ async def get_index_template( expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. Default is false. @@ -2422,26 +1751,12 @@ async def get_index_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_index_template", name), params=params, headers=headers ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") async def put_index_template( self, name: Any, @@ -2461,19 +1776,9 @@ async def put_index_template( to cluster-manager node. :arg create: If `true`, this request cannot replace or update existing index templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (name, body): if param in SKIP_IN_PATH: @@ -2487,17 +1792,7 @@ async def put_index_template( body=body, ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") async def simulate_index_template( self, name: Any, @@ -2522,20 +1817,10 @@ async def simulate_index_template( the simulation usesthe template with the highest priority. Note that the template is notpermanently added or updated in either case; it is only used for thesimulation. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is receivedbefore the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2548,7 +1833,7 @@ async def simulate_index_template( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_data_stream( self, name: Any = None, @@ -2562,32 +1847,12 @@ async def get_data_stream( :arg name: Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_data_stream", name), params=params, headers=headers ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") async def simulate_template( self, body: Any = None, @@ -2611,20 +1876,10 @@ async def simulate_template( the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "POST", @@ -2634,9 +1889,7 @@ async def simulate_template( body=body, ) - @query_params( - "error_trace", "expand_wildcards", "filter_path", "human", "pretty", "source" - ) + @query_params("expand_wildcards") async def resolve_index( self, name: Any, @@ -2650,21 +1903,11 @@ async def resolve_index( :arg name: Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2676,14 +1919,9 @@ async def resolve_index( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", ) async def add_block( @@ -2705,24 +1943,14 @@ async def add_block( string or when no indices have been specified) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ for param in (index, block): @@ -2733,7 +1961,7 @@ async def add_block( "PUT", _make_path(index, "_block", block), params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def data_streams_stats( self, name: Any = None, @@ -2747,16 +1975,6 @@ async def data_streams_stats( :arg name: Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", diff --git a/opensearchpy/_async/client/ingest.py b/opensearchpy/_async/client/ingest.py index 848466382..1eaf58840 100644 --- a/opensearchpy/_async/client/ingest.py +++ b/opensearchpy/_async/client/ingest.py @@ -40,15 +40,7 @@ class IngestClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") async def get_pipeline( self, id: Any = None, @@ -64,35 +56,16 @@ async def get_pipeline( omit this parameter or use `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def put_pipeline( self, id: Any, @@ -108,20 +81,10 @@ async def put_pipeline( :arg body: The ingest definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -138,16 +101,7 @@ async def put_pipeline( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_pipeline( self, id: Any, @@ -163,20 +117,10 @@ async def delete_pipeline( value of `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -191,7 +135,7 @@ async def delete_pipeline( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "verbose") + @query_params("verbose") async def simulate( self, body: Any, @@ -206,16 +150,6 @@ async def simulate( :arg body: The simulate definition :arg id: Pipeline to test. If you don’t specify a `pipeline` in the request body, this parameter is required. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the response includes output data for each processor in the executed pipeline. Default is false. """ @@ -230,7 +164,7 @@ async def simulate( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def processor_grok( self, params: Any = None, @@ -239,17 +173,6 @@ async def processor_grok( """ Returns a list of the built-in patterns. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_ingest/processor/grok", params=params, headers=headers diff --git a/opensearchpy/_async/client/nodes.py b/opensearchpy/_async/client/nodes.py index eba764885..7567ce8d2 100644 --- a/opensearchpy/_async/client/nodes.py +++ b/opensearchpy/_async/client/nodes.py @@ -40,7 +40,7 @@ class NodesClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") async def reload_secure_settings( self, body: Any = None, @@ -56,16 +56,6 @@ async def reload_secure_settings( keystore :arg node_id: The names of particular nodes in the cluster to target. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -78,15 +68,7 @@ async def reload_secure_settings( body=body, ) - @query_params( - "error_trace", - "filter_path", - "flat_settings", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("flat_settings", "timeout") async def info( self, node_id: Any = None, @@ -102,18 +84,8 @@ async def info( limit returned information. :arg metric: Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -124,16 +96,11 @@ async def info( @query_params( "completion_fields", - "error_trace", "fielddata_fields", "fields", - "filter_path", "groups", - "human", "include_segment_file_sizes", "level", - "pretty", - "source", "timeout", "types", ) @@ -158,28 +125,18 @@ async def stats( all) metric is specified. :arg completion_fields: Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg fielddata_fields: Comma-separated list or wildcard expressions of fields to include in fielddata statistics. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg groups: Comma-separated list of search groups to include in the search statistics. - :arg human: Whether to return human readable values for - statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). Default is false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -194,17 +151,7 @@ async def stats( ) @query_params( - "doc_type", - "error_trace", - "filter_path", - "human", - "ignore_idle_threads", - "interval", - "pretty", - "snapshots", - "source", - "threads", - "timeout", + "doc_type", "ignore_idle_threads", "interval", "snapshots", "threads", "timeout" ) async def hot_threads( self, @@ -222,22 +169,12 @@ async def hot_threads( nodes. :arg doc_type: The type to sample. Valid choices are cpu, wait, block. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_idle_threads: Don't show threads that are in known- idle places, such as waiting on a socket select or pulling from an empty task queue. Default is True. :arg interval: The interval for the second sampling of threads. - :arg pretty: Whether to pretty format the returned JSON - response. :arg snapshots: Number of samples of thread stacktrace. Default is 10. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg threads: Specify the number of threads to provide information for. Default is 3. :arg timeout: Operation timeout. @@ -253,7 +190,7 @@ async def hot_threads( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") async def usage( self, node_id: Any = None, @@ -272,16 +209,6 @@ async def usage( :arg metric: Limits the information returned to the specific metrics. A comma-separated list of the following options: `_all`, `rest_actions`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. diff --git a/opensearchpy/_async/client/remote_store.py b/opensearchpy/_async/client/remote_store.py index 143ce0b3d..7b97513c3 100644 --- a/opensearchpy/_async/client/remote_store.py +++ b/opensearchpy/_async/client/remote_store.py @@ -22,15 +22,7 @@ class RemoteStoreClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "wait_for_completion") async def restore( self, body: Any, @@ -44,16 +36,6 @@ async def restore( :arg body: Comma-separated list of index IDs :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning. Default is false. """ diff --git a/opensearchpy/_async/client/search_pipeline.py b/opensearchpy/_async/client/search_pipeline.py index 9225085fb..ebb68b1fd 100644 --- a/opensearchpy/_async/client/search_pipeline.py +++ b/opensearchpy/_async/client/search_pipeline.py @@ -22,14 +22,7 @@ class SearchPipelineClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout") async def get( self, id: Any = None, @@ -44,30 +37,12 @@ async def get( supported. :arg cluster_manager_timeout: operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_search", "pipeline", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "timeout") async def delete( self, id: Any, @@ -81,16 +56,6 @@ async def delete( :arg id: Pipeline ID. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ if id in SKIP_IN_PATH: @@ -103,15 +68,7 @@ async def delete( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "timeout") async def put( self, id: Any, @@ -126,16 +83,6 @@ async def put( :arg id: Pipeline ID. :arg cluster_manager_timeout: operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ for param in (id, body): diff --git a/opensearchpy/_async/client/security.py b/opensearchpy/_async/client/security.py index eff252eef..33ec056e3 100644 --- a/opensearchpy/_async/client/security.py +++ b/opensearchpy/_async/client/security.py @@ -24,7 +24,7 @@ class SecurityClient(NamespacedClient): from ._patch import health_check, update_audit_config # type: ignore - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_account_details( self, params: Any = None, @@ -33,23 +33,12 @@ async def get_account_details( """ Returns account details for the current user. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/api/account", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def change_password( self, body: Any, @@ -60,16 +49,6 @@ async def change_password( Changes the password for the current user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -82,7 +61,7 @@ async def change_password( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_action_group( self, action_group: Any, @@ -94,16 +73,6 @@ async def get_action_group( :arg action_group: Action group to retrieve. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if action_group in SKIP_IN_PATH: raise ValueError( @@ -117,7 +86,7 @@ async def get_action_group( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_action_groups( self, params: Any = None, @@ -126,17 +95,6 @@ async def get_action_groups( """ Retrieves all action groups. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -145,7 +103,7 @@ async def get_action_groups( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_action_group( self, action_group: Any, @@ -157,16 +115,6 @@ async def delete_action_group( :arg action_group: Action group to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if action_group in SKIP_IN_PATH: raise ValueError( @@ -180,7 +128,7 @@ async def delete_action_group( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_action_group( self, action_group: Any, @@ -194,16 +142,6 @@ async def create_action_group( :arg action_group: The name of the action group to create or replace - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (action_group, body): if param in SKIP_IN_PATH: @@ -217,7 +155,7 @@ async def create_action_group( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_action_group( self, action_group: Any, @@ -229,16 +167,6 @@ async def patch_action_group( Updates individual attributes of an action group. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (action_group, body): if param in SKIP_IN_PATH: @@ -253,7 +181,7 @@ async def patch_action_group( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_action_groups( self, body: Any, @@ -264,16 +192,6 @@ async def patch_action_groups( Creates, updates, or deletes multiple action groups in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -287,7 +205,7 @@ async def patch_action_groups( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_user( self, username: Any, @@ -298,16 +216,6 @@ async def get_user( Retrieve one internal user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if username in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'username'.") @@ -319,7 +227,7 @@ async def get_user( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_users( self, params: Any = None, @@ -328,17 +236,6 @@ async def get_users( """ Retrieve all internal users. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -347,7 +244,7 @@ async def get_users( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_user( self, username: Any, @@ -358,16 +255,6 @@ async def delete_user( Delete the specified user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if username in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'username'.") @@ -379,7 +266,7 @@ async def delete_user( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_user( self, username: Any, @@ -391,16 +278,6 @@ async def create_user( Creates or replaces the specified user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (username, body): if param in SKIP_IN_PATH: @@ -414,7 +291,7 @@ async def create_user( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_user( self, username: Any, @@ -426,16 +303,6 @@ async def patch_user( Updates individual attributes of an internal user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (username, body): if param in SKIP_IN_PATH: @@ -450,7 +317,7 @@ async def patch_user( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_users( self, body: Any, @@ -461,16 +328,6 @@ async def patch_users( Creates, updates, or deletes multiple internal users in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -484,7 +341,7 @@ async def patch_users( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_role( self, role: Any, @@ -495,16 +352,6 @@ async def get_role( Retrieves one role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -516,7 +363,7 @@ async def get_role( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_roles( self, params: Any = None, @@ -525,23 +372,12 @@ async def get_roles( """ Retrieves all roles. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/api/roles/", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_role( self, role: Any, @@ -552,16 +388,6 @@ async def delete_role( Delete the specified role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -573,7 +399,7 @@ async def delete_role( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_role( self, role: Any, @@ -585,16 +411,6 @@ async def create_role( Creates or replaces the specified role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -608,7 +424,7 @@ async def create_role( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_role( self, role: Any, @@ -620,16 +436,6 @@ async def patch_role( Updates individual attributes of a role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -644,7 +450,7 @@ async def patch_role( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_roles( self, body: Any, @@ -655,16 +461,6 @@ async def patch_roles( Creates, updates, or deletes multiple roles in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -678,7 +474,7 @@ async def patch_roles( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_role_mapping( self, role: Any, @@ -689,16 +485,6 @@ async def get_role_mapping( Retrieves one role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -710,7 +496,7 @@ async def get_role_mapping( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_role_mappings( self, params: Any = None, @@ -719,17 +505,6 @@ async def get_role_mappings( """ Retrieves all role mappings. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -738,7 +513,7 @@ async def get_role_mappings( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_role_mapping( self, role: Any, @@ -749,16 +524,6 @@ async def delete_role_mapping( Deletes the specified role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -770,7 +535,7 @@ async def delete_role_mapping( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_role_mapping( self, role: Any, @@ -782,16 +547,6 @@ async def create_role_mapping( Creates or replaces the specified role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -805,7 +560,7 @@ async def create_role_mapping( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_role_mapping( self, role: Any, @@ -817,16 +572,6 @@ async def patch_role_mapping( Updates individual attributes of a role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -841,7 +586,7 @@ async def patch_role_mapping( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_role_mappings( self, body: Any, @@ -852,16 +597,6 @@ async def patch_role_mappings( Creates or updates multiple role mappings in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -875,7 +610,7 @@ async def patch_role_mappings( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_tenant( self, tenant: Any, @@ -886,16 +621,6 @@ async def get_tenant( Retrieves one tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if tenant in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'tenant'.") @@ -907,7 +632,7 @@ async def get_tenant( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_tenants( self, params: Any = None, @@ -916,23 +641,12 @@ async def get_tenants( """ Retrieves all tenants. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/api/tenants/", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_tenant( self, tenant: Any, @@ -943,16 +657,6 @@ async def delete_tenant( Delete the specified tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if tenant in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'tenant'.") @@ -964,7 +668,7 @@ async def delete_tenant( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_tenant( self, tenant: Any, @@ -976,16 +680,6 @@ async def create_tenant( Creates or replaces the specified tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (tenant, body): if param in SKIP_IN_PATH: @@ -999,7 +693,7 @@ async def create_tenant( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_tenant( self, tenant: Any, @@ -1011,16 +705,6 @@ async def patch_tenant( Add, delete, or modify a single tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (tenant, body): if param in SKIP_IN_PATH: @@ -1035,7 +719,7 @@ async def patch_tenant( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_tenants( self, body: Any, @@ -1046,16 +730,6 @@ async def patch_tenants( Add, delete, or modify multiple tenants in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1069,7 +743,7 @@ async def patch_tenants( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_configuration( self, params: Any = None, @@ -1078,17 +752,6 @@ async def get_configuration( """ Returns the current Security plugin configuration in JSON format. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -1097,7 +760,7 @@ async def get_configuration( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def update_configuration( self, body: Any, @@ -1108,16 +771,6 @@ async def update_configuration( Adds or updates the existing configuration using the REST API. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1130,7 +783,7 @@ async def update_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_configuration( self, body: Any, @@ -1141,16 +794,6 @@ async def patch_configuration( A PATCH call is used to update the existing configuration using the REST API. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1164,7 +807,7 @@ async def patch_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_distinguished_names( self, cluster_name: Any = None, @@ -1175,16 +818,6 @@ async def get_distinguished_names( Retrieves distinguished names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -1193,7 +826,7 @@ async def get_distinguished_names( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def update_distinguished_names( self, cluster_name: Any, @@ -1206,16 +839,6 @@ async def update_distinguished_names( allow list. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if cluster_name in SKIP_IN_PATH: raise ValueError( @@ -1230,7 +853,7 @@ async def update_distinguished_names( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_distinguished_names( self, cluster_name: Any, @@ -1242,16 +865,6 @@ async def delete_distinguished_names( list. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if cluster_name in SKIP_IN_PATH: raise ValueError( @@ -1265,7 +878,7 @@ async def delete_distinguished_names( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_certificates( self, params: Any = None, @@ -1274,23 +887,12 @@ async def get_certificates( """ Retrieves the cluster’s security certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/api/ssl/certs", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def reload_transport_certificates( self, params: Any = None, @@ -1299,17 +901,6 @@ async def reload_transport_certificates( """ Reload transport layer communication certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "PUT", @@ -1318,7 +909,7 @@ async def reload_transport_certificates( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def reload_http_certificates( self, params: Any = None, @@ -1327,17 +918,6 @@ async def reload_http_certificates( """ Reload HTTP layer communication certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "PUT", @@ -1346,7 +926,7 @@ async def reload_http_certificates( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def flush_cache( self, params: Any = None, @@ -1355,23 +935,12 @@ async def flush_cache( """ Flushes the Security plugin user, authentication, and authorization cache. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", "/_plugins/_security/api/cache", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def health( self, params: Any = None, @@ -1380,23 +949,12 @@ async def health( """ Checks to see if the Security plugin is up and running. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/health", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_audit_configuration( self, params: Any = None, @@ -1405,23 +963,12 @@ async def get_audit_configuration( """ Retrieves the audit configuration. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_security/api/audit", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def update_audit_configuration( self, body: Any, @@ -1432,16 +979,6 @@ async def update_audit_configuration( Updates the audit configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1454,7 +991,7 @@ async def update_audit_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_audit_configuration( self, body: Any, @@ -1465,16 +1002,6 @@ async def patch_audit_configuration( A PATCH call is used to update specified fields in the audit configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1488,7 +1015,7 @@ async def patch_audit_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def patch_distinguished_names( self, body: Any, @@ -1499,16 +1026,6 @@ async def patch_distinguished_names( Bulk update of distinguished names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") diff --git a/opensearchpy/_async/client/snapshot.py b/opensearchpy/_async/client/snapshot.py index 80813d161..9cbf9a8c9 100644 --- a/opensearchpy/_async/client/snapshot.py +++ b/opensearchpy/_async/client/snapshot.py @@ -40,16 +40,7 @@ class SnapshotClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "master_timeout", "wait_for_completion") async def create( self, repository: Any, @@ -68,20 +59,10 @@ async def create( :arg body: The snapshot definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns a response when the snapshot initializes. Default is false. @@ -98,15 +79,7 @@ async def create( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") async def delete( self, repository: Any, @@ -122,19 +95,9 @@ async def delete( :arg snapshot: A comma-separated list of snapshot names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -148,15 +111,7 @@ async def delete( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "ignore_unavailable", - "master_timeout", - "pretty", - "source", - "verbose", + "cluster_manager_timeout", "ignore_unavailable", "master_timeout", "verbose" ) async def get( self, @@ -178,22 +133,12 @@ async def get( _current. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If false, the request returns an error for any snapshots that are unavailable. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If true, returns additional information about each snapshot such as the version of Opensearch which took the snapshot, the start and end times of the snapshot, and the number of shards @@ -210,16 +155,7 @@ async def get( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def delete_repository( self, repository: Any, @@ -234,19 +170,9 @@ async def delete_repository( Wildcard (`*`) patterns are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if repository in SKIP_IN_PATH: @@ -259,16 +185,7 @@ async def delete_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") async def get_repository( self, repository: Any = None, @@ -282,37 +199,17 @@ async def get_repository( :arg repository: A comma-separated list of repository names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", _make_path("_snapshot", repository), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - "verify", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout", "verify") async def create_repository( self, repository: Any, @@ -328,19 +225,9 @@ async def create_repository( :arg body: The repository definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout :arg verify: Whether to verify the repository after creation """ @@ -356,16 +243,7 @@ async def create_repository( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "master_timeout", "wait_for_completion") async def restore( self, repository: Any, @@ -383,19 +261,9 @@ async def restore( :arg body: Details of what to restore :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning Default is false. """ @@ -411,16 +279,7 @@ async def restore( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "ignore_unavailable", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "ignore_unavailable", "master_timeout") async def status( self, repository: Any = None, @@ -436,22 +295,12 @@ async def status( :arg snapshot: A comma-separated list of snapshot names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -460,16 +309,7 @@ async def status( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def verify_repository( self, repository: Any, @@ -483,19 +323,9 @@ async def verify_repository( :arg repository: A repository name :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if repository in SKIP_IN_PATH: @@ -508,16 +338,7 @@ async def verify_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") async def cleanup_repository( self, repository: Any, @@ -531,19 +352,9 @@ async def cleanup_repository( :arg repository: Snapshot repository to clean up. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. """ if repository in SKIP_IN_PATH: @@ -556,15 +367,7 @@ async def cleanup_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") async def clone( self, repository: Any, @@ -584,19 +387,9 @@ async def clone( :arg body: The snapshot clone definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (repository, snapshot, target_snapshot, body): if param in SKIP_IN_PATH: diff --git a/opensearchpy/_async/client/tasks.py b/opensearchpy/_async/client/tasks.py index 7302cbacb..ef8acb777 100644 --- a/opensearchpy/_async/client/tasks.py +++ b/opensearchpy/_async/client/tasks.py @@ -44,14 +44,9 @@ class TasksClient(NamespacedClient): @query_params( "actions", "detailed", - "error_trace", - "filter_path", "group_by", - "human", "nodes", "parent_task_id", - "pretty", - "source", "timeout", "wait_for_completion", ) @@ -68,14 +63,8 @@ async def list( actions used to limit the request. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg group_by: Key used to group tasks in the response. Valid choices are nodes, parents, none. - :arg human: Whether to return human readable values for - statistics. :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 @@ -83,10 +72,6 @@ async def list( :arg parent_task_id: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -97,17 +82,7 @@ async def list( "GET", "/_tasks", params=params, headers=headers ) - @query_params( - "actions", - "error_trace", - "filter_path", - "human", - "nodes", - "parent_task_id", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("actions", "nodes", "parent_task_id", "wait_for_completion") async def cancel( self, task_id: Any = None, @@ -121,19 +96,9 @@ async def cancel( :arg task_id: ID of the task. :arg actions: Comma-separated list or wildcard expression of actions used to limit the request. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg nodes: Comma-separated list of node IDs or names used to limit the request. :arg parent_task_id: Parent task ID used to limit the tasks. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false Default is false. @@ -145,15 +110,7 @@ async def cancel( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - "wait_for_completion", - ) + @query_params("timeout", "wait_for_completion") async def get( self, task_id: Any = None, @@ -165,16 +122,6 @@ async def get( :arg task_id: ID of the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. diff --git a/opensearchpy/_async/plugins/knn.py b/opensearchpy/_async/plugins/knn.py index 8129bd0a6..aced62cf7 100644 --- a/opensearchpy/_async/plugins/knn.py +++ b/opensearchpy/_async/plugins/knn.py @@ -22,7 +22,7 @@ class KnnClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_model( self, model_id: Any, @@ -34,16 +34,6 @@ async def delete_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if model_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'model_id'.") @@ -55,7 +45,7 @@ async def delete_model( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_model( self, model_id: Any, @@ -67,16 +57,6 @@ async def get_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if model_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'model_id'.") @@ -101,19 +81,15 @@ async def get_model( "default_operator", "df", "docvalue_fields", - "error_trace", "expand_wildcards", "explain", - "filter_path", "from_", - "human", "ignore_throttled", "ignore_unavailable", "lenient", "max_concurrent_shard_requests", "pre_filter_shard_size", "preference", - "pretty", "q", "request_cache", "rest_total_hits_as_int", @@ -123,7 +99,6 @@ async def get_model( "seq_no_primary_term", "size", "sort", - "source", "stats", "stored_fields", "suggest_field", @@ -176,18 +151,12 @@ async def search_models( given in the query string. :arg docvalue_fields: Comma-separated list of fields to return as the docvalue representation of a field for each hit. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. :arg explain: Specify whether to return detailed information about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: Whether specified concrete, expanded or aliased indices should be ignored when throttled. :arg ignore_unavailable: Whether specified concrete indices @@ -207,8 +176,6 @@ async def search_models( and the query are disjoint. :arg preference: Specify the node or shard the operation should be performed on. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg request_cache: Specify if request cache should be used for this request or not, defaults to index level setting. @@ -224,8 +191,6 @@ async def search_models( number and primary term of the last modification of each hit. :arg size: Number of hits to return. Default is 10. :arg sort: Comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific 'tag' of the request for logging and statistical purposes. :arg stored_fields: Comma-separated list of stored fields to @@ -261,7 +226,7 @@ async def search_models( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") async def stats( self, node_id: Any = None, @@ -289,16 +254,6 @@ async def stats( model_index_status, indexing_from_model_degraded, training_requests, training_errors, training_memory_usage, training_memory_usage_percentage. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ return await self.transport.perform_request( @@ -308,9 +263,7 @@ async def stats( headers=headers, ) - @query_params( - "error_trace", "filter_path", "human", "preference", "pretty", "source" - ) + @query_params("preference") async def train_model( self, body: Any, @@ -324,17 +277,7 @@ async def train_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Preferred node to execute training. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -347,7 +290,7 @@ async def train_model( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def warmup( self, index: Any, @@ -361,16 +304,6 @@ async def warmup( :arg index: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") diff --git a/opensearchpy/_async/plugins/notifications.py b/opensearchpy/_async/plugins/notifications.py index 0a7e38a1d..739e1a09a 100644 --- a/opensearchpy/_async/plugins/notifications.py +++ b/opensearchpy/_async/plugins/notifications.py @@ -22,7 +22,7 @@ class NotificationsClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def create_config( self, body: Any, @@ -33,16 +33,6 @@ async def create_config( Create channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -55,7 +45,7 @@ async def create_config( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def delete_config( self, config_id: Any, @@ -67,16 +57,6 @@ async def delete_config( :arg config_id: The ID of the channel configuration to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -88,15 +68,7 @@ async def delete_config( headers=headers, ) - @query_params( - "config_id", - "config_id_list", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("config_id", "config_id_list") async def delete_configs( self, params: Any = None, @@ -109,22 +81,12 @@ async def delete_configs( :arg config_id: The ID of the channel configuration to delete. :arg config_id_list: A comma-separated list of channel IDs to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "DELETE", "/_plugins/_notifications/configs", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def get_config( self, config_id: Any, @@ -135,16 +97,6 @@ async def get_config( Get a specific channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -169,16 +121,12 @@ async def get_config( "email.recipient_list.recipient.keyword", "email_group.recipient_list.recipient", "email_group.recipient_list.recipient.keyword", - "error_trace", - "filter_path", - "human", "is_enabled", "last_updated_time_ms", "microsoft_teams.url", "microsoft_teams.url.keyword", "name", "name.keyword", - "pretty", "query", "ses_account.from_address", "ses_account.from_address.keyword", @@ -196,7 +144,6 @@ async def get_config( "sns.role_arn.keyword", "sns.topic_arn", "sns.topic_arn.keyword", - "source", "text_query", "webhook.url", "webhook.url.keyword", @@ -214,16 +161,6 @@ async def get_configs( :arg config_type: Type of notification configuration. Valid choices are slack, chime, microsoft_teams, webhook, email, sns, ses_account, smtp_account, email_group. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", @@ -233,7 +170,7 @@ async def get_configs( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def list_features( self, params: Any = None, @@ -242,23 +179,12 @@ async def list_features( """ List supported channel configurations. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_notifications/features", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def send_test( self, config_id: Any, @@ -269,16 +195,6 @@ async def send_test( Send a test notification. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -290,7 +206,7 @@ async def send_test( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def update_config( self, config_id: Any, @@ -302,16 +218,6 @@ async def update_config( Update channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (config_id, body): if param in SKIP_IN_PATH: @@ -325,7 +231,7 @@ async def update_config( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() async def list_channels( self, params: Any = None, @@ -334,17 +240,6 @@ async def list_channels( """ List created notification channels. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return await self.transport.perform_request( "GET", "/_plugins/_notifications/channels", params=params, headers=headers diff --git a/opensearchpy/client/__init__.py b/opensearchpy/client/__init__.py index c43b54a23..a841f2eec 100644 --- a/opensearchpy/client/__init__.py +++ b/opensearchpy/client/__init__.py @@ -258,7 +258,7 @@ def close(self) -> None: self.transport.close() # AUTO-GENERATED-API-DEFINITIONS # - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def ping( self, params: Any = None, @@ -267,17 +267,6 @@ def ping( """ Returns whether the cluster is running. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ try: return self.transport.perform_request( @@ -286,7 +275,7 @@ def ping( except TransportError: return False - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def info( self, params: Any = None, @@ -295,31 +284,15 @@ def info( """ Returns basic information about the cluster. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/", params=params, headers=headers ) @query_params( - "error_trace", - "filter_path", - "human", "pipeline", - "pretty", "refresh", "routing", - "source", "timeout", "version", "version_type", @@ -345,27 +318,17 @@ def create( stream template, this request creates the index. :arg id: Unique identifier for the document. :arg body: The document - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg pipeline: ID of the pipeline to use to preprocess incoming documents.If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -391,18 +354,13 @@ def create( ) @query_params( - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", "op_type", "pipeline", - "pretty", "refresh", "require_alias", "routing", - "source", "timeout", "version", "version_type", @@ -423,12 +381,6 @@ def index( :arg index: Name of the data stream or index to target. :arg body: The document :arg id: Unique identifier for the document. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has @@ -444,8 +396,6 @@ def index( setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do @@ -454,8 +404,6 @@ def index( alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -486,15 +434,10 @@ def index( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "pipeline", - "pretty", "refresh", "require_alias", "routing", - "source", "timeout", "wait_for_active_shards", ) @@ -519,19 +462,11 @@ def bulk( to exclude from the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg pipeline: ID of the pipeline to use to preprocess incoming documents.If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do @@ -540,8 +475,6 @@ def bulk( an index alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. @@ -562,7 +495,7 @@ def bulk( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def clear_scroll( self, body: Any = None, @@ -578,16 +511,6 @@ def clear_scroll( was specified via the scroll_id parameter :arg scroll_id: Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: raise ValueError("You need to supply scroll_id or body.") @@ -606,19 +529,14 @@ def clear_scroll( "analyzer", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_throttled", "ignore_unavailable", "lenient", "min_score", "preference", - "pretty", "q", "routing", - "source", "terminate_after", ) def count( @@ -653,17 +571,11 @@ def count( :arg df: Field to use as default where no field prefix is given in the query string.This parameter can only be used when the `q` query string parameter is specified. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased indices are ignored when frozen. :arg ignore_unavailable: If `false`, the request returns an @@ -674,13 +586,9 @@ def count( must have to be included in the result. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg terminate_after: Maximum number of documents to collect for each shard.If a query reaches this limit, Opensearch terminates the query early.Opensearch collects documents before sorting. @@ -694,15 +602,10 @@ def count( ) @query_params( - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", - "pretty", "refresh", "routing", - "source", "timeout", "version", "version_type", @@ -721,26 +624,16 @@ def delete( :arg index: Name of the target index. :arg id: Unique identifier for the document. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, Opensearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for active shards. :arg version: Explicit version number for concurrency control.The specified version must match the current version of the @@ -771,16 +664,12 @@ def delete( "conflicts", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", "from_", - "human", "ignore_unavailable", "lenient", "max_docs", "preference", - "pretty", "q", "refresh", "request_cache", @@ -793,7 +682,6 @@ def delete( "size", "slices", "sort", - "source", "stats", "terminate_after", "timeout", @@ -837,18 +725,12 @@ def delete_by_query( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as @@ -857,8 +739,6 @@ def delete_by_query( to all documents. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. @@ -880,8 +760,6 @@ def delete_by_query( :arg slices: The number of slices this task should be divided into. Valid choices are auto. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg terminate_after: Maximum number of documents to collect for @@ -918,9 +796,7 @@ def delete_by_query( body=body, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") def delete_by_query_rethrottle( self, task_id: Any, @@ -933,18 +809,8 @@ def delete_by_query_rethrottle( :arg task_id: The ID for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -956,16 +822,7 @@ def delete_by_query_rethrottle( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_script( self, id: Any, @@ -979,20 +836,10 @@ def delete_script( :arg id: Identifier for the stored script or search template. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1008,15 +855,10 @@ def delete_script( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", "version", "version_type", @@ -1041,23 +883,13 @@ def exists( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: List of stored fields to return as part of a hit.If no fields are specified, no stored fields are included in the response.If this field is specified, the `_source` parameter defaults to @@ -1081,15 +913,10 @@ def exists( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "version", "version_type", ) @@ -1113,23 +940,13 @@ def exists_source( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, Opensearch refreshes all shards involved in the delete by query after the request completes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg version: Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed. @@ -1155,15 +972,10 @@ def exists_source( "analyzer", "default_operator", "df", - "error_trace", - "filter_path", - "human", "lenient", "preference", - "pretty", "q", "routing", - "source", "stored_fields", ) def explain( @@ -1197,23 +1009,13 @@ def explain( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. Default is _all. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: A comma-separated list of stored fields to return in the response. """ @@ -1229,15 +1031,10 @@ def explain( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", "fields", - "filter_path", - "human", "ignore_unavailable", "include_unmapped", - "pretty", - "source", ) def field_caps( self, @@ -1261,8 +1058,6 @@ def field_caps( targets other open indices. For example, a requesttargeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma- @@ -1270,18 +1065,10 @@ def field_caps( closed, hidden, none. :arg fields: Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. :arg include_unmapped: If true, unmapped fields are included in the response. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -1295,15 +1082,10 @@ def field_caps( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", "version", "version_type", @@ -1327,24 +1109,14 @@ def get( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If true, Opensearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: List of stored fields to return as part of a hit.If no fields are specified, no stored fields are included in the response.If this field is specified, the `_source` parameter defaults to @@ -1363,15 +1135,7 @@ def get( "GET", _make_path(index, "_doc", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") def get_script( self, id: Any, @@ -1385,19 +1149,9 @@ def get_script( :arg id: Identifier for the stored script or search template. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'id'.") @@ -1410,15 +1164,10 @@ def get_script( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "version", "version_type", ) @@ -1441,24 +1190,14 @@ def get_source( to exclude in the response. :arg _source_includes: A comma-separated list of source fields to include in the response. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: Boolean) If true, the request is real-time as opposed to near-real-time. :arg refresh: If true, Opensearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. :arg routing: Target the specified primary shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg version: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. @@ -1479,15 +1218,10 @@ def get_source( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "preference", - "pretty", "realtime", "refresh", "routing", - "source", "stored_fields", ) def mget( @@ -1517,24 +1251,14 @@ def mget( source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.If the `_source` parameter is `false`, this parameter is ignored. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Specifies the node or shard the operation should be performed on. Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If `true`, the request is real-time as opposed to near-real-time. :arg refresh: If `true`, the request refreshes relevant shards before retrieving documents. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stored_fields: If `true`, retrieves the document fields stored in the index rather than the document `_source`. """ @@ -1551,16 +1275,11 @@ def mget( @query_params( "ccs_minimize_roundtrips", - "error_trace", - "filter_path", - "human", "max_concurrent_searches", "max_concurrent_shard_requests", "pre_filter_shard_size", - "pretty", "rest_total_hits_as_int", "search_type", - "source", "typed_keys", ) def msearch( @@ -1581,12 +1300,6 @@ def msearch( :arg ccs_minimize_roundtrips: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_concurrent_searches: Maximum number of concurrent searches the multi search API can execute. :arg max_concurrent_shard_requests: Maximum number of concurrent @@ -1599,16 +1312,12 @@ def msearch( significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. Default is false. :arg search_type: Indicates whether global term and document frequencies should be used when scoring returned documents. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. """ @@ -1626,14 +1335,9 @@ def msearch( @query_params( "ccs_minimize_roundtrips", - "error_trace", - "filter_path", - "human", "max_concurrent_searches", - "pretty", "rest_total_hits_as_int", "search_type", - "source", "typed_keys", ) def msearch_template( @@ -1654,24 +1358,14 @@ def msearch_template( and indices, omit this parameter or use `*`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_concurrent_searches: Maximum number of concurrent searches the API can run. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If `true`, the response returns `hits.total` as an integer.If `false`, it returns `hits.total` as an object. Default is false. :arg search_type: The type of the search operation.Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: If `true`, the response prefixes aggregation and suggester names with their respective types. """ @@ -1688,20 +1382,15 @@ def msearch_template( ) @query_params( - "error_trace", "field_statistics", "fields", - "filter_path", - "human", "ids", "offsets", "payloads", "positions", "preference", - "pretty", "realtime", "routing", - "source", "term_statistics", "version", "version_type", @@ -1721,8 +1410,6 @@ def mtermvectors( parameters per document here. You must at least provide a list of document ids. See documentation. :arg index: Name of the index that contains the documents. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Default is True. @@ -1730,10 +1417,6 @@ def mtermvectors( fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ids: A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body :arg offsets: If `true`, the response includes term offsets. @@ -1744,14 +1427,10 @@ def mtermvectors( Default is True. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg term_statistics: If true, the response includes term frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of @@ -1765,16 +1444,7 @@ def mtermvectors( "POST", path, params=params, headers=headers, body=body ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def put_script( self, id: Any, @@ -1795,20 +1465,10 @@ def put_script( or template in this context. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1826,15 +1486,7 @@ def put_script( ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "search_type", - "source", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "search_type" ) def rank_eval( self, @@ -1860,22 +1512,12 @@ def rank_eval( targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. - :arg pretty: Whether to pretty format the returned JSON - response. :arg search_type: Search operation type - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1889,16 +1531,11 @@ def rank_eval( ) @query_params( - "error_trace", - "filter_path", - "human", "max_docs", - "pretty", "refresh", "requests_per_second", "scroll", "slices", - "source", "timeout", "wait_for_active_shards", "wait_for_completion", @@ -1917,16 +1554,8 @@ def reindex( :arg body: The search definition using the Query DSL and the prototype for the index request. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg max_docs: Maximum number of documents to process. By default, all documents. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If `true`, the request refreshes affected shards to make this operation visible to search. :arg requests_per_second: The throttle for this request in sub- @@ -1936,8 +1565,6 @@ def reindex( :arg slices: The number of slices this task should be divided into.Defaults to 1 slice, meaning the task isn’t sliced into subtasks. Valid choices are auto. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. :arg wait_for_active_shards: The number of shard copies that @@ -1954,9 +1581,7 @@ def reindex( "POST", "/_reindex", params=params, headers=headers, body=body ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") def reindex_rethrottle( self, task_id: Any, @@ -1968,18 +1593,8 @@ def reindex_rethrottle( :arg task_id: Identifier for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -1991,7 +1606,7 @@ def reindex_rethrottle( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def render_search_template( self, body: Any = None, @@ -2006,16 +1621,6 @@ def render_search_template( :arg body: The search definition template and its params :arg id: ID of the search template to render. If no `source` is specified, this or the `id` request body parameter is required. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -2025,7 +1630,7 @@ def render_search_template( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def scripts_painless_execute( self, body: Any = None, @@ -2037,16 +1642,6 @@ def scripts_painless_execute( :arg body: The script to execute - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -2056,15 +1651,7 @@ def scripts_painless_execute( body=body, ) - @query_params( - "error_trace", - "filter_path", - "human", - "pretty", - "rest_total_hits_as_int", - "scroll", - "source", - ) + @query_params("rest_total_hits_as_int", "scroll") def scroll( self, body: Any = None, @@ -2079,21 +1666,11 @@ def scroll( :arg body: The scroll ID if not passed by URL or query parameter. :arg scroll_id: The scroll ID for scrolled search - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg rest_total_hits_as_int: If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. Default is false. :arg scroll: Period to retain the search context for scrolling. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: raise ValueError("You need to supply scroll_id or body.") @@ -2119,12 +1696,9 @@ def scroll( "default_operator", "df", "docvalue_fields", - "error_trace", "expand_wildcards", "explain", - "filter_path", "from_", - "human", "ignore_throttled", "ignore_unavailable", "include_named_queries_score", @@ -2132,7 +1706,6 @@ def scroll( "max_concurrent_shard_requests", "pre_filter_shard_size", "preference", - "pretty", "q", "request_cache", "rest_total_hits_as_int", @@ -2143,7 +1716,6 @@ def scroll( "seq_no_primary_term", "size", "sort", - "source", "stats", "stored_fields", "suggest_field", @@ -2219,8 +1791,6 @@ def search( string parameter is specified. :arg docvalue_fields: A comma-separated list of fields to return as the docvalue representation for each hit. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -2228,14 +1798,10 @@ def search( closed, hidden, none. :arg explain: If `true`, returns detailed information about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting document offset.Needs to be non-negative.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` parameter. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased indices will be ignored when frozen. :arg ignore_unavailable: If `false`, the request returns an @@ -2280,8 +1846,6 @@ def search( string that does not start with `_`) to route searches with the same `` to the same shards in the same order. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax using query parameter search.Query parameter searches do not support the full Opensearch Query DSL but are handy for testing. @@ -2309,8 +1873,6 @@ def search( parameters.To page through more hits, use the `search_after` parameter. Default is 10. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg stored_fields: A comma-separated list of stored fields to @@ -2366,16 +1928,11 @@ def search( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "local", "preference", - "pretty", "routing", - "source", ) def search_shards( self, @@ -2396,29 +1953,19 @@ def search_shards( targets other open indices.For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from the local node only. Default is false. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_search_shards"), params=params, headers=headers @@ -2427,21 +1974,16 @@ def search_shards( @query_params( "allow_no_indices", "ccs_minimize_roundtrips", - "error_trace", "expand_wildcards", "explain", - "filter_path", - "human", "ignore_throttled", "ignore_unavailable", "preference", - "pretty", "profile", "rest_total_hits_as_int", "routing", "scroll", "search_type", - "source", "typed_keys", ) def search_template( @@ -2466,8 +2008,6 @@ def search_template( `bar`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are minimized for cross-cluster search requests. Default is True. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -2475,18 +2015,12 @@ def search_template( `closed`, `hidden`, `none`. :arg explain: If `true`, the response includes additional details about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg profile: If `true`, the query execution is profiled. :arg rest_total_hits_as_int: If true, hits.total are rendered as an integer in the response. Default is false. @@ -2496,8 +2030,6 @@ def search_template( indexshould be maintained for scrolled search. :arg search_type: The type of the search operation. Valid choices are query_then_fetch, dfs_query_then_fetch. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg typed_keys: If `true`, the response prefixes aggregation and suggester names with their respective types. """ @@ -2513,19 +2045,14 @@ def search_template( ) @query_params( - "error_trace", "field_statistics", "fields", - "filter_path", - "human", "offsets", "payloads", "positions", "preference", - "pretty", "realtime", "routing", - "source", "term_statistics", "version", "version_type", @@ -2547,8 +2074,6 @@ def termvectors( :arg body: Define parameters and or supply a document to get termvectors for. See documentation. :arg id: Unique identifier of the document. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Default is True. @@ -2556,10 +2081,6 @@ def termvectors( fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg offsets: If `true`, the response includes term offsets. Default is True. :arg payloads: If `true`, the response includes term payloads. @@ -2568,14 +2089,10 @@ def termvectors( Default is True. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg realtime: If true, the request is real-time as opposed to near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg term_statistics: If `true`, the response includes term frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of @@ -2596,18 +2113,13 @@ def termvectors( "_source", "_source_excludes", "_source_includes", - "error_trace", - "filter_path", - "human", "if_primary_term", "if_seq_no", "lang", - "pretty", "refresh", "require_alias", "retry_on_conflict", "routing", - "source", "timeout", "wait_for_active_shards", ) @@ -2633,19 +2145,11 @@ def update( exclude. :arg _source_includes: Specify the source fields you want to retrieve. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg if_primary_term: Only perform the operation if the document has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. :arg lang: The script language. Default is painless. - :arg pretty: Whether to pretty format the returned JSON - response. :arg refresh: If 'true', Opensearch refreshes the affected shards to make this operationvisible to search, if 'wait_for' then wait for a refresh to make this operationvisible to search, if 'false' do @@ -2656,8 +2160,6 @@ def update( operation be retried when a conflict occurs. Default is 0. :arg routing: Custom value used to route operations to a specific shard. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for dynamic mapping updates and active shards.This guarantees Opensearch waits for at least the timeout before failing.The actual wait time could be longer, particularly when @@ -2688,17 +2190,13 @@ def update( "conflicts", "default_operator", "df", - "error_trace", "expand_wildcards", - "filter_path", "from_", - "human", "ignore_unavailable", "lenient", "max_docs", "pipeline", "preference", - "pretty", "q", "refresh", "request_cache", @@ -2711,7 +2209,6 @@ def update( "size", "slices", "sort", - "source", "stats", "terminate_after", "timeout", @@ -2756,18 +2253,12 @@ def update_by_query( query: `AND` or `OR`. Valid choices are and, or. :arg df: Field to use as default where no field prefix is given in the query string. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as @@ -2781,8 +2272,6 @@ def update_by_query( regardless of the value of this parameter. :arg preference: Specifies the node or shard the operation should be performed on.Random by default. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg refresh: If `true`, Opensearch refreshes affected shards to make the operation visible to search. @@ -2803,8 +2292,6 @@ def update_by_query( :arg slices: The number of slices this task should be divided into. Valid choices are auto. :arg sort: A comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific `tag` of the request for logging and statistical purposes. :arg terminate_after: Maximum number of documents to collect for @@ -2840,9 +2327,7 @@ def update_by_query( body=body, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "requests_per_second", "source" - ) + @query_params("requests_per_second") def update_by_query_rethrottle( self, task_id: Any, @@ -2855,18 +2340,8 @@ def update_by_query_rethrottle( :arg task_id: The ID for the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg requests_per_second: The throttle for this request in sub- requests per second. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if task_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'task_id'.") @@ -2878,7 +2353,7 @@ def update_by_query_rethrottle( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_script_context( self, params: Any = None, @@ -2887,23 +2362,12 @@ def get_script_context( """ Returns all script contexts. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_script_context", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_script_languages( self, params: Any = None, @@ -2912,17 +2376,6 @@ def get_script_languages( """ Returns available script types, languages and contexts. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_script_language", params=params, headers=headers @@ -2930,15 +2383,10 @@ def get_script_languages( @query_params( "allow_partial_pit_creation", - "error_trace", "expand_wildcards", - "filter_path", - "human", "keep_alive", "preference", - "pretty", "routing", - "source", ) def create_pit( self, @@ -2954,23 +2402,13 @@ def create_pit( string to perform the operation on all indices. :arg allow_partial_pit_creation: Allow if point in time can be created with partial failures. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg keep_alive: Specify the keep alive for point in time. :arg preference: Specify the node or shard the operation should be performed on. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg routing: Comma-separated list of specific routing values. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -2982,7 +2420,7 @@ def create_pit( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_all_pits( self, params: Any = None, @@ -2991,23 +2429,12 @@ def delete_all_pits( """ Deletes all active point in time searches. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", "/_search/point_in_time/_all", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_pit( self, body: Any = None, @@ -3019,16 +2446,6 @@ def delete_pit( :arg body: The point-in-time ids to be deleted - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", @@ -3038,7 +2455,7 @@ def delete_pit( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_all_pits( self, params: Any = None, @@ -3047,17 +2464,6 @@ def get_all_pits( """ Lists all active point in time searches. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_search/point_in_time/_all", params=params, headers=headers diff --git a/opensearchpy/client/cat.py b/opensearchpy/client/cat.py index c8f511770..ab4469857 100644 --- a/opensearchpy/client/cat.py +++ b/opensearchpy/client/cat.py @@ -40,20 +40,7 @@ class CatClient(NamespacedClient): - @query_params( - "error_trace", - "expand_wildcards", - "filter_path", - "format", - "h", - "help", - "human", - "local", - "pretty", - "s", - "source", - "v", - ) + @query_params("expand_wildcards", "format", "h", "help", "local", "s", "v") def aliases( self, name: Any = None, @@ -68,46 +55,24 @@ def aliases( :arg name: A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( "GET", _make_path("_cat", "aliases", name), params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") def all_pit_segments( self, params: Any = None, @@ -119,22 +84,12 @@ def all_pit_segments( :arg bytes: The unit in which to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -144,17 +99,12 @@ def all_pit_segments( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def allocation( @@ -174,27 +124,17 @@ def allocation( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -206,17 +146,12 @@ def allocation( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def cluster_manager( @@ -230,45 +165,24 @@ def cluster_manager( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( "GET", "/_cat/cluster_manager", params=params, headers=headers ) - @query_params( - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("format", "h", "help", "s", "v") def count( self, index: Any = None, @@ -283,41 +197,19 @@ def count( :arg index: Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( "GET", _make_path("_cat", "count", index), params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") def fielddata( self, fields: Any = None, @@ -333,22 +225,12 @@ def fielddata( returned information. :arg bytes: The unit used to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -358,20 +240,7 @@ def fielddata( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "time", - "ts", - "v", - ) + @query_params("format", "h", "help", "s", "time", "ts", "v") def health( self, params: Any = None, @@ -381,22 +250,12 @@ def health( Returns a concise representation of the cluster health. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. @@ -407,9 +266,7 @@ def health( "GET", "/_cat/health", params=params, headers=headers ) - @query_params( - "error_trace", "filter_path", "help", "human", "pretty", "s", "source" - ) + @query_params("help", "s") def help( self, params: Any = None, @@ -419,19 +276,9 @@ def help( Returns help for the Cat APIs. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_cat", params=params, headers=headers @@ -440,21 +287,16 @@ def help( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "format", "h", "health", "help", - "human", "include_unloaded_segments", "local", "master_timeout", - "pretty", "pri", "s", - "source", "time", "v", ) @@ -476,12 +318,8 @@ def indices( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: The type of index that wildcard patterns can match. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg format: A short version of the Accept header, e.g. json, yaml. :arg h: Comma-separated list of column names to display. @@ -489,8 +327,6 @@ def indices( By default, the response includes indices of any health status. Valid choices are green, yellow, red. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg include_unloaded_segments: If true, the response includes information from segments that are not loaded into memory. Default is false. @@ -499,14 +335,10 @@ def indices( :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg pri: If true, the response only includes information from primary shards. Default is false. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -517,17 +349,12 @@ def indices( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def master( @@ -541,27 +368,17 @@ def master( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ from warnings import warn @@ -575,17 +392,12 @@ def master( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def nodeattrs( @@ -599,27 +411,17 @@ def nodeattrs( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -629,18 +431,13 @@ def nodeattrs( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "full_id", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -657,29 +454,19 @@ def nodes( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg format: A short version of the Accept header, e.g. json, yaml. :arg full_id: If `true`, return the full node ID. If `false`, return the shortened node ID. Default is false. :arg h: Comma-separated list of column names to display. :arg help: Return help information. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -690,17 +477,12 @@ def nodes( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -715,27 +497,17 @@ def pending_tasks( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -744,19 +516,7 @@ def pending_tasks( "GET", "/_cat/pending_tasks", params=params, headers=headers ) - @query_params( - "bytes", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "v", - ) + @query_params("bytes", "format", "h", "help", "s", "v") def pit_segments( self, body: Any = None, @@ -769,22 +529,12 @@ def pit_segments( :arg bytes: The unit in which to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -793,17 +543,12 @@ def pit_segments( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def plugins( @@ -817,27 +562,17 @@ def plugins( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -845,20 +580,7 @@ def plugins( ) @query_params( - "active_only", - "bytes", - "detailed", - "error_trace", - "filter_path", - "format", - "h", - "help", - "human", - "pretty", - "s", - "source", - "time", - "v", + "active_only", "bytes", "detailed", "format", "h", "help", "s", "time", "v" ) def recovery( self, @@ -878,22 +600,12 @@ def recovery( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -904,17 +616,12 @@ def recovery( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def repositories( @@ -928,27 +635,17 @@ def repositories( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -961,19 +658,14 @@ def repositories( "bytes", "completed_only", "detailed", - "error_trace", "expand_wildcards", - "filter_path", "format", "h", "help", - "human", "ignore_throttled", "ignore_unavailable", - "pretty", "s", "shards", - "source", "time", "timeout", "v", @@ -1002,30 +694,20 @@ def segment_replication( latest completed segment replication events. Default is false. :arg detailed: If `true`, the response includes detailed information about segment replications. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: Whether specified concrete, expanded or aliased indices should be ignored when throttled. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. :arg shards: Comma-separated list of shards to display. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg timeout: Operation timeout. @@ -1041,16 +723,11 @@ def segment_replication( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "master_timeout", - "pretty", "s", - "source", "v", ) def segments( @@ -1070,25 +747,15 @@ def segments( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -1098,17 +765,12 @@ def segments( @query_params( "bytes", "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -1129,27 +791,17 @@ def shards( are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1160,18 +812,13 @@ def shards( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", "size", - "source", "v", ) def thread_pool( @@ -1189,28 +836,18 @@ def thread_pool( names used to limit the request. Accepts wildcard expressions. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. :arg size: The multiplier in which to display values. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -1222,17 +859,12 @@ def thread_pool( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "ignore_unavailable", "master_timeout", - "pretty", "s", - "source", "time", "v", ) @@ -1252,27 +884,17 @@ def snapshots( returns an error. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `true`, the response does not include information from unavailable snapshots. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1287,17 +909,12 @@ def snapshots( @query_params( "actions", "detailed", - "error_trace", - "filter_path", "format", "h", "help", - "human", "nodes", "parent_task_id", - "pretty", "s", - "source", "time", "v", ) @@ -1315,28 +932,18 @@ def tasks( response. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :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. :arg parent_task_id: The parent task identifier, which is used to limit the response. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg time: The unit in which to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg v: Verbose mode. Display column headers. Default is false. @@ -1347,17 +954,12 @@ def tasks( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "format", "h", "help", - "human", "local", "master_timeout", - "pretty", "s", - "source", "v", ) def templates( @@ -1374,27 +976,17 @@ def templates( expressions. If omitted, all templates are returned. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :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 is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. :arg s: Comma-separated list of column names or column aliases to sort by. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( diff --git a/opensearchpy/client/cluster.py b/opensearchpy/client/cluster.py index 159aea492..263010b65 100644 --- a/opensearchpy/client/cluster.py +++ b/opensearchpy/client/cluster.py @@ -43,15 +43,10 @@ class ClusterClient(NamespacedClient): @query_params( "awareness_attribute", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "level", "local", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", "wait_for_events", @@ -78,15 +73,9 @@ def health( health is required. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg level: Can be one of cluster, indices or shards. Controls the details level of the health information returned. Valid choices are cluster, indices, shards, awareness_attributes. @@ -97,10 +86,6 @@ def health( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -135,16 +120,7 @@ def health( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") def pending_tasks( self, params: Any = None, @@ -157,12 +133,6 @@ def pending_tasks( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master node. Default is false. @@ -170,10 +140,6 @@ def pending_tasks( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_cluster/pending_tasks", params=params, headers=headers @@ -182,16 +148,11 @@ def pending_tasks( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "local", "master_timeout", - "pretty", - "source", "wait_for_metadata_version", "wait_for_timeout", ) @@ -215,17 +176,11 @@ def state( string or when no indices have been specified) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg local: Return local information, do not retrieve the state @@ -233,10 +188,6 @@ def state( :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_metadata_version: Wait for the metadata version to be equal or greater than the specified metadata version :arg wait_for_timeout: The maximum time to wait for @@ -252,15 +203,7 @@ def state( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "flat_settings", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("flat_settings", "timeout") def stats( self, node_id: Any = None, @@ -273,18 +216,8 @@ def stats( :arg node_id: Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for each node to respond.If a node does not respond before its timeout expires, the response does not include its stats.However, timed out nodes are included in the @@ -304,15 +237,10 @@ def stats( @query_params( "cluster_manager_timeout", "dry_run", - "error_trace", "explain", - "filter_path", - "human", "master_timeout", "metric", - "pretty", "retry_failed", - "source", "timeout", ) def reroute( @@ -331,26 +259,16 @@ def reroute( to cluster-manager node. :arg dry_run: If true, then the request simulates the operation only and returns the resulting state. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg explain: If true, then the response contains an explanation of why the commands can or cannot be executed. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. :arg metric: Limits the information returned to the specified metrics. - :arg pretty: Whether to pretty format the returned JSON - response. :arg retry_failed: If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -361,14 +279,9 @@ def reroute( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", "flat_settings", - "human", "include_defaults", "master_timeout", - "pretty", - "source", "timeout", ) def get_settings( @@ -382,24 +295,14 @@ def get_settings( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg include_defaults: If `true`, returns default cluster settings from the local node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -409,15 +312,7 @@ def get_settings( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "cluster_manager_timeout", "flat_settings", "master_timeout", "timeout" ) def put_settings( self, @@ -433,21 +328,11 @@ def put_settings( or `persistent` (survives cluster restart). :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if body in SKIP_IN_PATH: @@ -457,7 +342,7 @@ def put_settings( "PUT", "/_cluster/settings", params=params, headers=headers, body=body ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def remote_info( self, params: Any = None, @@ -466,31 +351,12 @@ def remote_info( """ Returns the information about configured remote clusters. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_remote/info", params=params, headers=headers ) - @query_params( - "error_trace", - "filter_path", - "human", - "include_disk_info", - "include_yes_decisions", - "pretty", - "source", - ) + @query_params("include_disk_info", "include_yes_decisions") def allocation_explain( self, body: Any = None, @@ -503,20 +369,10 @@ def allocation_explain( :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg include_disk_info: If true, returns information about disk usage and shard sizes. Default is false. :arg include_yes_decisions: If true, returns YES decisions in explanation. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -526,16 +382,7 @@ def allocation_explain( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_component_template( self, name: Any, @@ -550,20 +397,10 @@ def delete_component_template( (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -578,16 +415,7 @@ def delete_component_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") def get_component_template( self, name: Any = None, @@ -602,12 +430,6 @@ def get_component_template( (`*`) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master node. Default is false. @@ -615,10 +437,6 @@ def get_component_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -627,17 +445,7 @@ def get_component_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "create", "master_timeout", "timeout") def put_component_template( self, name: Any, @@ -664,20 +472,10 @@ def put_component_template( to cluster-manager node. :arg create: If `true`, this request cannot replace or update existing component templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ for param in (name, body): @@ -692,16 +490,7 @@ def put_component_template( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") def exists_component_template( self, name: Any, @@ -716,12 +505,6 @@ def exists_component_template( Wildcard (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: If true, the request retrieves information from the local node only.Defaults to false, which means information is retrieved from the master node. Default is false. @@ -729,10 +512,6 @@ def exists_component_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -744,9 +523,7 @@ def exists_component_template( headers=headers, ) - @query_params( - "error_trace", "filter_path", "human", "pretty", "source", "wait_for_removal" - ) + @query_params("wait_for_removal") def delete_voting_config_exclusions( self, params: Any = None, @@ -756,16 +533,6 @@ def delete_voting_config_exclusions( Clears cluster voting config exclusions. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_removal: Specifies whether to wait for all excluded nodes to be removed from thecluster before clearing the voting configuration exclusions list.Defaults to true, meaning that all @@ -781,16 +548,7 @@ def delete_voting_config_exclusions( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "human", - "node_ids", - "node_names", - "pretty", - "source", - "timeout", - ) + @query_params("node_ids", "node_names", "timeout") def post_voting_config_exclusions( self, params: Any = None, @@ -800,22 +558,12 @@ def post_voting_config_exclusions( Updates the cluster voting config exclusions by node ids or node names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg node_ids: A comma-separated list of the persistent ids of the nodes to excludefrom the voting configuration. If specified, you may not also specify node_names. :arg node_names: A comma-separated list of the names of the nodes to exclude from thevoting configuration. If specified, you may not also specify node_ids. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: When adding a voting configuration exclusion, the API waits for thespecified nodes to be excluded from the voting configuration beforereturning. If the timeout expires before the @@ -826,7 +574,7 @@ def post_voting_config_exclusions( "POST", "/_cluster/voting_config_exclusions", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_decommission_awareness( self, params: Any = None, @@ -835,23 +583,12 @@ def delete_decommission_awareness( """ Delete any existing decommission. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", "/_cluster/decommission/awareness", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_weighted_routing( self, params: Any = None, @@ -860,17 +597,6 @@ def delete_weighted_routing( """ Delete weighted shard routing weights. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", @@ -879,7 +605,7 @@ def delete_weighted_routing( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_decommission_awareness( self, awareness_attribute_name: Any, @@ -891,16 +617,6 @@ def get_decommission_awareness( :arg awareness_attribute_name: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if awareness_attribute_name in SKIP_IN_PATH: raise ValueError( @@ -920,7 +636,7 @@ def get_decommission_awareness( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_weighted_routing( self, attribute: Any, @@ -932,16 +648,6 @@ def get_weighted_routing( :arg attribute: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if attribute in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'attribute'.") @@ -953,7 +659,7 @@ def get_weighted_routing( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def put_decommission_awareness( self, awareness_attribute_name: Any, @@ -967,16 +673,6 @@ def put_decommission_awareness( :arg awareness_attribute_name: Awareness attribute name. :arg awareness_attribute_value: Awareness attribute value. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (awareness_attribute_name, awareness_attribute_value): if param in SKIP_IN_PATH: @@ -995,7 +691,7 @@ def put_decommission_awareness( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def put_weighted_routing( self, attribute: Any, @@ -1007,16 +703,6 @@ def put_weighted_routing( :arg attribute: Awareness attribute name. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if attribute in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'attribute'.") diff --git a/opensearchpy/client/dangling_indices.py b/opensearchpy/client/dangling_indices.py index bee5c3f14..9bc3fc2cc 100644 --- a/opensearchpy/client/dangling_indices.py +++ b/opensearchpy/client/dangling_indices.py @@ -41,15 +41,7 @@ class DanglingIndicesClient(NamespacedClient): @query_params( - "accept_data_loss", - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "accept_data_loss", "cluster_manager_timeout", "master_timeout", "timeout" ) def delete_dangling_index( self, @@ -66,19 +58,9 @@ def delete_dangling_index( the dangling index :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if index_uuid in SKIP_IN_PATH: @@ -92,15 +74,7 @@ def delete_dangling_index( ) @query_params( - "accept_data_loss", - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", + "accept_data_loss", "cluster_manager_timeout", "master_timeout", "timeout" ) def import_dangling_index( self, @@ -117,19 +91,9 @@ def import_dangling_index( the dangling index :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if index_uuid in SKIP_IN_PATH: @@ -139,7 +103,7 @@ def import_dangling_index( "POST", _make_path("_dangling", index_uuid), params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def list_dangling_indices( self, params: Any = None, @@ -148,17 +112,6 @@ def list_dangling_indices( """ Returns all dangling indices. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_dangling", params=params, headers=headers diff --git a/opensearchpy/client/indices.py b/opensearchpy/client/indices.py index 6d07837b3..f66ae1a0c 100644 --- a/opensearchpy/client/indices.py +++ b/opensearchpy/client/indices.py @@ -40,7 +40,7 @@ class IndicesClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def analyze( self, body: Any = None, @@ -56,16 +56,6 @@ def analyze( :arg body: Define analyzer/tokenizer parameters and the text on which the analysis should be performed :arg index: The name of the index to scope the operation. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -75,16 +65,7 @@ def analyze( body=body, ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable") def refresh( self, index: Any = None, @@ -102,23 +83,13 @@ def refresh( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", _make_path(index, "_refresh"), params=params, headers=headers @@ -126,14 +97,9 @@ def refresh( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "force", - "human", "ignore_unavailable", - "pretty", - "source", "wait_if_ongoing", ) def flush( @@ -153,25 +119,15 @@ def flush( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg force: If `true`, the request forces a flush even if there are no changes to commit to the index. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_if_ongoing: If `true`, the flush operation blocks until execution when another flush operation is running.If `false`, Opensearch returns an error if you request a flush when another flush @@ -182,15 +138,7 @@ def flush( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - "wait_for_active_shards", + "cluster_manager_timeout", "master_timeout", "timeout", "wait_for_active_shards" ) def create( self, @@ -208,20 +156,10 @@ def create( `mappings`) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -239,12 +177,7 @@ def create( @query_params( "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -268,20 +201,10 @@ def clone( and `aliases`) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -309,17 +232,12 @@ def clone( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", "master_timeout", - "pretty", - "source", ) def get( self, @@ -342,19 +260,13 @@ def get( is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard expressions can match. If the request can target data streams, this argumentdetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,such as open,hidden. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If false, requests that target a missing index return an error. Default is false. :arg include_defaults: If true, return all default settings in @@ -366,10 +278,6 @@ def get( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -381,14 +289,9 @@ def get( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -417,27 +320,17 @@ def open( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -460,14 +353,9 @@ def open( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", ) @@ -489,27 +377,17 @@ def close( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -528,14 +406,9 @@ def close( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", ) def delete( @@ -558,27 +431,17 @@ def delete( targets other open indices. Default is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -592,16 +455,11 @@ def delete( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", - "pretty", - "source", ) def exists( self, @@ -619,29 +477,19 @@ def exists( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. Default is false. :arg include_defaults: If `true`, return all default settings in the response. Default is false. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -653,14 +501,9 @@ def exists( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", "write_index_only", ) @@ -684,27 +527,17 @@ def put_mapping( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -728,15 +561,10 @@ def put_mapping( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "local", "master_timeout", - "pretty", - "source", ) def get_mapping( self, @@ -757,17 +585,11 @@ def get_mapping( targets other open indices. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from @@ -776,10 +598,6 @@ def get_mapping( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_mapping"), params=params, headers=headers @@ -787,15 +605,10 @@ def get_mapping( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "include_defaults", "local", - "pretty", - "source", ) def get_field_mapping( self, @@ -817,27 +630,17 @@ def get_field_mapping( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in the response. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if fields in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'fields'.") @@ -849,16 +652,7 @@ def get_field_mapping( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def put_alias( self, index: Any, @@ -880,20 +674,10 @@ def put_alias( `filter` :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -910,17 +694,7 @@ def put_alias( body=body, ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "local", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable", "local") def exists_alias( self, name: Any, @@ -941,26 +715,16 @@ def exists_alias( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, requests that include a missing data stream or index in the target indices or data streams return an error. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -969,17 +733,7 @@ def exists_alias( "HEAD", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "local", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable", "local") def get_alias( self, index: Any = None, @@ -1001,40 +755,21 @@ def get_alias( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from the local node only. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def update_aliases( self, body: Any, @@ -1048,20 +783,10 @@ def update_aliases( :arg body: The definition of `actions` to perform :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1073,16 +798,7 @@ def update_aliases( "POST", "/_aliases", params=params, headers=headers, body=body ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_alias( self, index: Any, @@ -1100,20 +816,10 @@ def delete_alias( wildcards (`*`). To remove all aliases, use `*` or `_all`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1126,17 +832,7 @@ def delete_alias( "DELETE", _make_path(index, "_alias", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "order", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "create", "master_timeout", "order") def put_template( self, name: Any, @@ -1154,12 +850,6 @@ def put_template( to cluster-manager node. :arg create: If true, this request cannot replace or update existing index templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -1168,10 +858,6 @@ def put_template( indexmatches multiple templates.Templates with lower 'order' values are merged first. Templates with higher'order' values are merged later, overriding templates with lower values. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (name, body): if param in SKIP_IN_PATH: @@ -1185,17 +871,7 @@ def put_template( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") def exists_template( self, name: Any, @@ -1209,23 +885,13 @@ def exists_template( :arg name: The comma separated names of the index templates :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -1234,17 +900,7 @@ def exists_template( "HEAD", _make_path("_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") def get_template( self, name: Any = None, @@ -1261,39 +917,20 @@ def get_template( `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: If `true`, the request retrieves information from the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_template( self, name: Any, @@ -1308,20 +945,10 @@ def delete_template( Wildcard (`*`) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -1336,17 +963,12 @@ def delete_template( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "include_defaults", "local", "master_timeout", - "pretty", - "source", ) def get_settings( self, @@ -1372,19 +994,13 @@ def get_settings( `bar`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in @@ -1396,10 +1012,6 @@ def get_settings( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_settings", name), params=params, headers=headers @@ -1408,16 +1020,11 @@ def get_settings( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", "flat_settings", - "human", "ignore_unavailable", "master_timeout", "preserve_existing", - "pretty", - "source", "timeout", ) def put_settings( @@ -1442,19 +1049,13 @@ def put_settings( `bar`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can targetdata streams, this argument determines whether wildcard expressions matchhidden data streams. Supports comma- separated values, such as`open,hidden`. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If `true`, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). :arg master_timeout (Deprecated: To promote inclusive language, @@ -1463,10 +1064,6 @@ def put_settings( expires, the request fails and returns anerror. :arg preserve_existing: If `true`, existing index settings remain unchanged. Default is false. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -1484,19 +1081,14 @@ def put_settings( @query_params( "completion_fields", - "error_trace", "expand_wildcards", "fielddata_fields", "fields", - "filter_path", "forbid_closed_indices", "groups", - "human", "include_segment_file_sizes", "include_unloaded_segments", "level", - "pretty", - "source", ) def stats( self, @@ -1515,8 +1107,6 @@ def stats( metrics. :arg completion_fields: Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams, this argumentdetermines whether wildcard expressions match hidden data streams. Supports comma- @@ -1526,14 +1116,10 @@ def stats( expressions of fields to include in fielddata statistics. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg forbid_closed_indices: If true, statistics are not collected from closed indices. Default is True. :arg groups: Comma-separated list of search groups to include in the search statistics. - :arg human: Whether to return human readable values for - statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). Default is false. @@ -1543,25 +1129,13 @@ def stats( :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_stats", metric), params=params, headers=headers ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - "verbose", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "verbose" ) def segments( self, @@ -1580,23 +1154,13 @@ def segments( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the request returns a verbose response. Default is false. """ @@ -1611,17 +1175,12 @@ def segments( "analyzer", "default_operator", "df", - "error_trace", "expand_wildcards", "explain", - "filter_path", - "human", "ignore_unavailable", "lenient", - "pretty", "q", "rewrite", - "source", ) def validate_query( self, @@ -1654,8 +1213,6 @@ def validate_query( :arg df: Field to use as default where no field prefix is given in the query string.This parameter can only be used when the `q` query string parameter is specified. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -1663,21 +1220,13 @@ def validate_query( `closed`, `hidden`, `none`. :arg explain: If `true`, the response returns detailed information if an error has occurred. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg rewrite: If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -1689,17 +1238,12 @@ def validate_query( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", "fielddata", "fields", - "filter_path", - "human", "ignore_unavailable", - "pretty", "query", "request", - "source", ) def clear_cache( self, @@ -1717,8 +1261,6 @@ def clear_cache( if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request targets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- @@ -1728,32 +1270,16 @@ def clear_cache( `fields` parameter to clear the cache of specific fields only. :arg fields: Comma-separated list of field names used to limit the `fielddata` parameter. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. - :arg pretty: Whether to pretty format the returned JSON - response. :arg query: If `true`, clears the query cache. :arg request: If `true`, clears the request cache. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", _make_path(index, "_cache", "clear"), params=params, headers=headers ) - @query_params( - "active_only", - "detailed", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("active_only", "detailed") def recovery( self, index: Any = None, @@ -1771,16 +1297,6 @@ def recovery( shard recoveries. Default is false. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_recovery"), params=params, headers=headers @@ -1788,14 +1304,9 @@ def recovery( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "only_ancient_segments", - "pretty", - "source", "wait_for_completion", ) def upgrade( @@ -1813,23 +1324,13 @@ def upgrade( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). :arg only_ancient_segments: If true, only ancient (an older Lucene major release) segments will be upgraded. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning. Default is false. """ @@ -1837,16 +1338,7 @@ def upgrade( "POST", _make_path(index, "_upgrade"), params=params, headers=headers ) - @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - ) + @query_params("allow_no_indices", "expand_wildcards", "ignore_unavailable") def get_upgrade( self, index: Any = None, @@ -1862,36 +1354,18 @@ def get_upgrade( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed). - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path(index, "_upgrade"), params=params, headers=headers ) @query_params( - "allow_no_indices", - "error_trace", - "expand_wildcards", - "filter_path", - "human", - "ignore_unavailable", - "pretty", - "source", - "status", + "allow_no_indices", "expand_wildcards", "ignore_unavailable", "status" ) def shard_stores( self, @@ -1909,22 +1383,12 @@ def shard_stores( any wildcard expression, index alias, or _allvalue targets only missing or closed indices. This behavior applies even if the requesttargets other open indices. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match. If the request can target data streams,this argument determines whether wildcard expressions match hidden data streams. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If true, missing or closed indices are not included in the response. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg status: List of shard health statuses used to limit the request. """ @@ -1934,17 +1398,12 @@ def shard_stores( @query_params( "allow_no_indices", - "error_trace", "expand_wildcards", - "filter_path", "flush", - "human", "ignore_unavailable", "max_num_segments", "only_expunge_deletes", - "pretty", "primary_only", - "source", "wait_for_completion", ) def forcemerge( @@ -1962,17 +1421,11 @@ def forcemerge( :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flush: Specify whether the index should be flushed after performing the operation. Default is True. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg max_num_segments: The number of larger segments into which @@ -1981,12 +1434,8 @@ def forcemerge( as necessary. :arg only_expunge_deletes: Specify whether the operation should only expunge deleted documents - :arg pretty: Whether to pretty format the returned JSON - response. :arg primary_only: Specify whether the operation should only perform on primary shards. Defaults to false. Default is false. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request wait until the force merge is completed. Default is True. """ @@ -1997,12 +1446,7 @@ def forcemerge( @query_params( "cluster_manager_timeout", "copy_settings", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -2028,20 +1472,10 @@ def shrink( to cluster-manager node. :arg copy_settings: whether or not to copy settings from the source index. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -2069,12 +1503,7 @@ def shrink( @query_params( "cluster_manager_timeout", "copy_settings", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "task_execution_timeout", "timeout", "wait_for_active_shards", @@ -2101,20 +1530,10 @@ def split( to cluster-manager node. :arg copy_settings: whether or not to copy settings from the source index. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg task_execution_timeout: Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. :arg timeout: Period to wait for a response.If no response is @@ -2142,12 +1561,7 @@ def split( @query_params( "cluster_manager_timeout", "dry_run", - "error_trace", - "filter_path", - "human", "master_timeout", - "pretty", - "source", "timeout", "wait_for_active_shards", ) @@ -2174,20 +1588,10 @@ def rollover( :arg dry_run: If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -2207,7 +1611,7 @@ def rollover( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_data_stream( self, name: Any, @@ -2226,16 +1630,6 @@ def create_data_stream( longer than 255 bytes. Multi-byte characters count towards this limit faster. :arg body: The data stream definition - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2248,7 +1642,7 @@ def create_data_stream( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_data_stream( self, name: Any, @@ -2261,16 +1655,6 @@ def delete_data_stream( :arg name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2279,16 +1663,7 @@ def delete_data_stream( "DELETE", _make_path("_data_stream", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_index_template( self, name: Any, @@ -2303,20 +1678,10 @@ def delete_index_template( expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -2331,17 +1696,7 @@ def delete_index_template( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") def exists_index_template( self, name: Any, @@ -2356,24 +1711,14 @@ def exists_index_template( Wildcard (*) expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: Return settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2382,17 +1727,7 @@ def exists_index_template( "HEAD", _make_path("_index_template", name), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "flat_settings", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "flat_settings", "local", "master_timeout") def get_index_template( self, name: Any = None, @@ -2407,14 +1742,8 @@ def get_index_template( expressions are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. Default is false. @@ -2422,26 +1751,12 @@ def get_index_template( use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_index_template", name), params=params, headers=headers ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") def put_index_template( self, name: Any, @@ -2461,19 +1776,9 @@ def put_index_template( to cluster-manager node. :arg create: If `true`, this request cannot replace or update existing index templates. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (name, body): if param in SKIP_IN_PATH: @@ -2487,17 +1792,7 @@ def put_index_template( body=body, ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") def simulate_index_template( self, name: Any, @@ -2522,20 +1817,10 @@ def simulate_index_template( the simulation usesthe template with the highest priority. Note that the template is notpermanently added or updated in either case; it is only used for thesimulation. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is receivedbefore the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2548,7 +1833,7 @@ def simulate_index_template( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_data_stream( self, name: Any = None, @@ -2562,32 +1847,12 @@ def get_data_stream( :arg name: Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_data_stream", name), params=params, headers=headers ) - @query_params( - "cause", - "cluster_manager_timeout", - "create", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cause", "cluster_manager_timeout", "create", "master_timeout") def simulate_template( self, body: Any = None, @@ -2611,20 +1876,10 @@ def simulate_template( the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "POST", @@ -2634,9 +1889,7 @@ def simulate_template( body=body, ) - @query_params( - "error_trace", "expand_wildcards", "filter_path", "human", "pretty", "source" - ) + @query_params("expand_wildcards") def resolve_index( self, name: Any, @@ -2650,21 +1903,11 @@ def resolve_index( :arg name: Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Type of index that wildcard patterns can match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -2676,14 +1919,9 @@ def resolve_index( @query_params( "allow_no_indices", "cluster_manager_timeout", - "error_trace", "expand_wildcards", - "filter_path", - "human", "ignore_unavailable", "master_timeout", - "pretty", - "source", "timeout", ) def add_block( @@ -2705,24 +1943,14 @@ def add_block( string or when no indices have been specified) :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ for param in (index, block): @@ -2733,7 +1961,7 @@ def add_block( "PUT", _make_path(index, "_block", block), params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def data_streams_stats( self, name: Any = None, @@ -2747,16 +1975,6 @@ def data_streams_stats( :arg name: Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", diff --git a/opensearchpy/client/ingest.py b/opensearchpy/client/ingest.py index 14495bff7..9fc1a6e99 100644 --- a/opensearchpy/client/ingest.py +++ b/opensearchpy/client/ingest.py @@ -40,15 +40,7 @@ class IngestClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") def get_pipeline( self, id: Any = None, @@ -64,35 +56,16 @@ def get_pipeline( omit this parameter or use `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_ingest", "pipeline", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def put_pipeline( self, id: Any, @@ -108,20 +81,10 @@ def put_pipeline( :arg body: The ingest definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -138,16 +101,7 @@ def put_pipeline( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_pipeline( self, id: Any, @@ -163,20 +117,10 @@ def delete_pipeline( value of `*`. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -191,7 +135,7 @@ def delete_pipeline( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "verbose") + @query_params("verbose") def simulate( self, body: Any, @@ -206,16 +150,6 @@ def simulate( :arg body: The simulate definition :arg id: Pipeline to test. If you don’t specify a `pipeline` in the request body, this parameter is required. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the response includes output data for each processor in the executed pipeline. Default is false. """ @@ -230,7 +164,7 @@ def simulate( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def processor_grok( self, params: Any = None, @@ -239,17 +173,6 @@ def processor_grok( """ Returns a list of the built-in patterns. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_ingest/processor/grok", params=params, headers=headers diff --git a/opensearchpy/client/nodes.py b/opensearchpy/client/nodes.py index 7eff84acf..c97ade9a5 100644 --- a/opensearchpy/client/nodes.py +++ b/opensearchpy/client/nodes.py @@ -40,7 +40,7 @@ class NodesClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") def reload_secure_settings( self, body: Any = None, @@ -56,16 +56,6 @@ def reload_secure_settings( keystore :arg node_id: The names of particular nodes in the cluster to target. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. @@ -78,15 +68,7 @@ def reload_secure_settings( body=body, ) - @query_params( - "error_trace", - "filter_path", - "flat_settings", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("flat_settings", "timeout") def info( self, node_id: Any = None, @@ -102,18 +84,8 @@ def info( limit returned information. :arg metric: Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg flat_settings: If true, returns settings in flat format. Default is false. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -124,16 +96,11 @@ def info( @query_params( "completion_fields", - "error_trace", "fielddata_fields", "fields", - "filter_path", "groups", - "human", "include_segment_file_sizes", "level", - "pretty", - "source", "timeout", "types", ) @@ -158,28 +125,18 @@ def stats( all) metric is specified. :arg completion_fields: Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg fielddata_fields: Comma-separated list or wildcard expressions of fields to include in fielddata statistics. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg groups: Comma-separated list of search groups to include in the search statistics. - :arg human: Whether to return human readable values for - statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). Default is false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -194,17 +151,7 @@ def stats( ) @query_params( - "doc_type", - "error_trace", - "filter_path", - "human", - "ignore_idle_threads", - "interval", - "pretty", - "snapshots", - "source", - "threads", - "timeout", + "doc_type", "ignore_idle_threads", "interval", "snapshots", "threads", "timeout" ) def hot_threads( self, @@ -222,22 +169,12 @@ def hot_threads( nodes. :arg doc_type: The type to sample. Valid choices are cpu, wait, block. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_idle_threads: Don't show threads that are in known- idle places, such as waiting on a socket select or pulling from an empty task queue. Default is True. :arg interval: The interval for the second sampling of threads. - :arg pretty: Whether to pretty format the returned JSON - response. :arg snapshots: Number of samples of thread stacktrace. Default is 10. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg threads: Specify the number of threads to provide information for. Default is 3. :arg timeout: Operation timeout. @@ -253,7 +190,7 @@ def hot_threads( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") def usage( self, node_id: Any = None, @@ -272,16 +209,6 @@ def usage( :arg metric: Limits the information returned to the specific metrics. A comma-separated list of the following options: `_all`, `rest_actions`. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. diff --git a/opensearchpy/client/remote_store.py b/opensearchpy/client/remote_store.py index 20e22eaea..55d8fd6ed 100644 --- a/opensearchpy/client/remote_store.py +++ b/opensearchpy/client/remote_store.py @@ -22,15 +22,7 @@ class RemoteStoreClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "wait_for_completion") def restore( self, body: Any, @@ -44,16 +36,6 @@ def restore( :arg body: Comma-separated list of index IDs :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning. Default is false. """ diff --git a/opensearchpy/client/search_pipeline.py b/opensearchpy/client/search_pipeline.py index bd764c3c7..0f474ce7d 100644 --- a/opensearchpy/client/search_pipeline.py +++ b/opensearchpy/client/search_pipeline.py @@ -22,14 +22,7 @@ class SearchPipelineClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout") def get( self, id: Any = None, @@ -44,30 +37,12 @@ def get( supported. :arg cluster_manager_timeout: operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_search", "pipeline", id), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "timeout") def delete( self, id: Any, @@ -81,16 +56,6 @@ def delete( :arg id: Pipeline ID. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ if id in SKIP_IN_PATH: @@ -103,15 +68,7 @@ def delete( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "timeout") def put( self, id: Any, @@ -126,16 +83,6 @@ def put( :arg id: Pipeline ID. :arg cluster_manager_timeout: operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ for param in (id, body): diff --git a/opensearchpy/client/security.py b/opensearchpy/client/security.py index f6002e43b..c99f89bf8 100644 --- a/opensearchpy/client/security.py +++ b/opensearchpy/client/security.py @@ -24,7 +24,7 @@ class SecurityClient(NamespacedClient): from ._patch import health_check, update_audit_config # type: ignore - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_account_details( self, params: Any = None, @@ -33,23 +33,12 @@ def get_account_details( """ Returns account details for the current user. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/api/account", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def change_password( self, body: Any, @@ -60,16 +49,6 @@ def change_password( Changes the password for the current user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -82,7 +61,7 @@ def change_password( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_action_group( self, action_group: Any, @@ -94,16 +73,6 @@ def get_action_group( :arg action_group: Action group to retrieve. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if action_group in SKIP_IN_PATH: raise ValueError( @@ -117,7 +86,7 @@ def get_action_group( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_action_groups( self, params: Any = None, @@ -126,17 +95,6 @@ def get_action_groups( """ Retrieves all action groups. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -145,7 +103,7 @@ def get_action_groups( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_action_group( self, action_group: Any, @@ -157,16 +115,6 @@ def delete_action_group( :arg action_group: Action group to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if action_group in SKIP_IN_PATH: raise ValueError( @@ -180,7 +128,7 @@ def delete_action_group( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_action_group( self, action_group: Any, @@ -194,16 +142,6 @@ def create_action_group( :arg action_group: The name of the action group to create or replace - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (action_group, body): if param in SKIP_IN_PATH: @@ -217,7 +155,7 @@ def create_action_group( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_action_group( self, action_group: Any, @@ -229,16 +167,6 @@ def patch_action_group( Updates individual attributes of an action group. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (action_group, body): if param in SKIP_IN_PATH: @@ -253,7 +181,7 @@ def patch_action_group( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_action_groups( self, body: Any, @@ -264,16 +192,6 @@ def patch_action_groups( Creates, updates, or deletes multiple action groups in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -287,7 +205,7 @@ def patch_action_groups( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_user( self, username: Any, @@ -298,16 +216,6 @@ def get_user( Retrieve one internal user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if username in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'username'.") @@ -319,7 +227,7 @@ def get_user( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_users( self, params: Any = None, @@ -328,17 +236,6 @@ def get_users( """ Retrieve all internal users. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -347,7 +244,7 @@ def get_users( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_user( self, username: Any, @@ -358,16 +255,6 @@ def delete_user( Delete the specified user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if username in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'username'.") @@ -379,7 +266,7 @@ def delete_user( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_user( self, username: Any, @@ -391,16 +278,6 @@ def create_user( Creates or replaces the specified user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (username, body): if param in SKIP_IN_PATH: @@ -414,7 +291,7 @@ def create_user( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_user( self, username: Any, @@ -426,16 +303,6 @@ def patch_user( Updates individual attributes of an internal user. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (username, body): if param in SKIP_IN_PATH: @@ -450,7 +317,7 @@ def patch_user( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_users( self, body: Any, @@ -461,16 +328,6 @@ def patch_users( Creates, updates, or deletes multiple internal users in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -484,7 +341,7 @@ def patch_users( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_role( self, role: Any, @@ -495,16 +352,6 @@ def get_role( Retrieves one role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -516,7 +363,7 @@ def get_role( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_roles( self, params: Any = None, @@ -525,23 +372,12 @@ def get_roles( """ Retrieves all roles. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/api/roles/", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_role( self, role: Any, @@ -552,16 +388,6 @@ def delete_role( Delete the specified role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -573,7 +399,7 @@ def delete_role( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_role( self, role: Any, @@ -585,16 +411,6 @@ def create_role( Creates or replaces the specified role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -608,7 +424,7 @@ def create_role( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_role( self, role: Any, @@ -620,16 +436,6 @@ def patch_role( Updates individual attributes of a role. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -644,7 +450,7 @@ def patch_role( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_roles( self, body: Any, @@ -655,16 +461,6 @@ def patch_roles( Creates, updates, or deletes multiple roles in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -678,7 +474,7 @@ def patch_roles( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_role_mapping( self, role: Any, @@ -689,16 +485,6 @@ def get_role_mapping( Retrieves one role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -710,7 +496,7 @@ def get_role_mapping( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_role_mappings( self, params: Any = None, @@ -719,17 +505,6 @@ def get_role_mappings( """ Retrieves all role mappings. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -738,7 +513,7 @@ def get_role_mappings( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_role_mapping( self, role: Any, @@ -749,16 +524,6 @@ def delete_role_mapping( Deletes the specified role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if role in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'role'.") @@ -770,7 +535,7 @@ def delete_role_mapping( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_role_mapping( self, role: Any, @@ -782,16 +547,6 @@ def create_role_mapping( Creates or replaces the specified role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -805,7 +560,7 @@ def create_role_mapping( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_role_mapping( self, role: Any, @@ -817,16 +572,6 @@ def patch_role_mapping( Updates individual attributes of a role mapping. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (role, body): if param in SKIP_IN_PATH: @@ -841,7 +586,7 @@ def patch_role_mapping( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_role_mappings( self, body: Any, @@ -852,16 +597,6 @@ def patch_role_mappings( Creates or updates multiple role mappings in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -875,7 +610,7 @@ def patch_role_mappings( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_tenant( self, tenant: Any, @@ -886,16 +621,6 @@ def get_tenant( Retrieves one tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if tenant in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'tenant'.") @@ -907,7 +632,7 @@ def get_tenant( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_tenants( self, params: Any = None, @@ -916,23 +641,12 @@ def get_tenants( """ Retrieves all tenants. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/api/tenants/", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_tenant( self, tenant: Any, @@ -943,16 +657,6 @@ def delete_tenant( Delete the specified tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if tenant in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'tenant'.") @@ -964,7 +668,7 @@ def delete_tenant( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_tenant( self, tenant: Any, @@ -976,16 +680,6 @@ def create_tenant( Creates or replaces the specified tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (tenant, body): if param in SKIP_IN_PATH: @@ -999,7 +693,7 @@ def create_tenant( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_tenant( self, tenant: Any, @@ -1011,16 +705,6 @@ def patch_tenant( Add, delete, or modify a single tenant. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (tenant, body): if param in SKIP_IN_PATH: @@ -1035,7 +719,7 @@ def patch_tenant( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_tenants( self, body: Any, @@ -1046,16 +730,6 @@ def patch_tenants( Add, delete, or modify multiple tenants in a single call. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1069,7 +743,7 @@ def patch_tenants( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_configuration( self, params: Any = None, @@ -1078,17 +752,6 @@ def get_configuration( """ Returns the current Security plugin configuration in JSON format. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -1097,7 +760,7 @@ def get_configuration( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def update_configuration( self, body: Any, @@ -1108,16 +771,6 @@ def update_configuration( Adds or updates the existing configuration using the REST API. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1130,7 +783,7 @@ def update_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_configuration( self, body: Any, @@ -1141,16 +794,6 @@ def patch_configuration( A PATCH call is used to update the existing configuration using the REST API. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1164,7 +807,7 @@ def patch_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_distinguished_names( self, cluster_name: Any = None, @@ -1175,16 +818,6 @@ def get_distinguished_names( Retrieves distinguished names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -1193,7 +826,7 @@ def get_distinguished_names( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def update_distinguished_names( self, cluster_name: Any, @@ -1206,16 +839,6 @@ def update_distinguished_names( allow list. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if cluster_name in SKIP_IN_PATH: raise ValueError( @@ -1230,7 +853,7 @@ def update_distinguished_names( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_distinguished_names( self, cluster_name: Any, @@ -1242,16 +865,6 @@ def delete_distinguished_names( list. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if cluster_name in SKIP_IN_PATH: raise ValueError( @@ -1265,7 +878,7 @@ def delete_distinguished_names( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_certificates( self, params: Any = None, @@ -1274,23 +887,12 @@ def get_certificates( """ Retrieves the cluster’s security certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/api/ssl/certs", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def reload_transport_certificates( self, params: Any = None, @@ -1299,17 +901,6 @@ def reload_transport_certificates( """ Reload transport layer communication certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "PUT", @@ -1318,7 +909,7 @@ def reload_transport_certificates( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def reload_http_certificates( self, params: Any = None, @@ -1327,17 +918,6 @@ def reload_http_certificates( """ Reload HTTP layer communication certificates. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "PUT", @@ -1346,7 +926,7 @@ def reload_http_certificates( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def flush_cache( self, params: Any = None, @@ -1355,23 +935,12 @@ def flush_cache( """ Flushes the Security plugin user, authentication, and authorization cache. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", "/_plugins/_security/api/cache", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def health( self, params: Any = None, @@ -1380,23 +949,12 @@ def health( """ Checks to see if the Security plugin is up and running. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/health", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_audit_configuration( self, params: Any = None, @@ -1405,23 +963,12 @@ def get_audit_configuration( """ Retrieves the audit configuration. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_security/api/audit", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def update_audit_configuration( self, body: Any, @@ -1432,16 +979,6 @@ def update_audit_configuration( Updates the audit configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1454,7 +991,7 @@ def update_audit_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_audit_configuration( self, body: Any, @@ -1465,16 +1002,6 @@ def patch_audit_configuration( A PATCH call is used to update specified fields in the audit configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -1488,7 +1015,7 @@ def patch_audit_configuration( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def patch_distinguished_names( self, body: Any, @@ -1499,16 +1026,6 @@ def patch_distinguished_names( Bulk update of distinguished names. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") diff --git a/opensearchpy/client/snapshot.py b/opensearchpy/client/snapshot.py index 2f0cd1d71..a4c5fc78f 100644 --- a/opensearchpy/client/snapshot.py +++ b/opensearchpy/client/snapshot.py @@ -40,16 +40,7 @@ class SnapshotClient(NamespacedClient): - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "master_timeout", "wait_for_completion") def create( self, repository: Any, @@ -68,20 +59,10 @@ def create( :arg body: The snapshot definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns a response when the snapshot initializes. Default is false. @@ -98,15 +79,7 @@ def create( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") def delete( self, repository: Any, @@ -122,19 +95,9 @@ def delete( :arg snapshot: A comma-separated list of snapshot names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -148,15 +111,7 @@ def delete( ) @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "ignore_unavailable", - "master_timeout", - "pretty", - "source", - "verbose", + "cluster_manager_timeout", "ignore_unavailable", "master_timeout", "verbose" ) def get( self, @@ -178,22 +133,12 @@ def get( _current. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: If false, the request returns an error for any snapshots that are unavailable. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg verbose: If true, returns additional information about each snapshot such as the version of Opensearch which took the snapshot, the start and end times of the snapshot, and the number of shards @@ -210,16 +155,7 @@ def get( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def delete_repository( self, repository: Any, @@ -234,19 +170,9 @@ def delete_repository( Wildcard (`*`) patterns are supported. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if repository in SKIP_IN_PATH: @@ -259,16 +185,7 @@ def delete_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "local", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "local", "master_timeout") def get_repository( self, repository: Any = None, @@ -282,37 +199,17 @@ def get_repository( :arg repository: A comma-separated list of repository names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", _make_path("_snapshot", repository), params=params, headers=headers ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - "verify", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout", "verify") def create_repository( self, repository: Any, @@ -328,19 +225,9 @@ def create_repository( :arg body: The repository definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout :arg verify: Whether to verify the repository after creation """ @@ -356,16 +243,7 @@ def create_repository( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("cluster_manager_timeout", "master_timeout", "wait_for_completion") def restore( self, repository: Any, @@ -383,19 +261,9 @@ def restore( :arg body: Details of what to restore :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should this request wait until the operation has completed before returning Default is false. """ @@ -411,16 +279,7 @@ def restore( body=body, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "ignore_unavailable", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "ignore_unavailable", "master_timeout") def status( self, repository: Any = None, @@ -436,22 +295,12 @@ def status( :arg snapshot: A comma-separated list of snapshot names :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -460,16 +309,7 @@ def status( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def verify_repository( self, repository: Any, @@ -483,19 +323,9 @@ def verify_repository( :arg repository: A repository name :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Explicit operation timeout """ if repository in SKIP_IN_PATH: @@ -508,16 +338,7 @@ def verify_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - "timeout", - ) + @query_params("cluster_manager_timeout", "master_timeout", "timeout") def cleanup_repository( self, repository: Any, @@ -531,19 +352,9 @@ def cleanup_repository( :arg repository: Snapshot repository to clean up. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. """ if repository in SKIP_IN_PATH: @@ -556,15 +367,7 @@ def cleanup_repository( headers=headers, ) - @query_params( - "cluster_manager_timeout", - "error_trace", - "filter_path", - "human", - "master_timeout", - "pretty", - "source", - ) + @query_params("cluster_manager_timeout", "master_timeout") def clone( self, repository: Any, @@ -584,19 +387,9 @@ def clone( :arg body: The snapshot clone definition :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (repository, snapshot, target_snapshot, body): if param in SKIP_IN_PATH: diff --git a/opensearchpy/client/tasks.py b/opensearchpy/client/tasks.py index 037054324..a8a50581a 100644 --- a/opensearchpy/client/tasks.py +++ b/opensearchpy/client/tasks.py @@ -44,14 +44,9 @@ class TasksClient(NamespacedClient): @query_params( "actions", "detailed", - "error_trace", - "filter_path", "group_by", - "human", "nodes", "parent_task_id", - "pretty", - "source", "timeout", "wait_for_completion", ) @@ -68,14 +63,8 @@ def list( actions used to limit the request. :arg detailed: If `true`, the response includes detailed information about shard recoveries. Default is false. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg group_by: Key used to group tasks in the response. Valid choices are nodes, parents, none. - :arg human: Whether to return human readable values for - statistics. :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 @@ -83,10 +72,6 @@ def list( :arg parent_task_id: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -97,17 +82,7 @@ def list( "GET", "/_tasks", params=params, headers=headers ) - @query_params( - "actions", - "error_trace", - "filter_path", - "human", - "nodes", - "parent_task_id", - "pretty", - "source", - "wait_for_completion", - ) + @query_params("actions", "nodes", "parent_task_id", "wait_for_completion") def cancel( self, task_id: Any = None, @@ -121,19 +96,9 @@ def cancel( :arg task_id: ID of the task. :arg actions: Comma-separated list or wildcard expression of actions used to limit the request. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg nodes: Comma-separated list of node IDs or names used to limit the request. :arg parent_task_id: Parent task ID used to limit the tasks. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false Default is false. @@ -145,15 +110,7 @@ def cancel( headers=headers, ) - @query_params( - "error_trace", - "filter_path", - "human", - "pretty", - "source", - "timeout", - "wait_for_completion", - ) + @query_params("timeout", "wait_for_completion") def get( self, task_id: Any = None, @@ -165,16 +122,6 @@ def get( :arg task_id: ID of the task. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error. diff --git a/opensearchpy/plugins/knn.py b/opensearchpy/plugins/knn.py index 475492d2f..6c8e4ead5 100644 --- a/opensearchpy/plugins/knn.py +++ b/opensearchpy/plugins/knn.py @@ -22,7 +22,7 @@ class KnnClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_model( self, model_id: Any, @@ -34,16 +34,6 @@ def delete_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if model_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'model_id'.") @@ -55,7 +45,7 @@ def delete_model( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_model( self, model_id: Any, @@ -67,16 +57,6 @@ def get_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if model_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'model_id'.") @@ -101,19 +81,15 @@ def get_model( "default_operator", "df", "docvalue_fields", - "error_trace", "expand_wildcards", "explain", - "filter_path", "from_", - "human", "ignore_throttled", "ignore_unavailable", "lenient", "max_concurrent_shard_requests", "pre_filter_shard_size", "preference", - "pretty", "q", "request_cache", "rest_total_hits_as_int", @@ -123,7 +99,6 @@ def get_model( "seq_no_primary_term", "size", "sort", - "source", "stats", "stored_fields", "suggest_field", @@ -176,18 +151,12 @@ def search_models( given in the query string. :arg docvalue_fields: Comma-separated list of fields to return as the docvalue representation of a field for each hit. - :arg error_trace: Whether to include the stack trace of returned - errors. :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both. Valid choices are all, open, closed, hidden, none. :arg explain: Specify whether to return detailed information about score computation as part of a hit. - :arg filter_path: Comma-separated list of filters used to reduce - the response. :arg from_: Starting offset. Default is 0. - :arg human: Whether to return human readable values for - statistics. :arg ignore_throttled: Whether specified concrete, expanded or aliased indices should be ignored when throttled. :arg ignore_unavailable: Whether specified concrete indices @@ -207,8 +176,6 @@ def search_models( and the query are disjoint. :arg preference: Specify the node or shard the operation should be performed on. Default is random. - :arg pretty: Whether to pretty format the returned JSON - response. :arg q: Query in the Lucene query string syntax. :arg request_cache: Specify if request cache should be used for this request or not, defaults to index level setting. @@ -224,8 +191,6 @@ def search_models( number and primary term of the last modification of each hit. :arg size: Number of hits to return. Default is 10. :arg sort: Comma-separated list of : pairs. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg stats: Specific 'tag' of the request for logging and statistical purposes. :arg stored_fields: Comma-separated list of stored fields to @@ -261,7 +226,7 @@ def search_models( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source", "timeout") + @query_params("timeout") def stats( self, node_id: Any = None, @@ -289,16 +254,6 @@ def stats( model_index_status, indexing_from_model_degraded, training_requests, training_errors, training_memory_usage, training_memory_usage_percentage. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. :arg timeout: Operation timeout. """ return self.transport.perform_request( @@ -308,9 +263,7 @@ def stats( headers=headers, ) - @query_params( - "error_trace", "filter_path", "human", "preference", "pretty", "source" - ) + @query_params("preference") def train_model( self, body: Any, @@ -324,17 +277,7 @@ def train_model( :arg model_id: The id of the model. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. :arg preference: Preferred node to execute training. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -347,7 +290,7 @@ def train_model( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def warmup( self, index: Any, @@ -361,16 +304,6 @@ def warmup( :arg index: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") diff --git a/opensearchpy/plugins/notifications.py b/opensearchpy/plugins/notifications.py index ed1e4f1a8..85a5b8702 100644 --- a/opensearchpy/plugins/notifications.py +++ b/opensearchpy/plugins/notifications.py @@ -22,7 +22,7 @@ class NotificationsClient(NamespacedClient): - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def create_config( self, body: Any, @@ -33,16 +33,6 @@ def create_config( Create channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -55,7 +45,7 @@ def create_config( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def delete_config( self, config_id: Any, @@ -67,16 +57,6 @@ def delete_config( :arg config_id: The ID of the channel configuration to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -88,15 +68,7 @@ def delete_config( headers=headers, ) - @query_params( - "config_id", - "config_id_list", - "error_trace", - "filter_path", - "human", - "pretty", - "source", - ) + @query_params("config_id", "config_id_list") def delete_configs( self, params: Any = None, @@ -109,22 +81,12 @@ def delete_configs( :arg config_id: The ID of the channel configuration to delete. :arg config_id_list: A comma-separated list of channel IDs to delete. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "DELETE", "/_plugins/_notifications/configs", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def get_config( self, config_id: Any, @@ -135,16 +97,6 @@ def get_config( Get a specific channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -169,16 +121,12 @@ def get_config( "email.recipient_list.recipient.keyword", "email_group.recipient_list.recipient", "email_group.recipient_list.recipient.keyword", - "error_trace", - "filter_path", - "human", "is_enabled", "last_updated_time_ms", "microsoft_teams.url", "microsoft_teams.url.keyword", "name", "name.keyword", - "pretty", "query", "ses_account.from_address", "ses_account.from_address.keyword", @@ -196,7 +144,6 @@ def get_config( "sns.role_arn.keyword", "sns.topic_arn", "sns.topic_arn.keyword", - "source", "text_query", "webhook.url", "webhook.url.keyword", @@ -214,16 +161,6 @@ def get_configs( :arg config_type: Type of notification configuration. Valid choices are slack, chime, microsoft_teams, webhook, email, sns, ses_account, smtp_account, email_group. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", @@ -233,7 +170,7 @@ def get_configs( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def list_features( self, params: Any = None, @@ -242,23 +179,12 @@ def list_features( """ List supported channel configurations. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_notifications/features", params=params, headers=headers ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def send_test( self, config_id: Any, @@ -269,16 +195,6 @@ def send_test( Send a test notification. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ if config_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'config_id'.") @@ -290,7 +206,7 @@ def send_test( headers=headers, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def update_config( self, config_id: Any, @@ -302,16 +218,6 @@ def update_config( Update channel configuration. - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ for param in (config_id, body): if param in SKIP_IN_PATH: @@ -325,7 +231,7 @@ def update_config( body=body, ) - @query_params("error_trace", "filter_path", "human", "pretty", "source") + @query_params() def list_channels( self, params: Any = None, @@ -334,17 +240,6 @@ def list_channels( """ List created notification channels. - - :arg error_trace: Whether to include the stack trace of returned - errors. - :arg filter_path: Comma-separated list of filters used to reduce - the response. - :arg human: Whether to return human readable values for - statistics. - :arg pretty: Whether to pretty format the returned JSON - response. - :arg source: The URL-encoded request definition. Useful for - libraries that do not accept a request body for non-POST requests. """ return self.transport.perform_request( "GET", "/_plugins/_notifications/channels", params=params, headers=headers