From ba0336e35ef77c3e975799294f4e0f6e2cbb6e3d Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Wed, 31 Jul 2024 16:16:52 +0000 Subject: [PATCH] Auto-generated API code --- .../_async/client/__init__.py | 245 +++--- .../_async/client/async_search.py | 20 +- elasticsearch_serverless/_async/client/cat.py | 763 +++++++++++++++--- .../_async/client/cluster.py | 59 +- .../_async/client/enrich.py | 10 +- elasticsearch_serverless/_async/client/eql.py | 14 +- .../_async/client/esql.py | 107 --- .../_async/client/graph.py | 2 +- .../_async/client/indices.py | 305 +++---- .../_async/client/inference.py | 10 +- .../_async/client/ingest.py | 16 +- .../_async/client/license.py | 6 +- elasticsearch_serverless/_async/client/ml.py | 113 +-- .../_async/client/query_rules.py | 16 +- .../_async/client/security.py | 151 ++-- elasticsearch_serverless/_async/client/sql.py | 14 +- .../_async/client/tasks.py | 5 +- .../_async/client/transform.py | 146 ++-- .../_sync/client/__init__.py | 245 +++--- .../_sync/client/async_search.py | 20 +- elasticsearch_serverless/_sync/client/cat.py | 763 +++++++++++++++--- .../_sync/client/cluster.py | 59 +- .../_sync/client/enrich.py | 10 +- elasticsearch_serverless/_sync/client/eql.py | 14 +- .../_sync/client/graph.py | 2 +- .../_sync/client/indices.py | 305 +++---- .../_sync/client/inference.py | 10 +- .../_sync/client/ingest.py | 16 +- .../_sync/client/license.py | 6 +- elasticsearch_serverless/_sync/client/ml.py | 113 +-- .../_sync/client/query_rules.py | 16 +- .../_sync/client/security.py | 151 ++-- elasticsearch_serverless/_sync/client/sql.py | 14 +- .../_sync/client/tasks.py | 5 +- .../_sync/client/transform.py | 146 ++-- 35 files changed, 2456 insertions(+), 1441 deletions(-) delete mode 100644 elasticsearch_serverless/_async/client/esql.py diff --git a/elasticsearch_serverless/_async/client/__init__.py b/elasticsearch_serverless/_async/client/__init__.py index c952305..e08fe34 100644 --- a/elasticsearch_serverless/_async/client/__init__.py +++ b/elasticsearch_serverless/_async/client/__init__.py @@ -455,21 +455,22 @@ async def bulk( pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, routing: t.Optional[str] = None, source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Performs multiple indexing or delete operations in a single API call. This reduces - overhead and can greatly increase indexing speed. + Bulk index or delete documents. Performs multiple indexing or delete operations + in a single API call. This reduces overhead and can greatly increase indexing + speed. ``_ @@ -666,15 +667,15 @@ async def count( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -812,22 +813,22 @@ async def create( pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a JSON document to the specified data stream or index and makes it searchable. - If the target is an index and the document already exists, the request updates - the document and increments its version. + Index a document. Adds a JSON document to the specified data stream or index + and makes it searchable. If the target is an index and the document already exists, + the request updates the document and increments its version. ``_ @@ -918,20 +919,20 @@ async def delete( if_seq_no: t.Optional[int] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes a JSON document from the specified index. + Delete a document. Removes a JSON document from the specified index. ``_ @@ -1007,16 +1008,16 @@ async def delete_by_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1033,29 +1034,27 @@ async def delete_by_query( request_cache: t.Optional[bool] = None, requests_per_second: t.Optional[float] = None, routing: t.Optional[str] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, scroll_size: t.Optional[int] = None, - search_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, slice: t.Optional[t.Mapping[str, t.Any]] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, sort: t.Optional[t.Sequence[str]] = None, stats: t.Optional[t.Sequence[str]] = None, terminate_after: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[bool] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes documents that match the specified query. + Delete documents. Deletes documents that match the specified query. ``_ @@ -1229,14 +1228,12 @@ async def delete_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a stored script or search template. + Delete a script or search template. Deletes a stored script or search template. ``_ @@ -1300,11 +1297,11 @@ async def exists( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> HeadApiResponse: """ - Checks if a document in an index exists. + Check a document. Checks if a specified document exists. ``_ @@ -1401,11 +1398,11 @@ async def exists_source( source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> HeadApiResponse: """ - Checks if a document's `_source` is stored. + Check for a document source. Checks if a document's `_source` is stored. ``_ @@ -1487,7 +1484,7 @@ async def explain( id: str, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1505,8 +1502,8 @@ async def explain( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about why a specific document matches (or doesn’t match) - a query. + Explain a document match result. Returns information about why a specific document + matches, or doesn’t match, a query. ``_ @@ -1606,9 +1603,9 @@ async def field_caps( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1740,11 +1737,12 @@ async def get( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns a document. + Get a document by its ID. Retrieves the document with the specified ID from an + index. ``_ @@ -1829,13 +1827,11 @@ async def get_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves a stored script or search template. + Get a script or search template. Retrieves a stored script or search template. ``_ @@ -1893,11 +1889,11 @@ async def get_source( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns the source of a document. + Get a document's source. Returns the source of a document. ``_ @@ -1981,27 +1977,27 @@ async def index( human: t.Optional[bool] = None, if_primary_term: t.Optional[int] = None, if_seq_no: t.Optional[int] = None, - op_type: t.Optional[t.Union["t.Literal['create', 'index']", str]] = None, + op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None, pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a JSON document to the specified data stream or index and makes it searchable. - If the target is an index and the document already exists, the request updates - the document and increments its version. + Index a document. Adds a JSON document to the specified data stream or index + and makes it searchable. If the target is an index and the document already exists, + the request updates the document and increments its version. ``_ @@ -2110,7 +2106,7 @@ async def info( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns basic information about the cluster. + Get cluster info. Returns basic information about the cluster. ``_ """ @@ -2264,9 +2260,9 @@ async def msearch( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2280,7 +2276,7 @@ async def msearch( rest_total_hits_as_int: t.Optional[bool] = None, routing: t.Optional[str] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, typed_keys: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -2403,7 +2399,7 @@ async def msearch_template( pretty: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, typed_keys: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -2498,7 +2494,7 @@ async def mtermvectors( term_statistics: t.Optional[bool] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: @@ -2592,14 +2588,14 @@ async def open_point_in_time( self, *, index: t.Union[str, t.Sequence[str]], - keep_alive: t.Union["t.Literal[-1]", "t.Literal[0]", str], + keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]], error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2680,15 +2676,14 @@ async def put_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates or updates a stored script or search template. + Create or update a script or search template. Creates or updates a stored script + or search template. ``_ @@ -2759,9 +2754,9 @@ async def rank_eval( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2847,7 +2842,7 @@ async def reindex( *, dest: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, @@ -2857,20 +2852,20 @@ async def reindex( requests_per_second: t.Optional[float] = None, require_alias: t.Optional[bool] = None, script: t.Optional[t.Mapping[str, t.Any]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, size: t.Optional[int] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Allows to copy documents from one index to another, optionally filtering the - source documents by a query, changing the destination index settings, or fetching - the documents from a remote cluster. + Reindex documents. Copies documents from a source to a destination. The source + can be any existing index, alias, or data stream. The destination must differ + from the source. For example, you cannot reindex a data stream into itself. ``_ @@ -3040,7 +3035,7 @@ async def scripts_painless_execute( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Runs a script and returns a result. + Run a script. Runs a script and returns a result. ``_ @@ -3094,7 +3089,7 @@ async def scroll( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3202,16 +3197,16 @@ async def search( batched_reduce_size: t.Optional[int] = None, ccs_minimize_roundtrips: t.Optional[bool] = None, collapse: t.Optional[t.Mapping[str, t.Any]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -3250,12 +3245,12 @@ async def search( routing: t.Optional[str] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_after: t.Optional[ t.Sequence[t.Union[None, bool, float, int, str, t.Any]] ] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, seq_no_primary_term: t.Optional[bool] = None, size: t.Optional[int] = None, @@ -3274,7 +3269,7 @@ async def search( suggest: t.Optional[t.Mapping[str, t.Any]] = None, suggest_field: t.Optional[str] = None, suggest_mode: t.Optional[ - t.Union["t.Literal['always', 'missing', 'popular']", str] + t.Union[str, t.Literal["always", "missing", "popular"]] ] = None, suggest_size: t.Optional[int] = None, suggest_text: t.Optional[str] = None, @@ -3689,10 +3684,10 @@ async def search_mvt( extent: t.Optional[int] = None, fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - grid_agg: t.Optional[t.Union["t.Literal['geohex', 'geotile']", str]] = None, + grid_agg: t.Optional[t.Union[str, t.Literal["geohex", "geotile"]]] = None, grid_precision: t.Optional[int] = None, grid_type: t.Optional[ - t.Union["t.Literal['centroid', 'grid', 'point']", str] + t.Union[str, t.Literal["centroid", "grid", "point"]] ] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, @@ -3710,8 +3705,7 @@ async def search_mvt( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> BinaryApiResponse: """ - Searches a vector tile for geospatial values. Returns results as a binary Mapbox - vector tile. + Search a vector tile. Searches a vector tile for geospatial values. ``_ @@ -3855,9 +3849,9 @@ async def search_template( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -3872,9 +3866,9 @@ async def search_template( profile: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, routing: t.Optional[str] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, source: t.Optional[str] = None, typed_keys: t.Optional[bool] = None, @@ -4009,7 +4003,7 @@ async def terms_enum( search_after: t.Optional[str] = None, size: t.Optional[int] = None, string: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -4108,13 +4102,13 @@ async def termvectors( term_statistics: t.Optional[bool] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information and statistics about terms in the fields of a particular - document. + Get term vector information. Returns information and statistics about terms in + the fields of a particular document. ``_ @@ -4238,7 +4232,7 @@ async def update( lang: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, retry_on_conflict: t.Optional[int] = None, @@ -4248,15 +4242,16 @@ async def update( source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, upsert: t.Optional[t.Mapping[str, t.Any]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates a document with a script or partial document. + Update a document. Updates a document by running a script or passing a partial + document. ``_ @@ -4371,16 +4366,16 @@ async def update_by_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -4398,32 +4393,30 @@ async def update_by_query( requests_per_second: t.Optional[float] = None, routing: t.Optional[str] = None, script: t.Optional[t.Mapping[str, t.Any]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, scroll_size: t.Optional[int] = None, - search_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, slice: t.Optional[t.Mapping[str, t.Any]] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, sort: t.Optional[t.Sequence[str]] = None, stats: t.Optional[t.Sequence[str]] = None, terminate_after: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[bool] = None, version_type: t.Optional[bool] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates documents that match the specified query. If no query is specified, performs - an update on every document in the data stream or index without modifying the - source, which is useful for picking up mapping changes. + Update documents. Updates documents that match the specified query. If no query + is specified, performs an update on every document in the data stream or index + without modifying the source, which is useful for picking up mapping changes. ``_ diff --git a/elasticsearch_serverless/_async/client/async_search.py b/elasticsearch_serverless/_async/client/async_search.py index b576b39..74bfdc0 100644 --- a/elasticsearch_serverless/_async/client/async_search.py +++ b/elasticsearch_serverless/_async/client/async_search.py @@ -77,11 +77,11 @@ async def get( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, typed_keys: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -236,16 +236,16 @@ async def submit( batched_reduce_size: t.Optional[int] = None, ccs_minimize_roundtrips: t.Optional[bool] = None, collapse: t.Optional[t.Mapping[str, t.Any]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -258,7 +258,7 @@ async def submit( ignore_throttled: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, knn: t.Optional[ t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] @@ -283,12 +283,12 @@ async def submit( routing: t.Optional[str] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_after: t.Optional[ t.Sequence[t.Union[None, bool, float, int, str, t.Any]] ] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, seq_no_primary_term: t.Optional[bool] = None, size: t.Optional[int] = None, @@ -307,7 +307,7 @@ async def submit( suggest: t.Optional[t.Mapping[str, t.Any]] = None, suggest_field: t.Optional[str] = None, suggest_mode: t.Optional[ - t.Union["t.Literal['always', 'missing', 'popular']", str] + t.Union[str, t.Literal["always", "missing", "popular"]] ] = None, suggest_size: t.Optional[int] = None, suggest_text: t.Optional[str] = None, @@ -318,7 +318,7 @@ async def submit( typed_keys: t.Optional[bool] = None, version: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_async/client/cat.py b/elasticsearch_serverless/_async/client/cat.py index a789ca4..5694390 100644 --- a/elasticsearch_serverless/_async/client/cat.py +++ b/elasticsearch_serverless/_async/client/cat.py @@ -34,9 +34,9 @@ async def aliases( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -45,19 +45,17 @@ async def aliases( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Retrieves the cluster’s index aliases, including filter and routing information. - The API does not return data stream aliases. IMPORTANT: cat APIs are only intended + Get aliases. Retrieves the cluster’s index aliases, including filter and routing + information. The API does not return data stream aliases. CAT APIs are only intended for human consumption using the command line or the Kibana console. They are - not intended for use by applications. For application consumption, use the aliases - API. + not intended for use by applications. For application consumption, use the /_alias + endpoints. ``_ @@ -134,19 +132,18 @@ async def component_templates( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns information about component templates in a cluster. Component templates - are building blocks for constructing index templates that specify index mappings, - settings, and aliases. IMPORTANT: cat APIs are only intended for human consumption - using the command line or Kibana console. They are not intended for use by applications. - For application consumption, use the get component template API. + Get component templates. Returns information about component templates in a cluster. + Component templates are building blocks for constructing index templates that + specify index mappings, settings, and aliases. CAT APIs are only intended for + human consumption using the command line or Kibana console. They are not intended + for use by applications. For application consumption, use the /_component_template + endpoints. ``_ @@ -219,20 +216,18 @@ async def count( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Provides quick access to a document count for a data stream, an index, or an - entire cluster. NOTE: The document count only includes live documents, not deleted - documents which have not yet been removed by the merge process. IMPORTANT: cat + Get a document count. Provides quick access to a document count for a data stream, + an index, or an entire cluster.n/ The document count only includes live documents, + not deleted documents which have not yet been removed by the merge process. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, - use the count API. + use /_count endpoints. ``_ @@ -305,15 +300,13 @@ async def help( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> TextApiResponse: """ - Returns help for the Cat APIs. + Get CAT help. Returns help for the CAT APIs. ``_ @@ -373,47 +366,45 @@ async def indices( *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, h: t.Optional[t.Union[str, t.Sequence[str]]] = None, - health: t.Optional[t.Union["t.Literal['green', 'red', 'yellow']", str]] = None, + health: t.Optional[t.Union[str, t.Literal["green", "red", "yellow"]]] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, include_unloaded_segments: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, pri: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns high-level information about indices in a cluster, including backing - indices for data streams. IMPORTANT: cat APIs are only intended for human consumption - using the command line or Kibana console. They are not intended for use by applications. - For application consumption, use the get index API. Use the cat indices API to - get the following information for each index in a cluster: shard count; document - count; deleted document count; primary store size; total store size of all shards, - including shard replicas. These metrics are retrieved directly from Lucene, which - Elasticsearch uses internally to power indexing and search. As a result, all - document counts include hidden nested documents. To get an accurate count of - Elasticsearch documents, use the cat count or count APIs. + Get index information. Returns high-level information about indices in a cluster, + including backing indices for data streams. Use this request to get the following + information for each index in a cluster: - shard count - document count - deleted + document count - primary store size - total store size of all shards, including + shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch + uses internally to power indexing and search. As a result, all document counts + include hidden nested documents. To get an accurate count of Elasticsearch documents, + use the /_cat/count or _count endpoints. CAT APIs are only intended for human + consumption using the command line or Kibana console. They are not intended for + use by applications. For application consumption, use an index endpoint. ``_ @@ -502,7 +493,7 @@ async def ml_data_frame_analytics( id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -511,45 +502,111 @@ async def ml_data_frame_analytics( t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ], ] ] = None, - time: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + time: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about data frame analytics jobs. - IMPORTANT: cat APIs are only intended for human consumption using the Kibana - console or command line. They are not intended for use by applications. For application - consumption, use the get data frame analytics jobs statistics API. + Get data frame analytics jobs. Returns configuration and usage information about + data frame analytics jobs. CAT APIs are only intended for human consumption using + the Kibana console or command line. They are not intended for use by applications. + For application consumption, use the /_ml/data_frame/analytics endpoints. ``_ @@ -631,49 +688,99 @@ async def ml_datafeeds( t.Union[ t.Sequence[ t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ] ], t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ] ], t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ], ] ] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about datafeeds. This API returns - a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, - you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges - to use this API. IMPORTANT: cat APIs are only intended for human consumption + Get datafeeds. Returns configuration and usage information about datafeeds. This + API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features + are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` + cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. - For application consumption, use the get datafeed statistics API. + For application consumption, use the /_ml/datafeeds endpoints. ``_ @@ -752,7 +859,7 @@ async def ml_jobs( job_id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -761,50 +868,292 @@ async def ml_jobs( t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ], ] ] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information for anomaly detection jobs. This - API returns a maximum of 10,000 jobs. If the Elasticsearch security features - are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` - cluster privileges to use this API. IMPORTANT: cat APIs are only intended for + Get anomaly detection jobs. Returns configuration and usage information for anomaly + detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch + security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, + or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended - for use by applications. For application consumption, use the get anomaly detection - job statistics API. + for use by applications. For application consumption, use the /_ml/anomaly_detectors + endpoints. ``_ @@ -887,7 +1236,7 @@ async def ml_trained_models( model_id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -897,34 +1246,92 @@ async def ml_trained_models( t.Union[ t.Sequence[ t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ] ], t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ] ], t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ], ] ] = None, @@ -932,10 +1339,10 @@ async def ml_trained_models( v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about inference trained models. IMPORTANT: - cat APIs are only intended for human consumption using the Kibana console or - command line. They are not intended for use by applications. For application - consumption, use the get trained models statistics API. + Get trained models. Returns configuration and usage information about inference + trained models. CAT APIs are only intended for human consumption using the Kibana + console or command line. They are not intended for use by applications. For application + consumption, use the /_ml/trained_models endpoints. ``_ @@ -1028,48 +1435,182 @@ async def transforms( t.Union[ t.Sequence[ t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ] ], t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ] ], t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ], ] ] = None, size: t.Optional[int] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about transforms. IMPORTANT: cat - APIs are only intended for human consumption using the Kibana console or command - line. They are not intended for use by applications. For application consumption, - use the get transform statistics API. + Get transforms. Returns configuration and usage information about transforms. + CAT APIs are only intended for human consumption using the Kibana console or + command line. They are not intended for use by applications. For application + consumption, use the /_transform endpoints. ``_ diff --git a/elasticsearch_serverless/_async/client/cluster.py b/elasticsearch_serverless/_async/client/cluster.py index 1b77504..815dad6 100644 --- a/elasticsearch_serverless/_async/client/cluster.py +++ b/elasticsearch_serverless/_async/client/cluster.py @@ -33,15 +33,14 @@ async def delete_component_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes component templates. Component templates are building blocks for constructing - index templates that specify index mappings, settings, and aliases. + Delete component templates. Deletes component templates. Component templates + are building blocks for constructing index templates that specify index mappings, + settings, and aliases. ``_ @@ -89,13 +88,12 @@ async def exists_component_template( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Returns information about whether a particular component template exist + Check component templates. Returns information about whether a particular component + template exists. ``_ @@ -146,13 +144,11 @@ async def get_component_template( human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about component templates. + Get component templates. Retrieves information about component templates. ``_ @@ -208,12 +204,10 @@ async def info( target: t.Union[ t.Sequence[ t.Union[ - "t.Literal['_all', 'http', 'ingest', 'script', 'thread_pool']", str + str, t.Literal["_all", "http", "ingest", "script", "thread_pool"] ] ], - t.Union[ - "t.Literal['_all', 'http', 'ingest', 'script', 'thread_pool']", str - ], + t.Union[str, t.Literal["_all", "http", "ingest", "script", "thread_pool"]], ], error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -221,7 +215,7 @@ async def info( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns different information about the cluster. + Get cluster info. Returns basic information about the cluster. ``_ @@ -265,26 +259,25 @@ async def put_component_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, version: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates or updates a component template. Component templates are building blocks - for constructing index templates that specify index mappings, settings, and aliases. - An index template can be composed of multiple component templates. To use a component - template, specify it in an index template’s `composed_of` list. Component templates - are only applied to new data streams and indices as part of a matching index - template. Settings and mappings specified directly in the index template or the - create index request override any settings or mappings specified in a component - template. Component templates are only used during index creation. For data streams, - this includes data stream creation and the creation of a stream’s backing indices. - Changes to component templates do not affect existing indices, including a stream’s - backing indices. You can use C-style `/* *\\/` block comments in component templates. + Create or update a component template. Creates or updates a component template. + Component templates are building blocks for constructing index templates that + specify index mappings, settings, and aliases. An index template can be composed + of multiple component templates. To use a component template, specify it in an + index template’s `composed_of` list. Component templates are only applied to + new data streams and indices as part of a matching index template. Settings and + mappings specified directly in the index template or the create index request + override any settings or mappings specified in a component template. Component + templates are only used during index creation. For data streams, this includes + data stream creation and the creation of a stream’s backing indices. Changes + to component templates do not affect existing indices, including a stream’s backing + indices. You can use C-style `/* *\\/` block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket. diff --git a/elasticsearch_serverless/_async/client/enrich.py b/elasticsearch_serverless/_async/client/enrich.py index 63c7e8e..6663826 100644 --- a/elasticsearch_serverless/_async/client/enrich.py +++ b/elasticsearch_serverless/_async/client/enrich.py @@ -36,7 +36,7 @@ async def delete_policy( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing enrich policy and its enrich index. + Delete an enrich policy. Deletes an existing enrich policy and its enrich index. ``_ @@ -121,7 +121,7 @@ async def get_policy( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about an enrich policy. + Get an enrich policy. Returns information about an enrich policy. ``_ @@ -171,7 +171,7 @@ async def put_policy( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates an enrich policy. + Create an enrich policy. Creates an enrich policy. ``_ @@ -224,8 +224,8 @@ async def stats( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns enrich coordinator statistics and information about enrich policies that - are currently executing. + Get enrich stats. Returns enrich coordinator statistics and information about + enrich policies that are currently executing. ``_ """ diff --git a/elasticsearch_serverless/_async/client/eql.py b/elasticsearch_serverless/_async/client/eql.py index 8e032a2..3944130 100644 --- a/elasticsearch_serverless/_async/client/eql.py +++ b/elasticsearch_serverless/_async/client/eql.py @@ -76,10 +76,10 @@ async def get( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -194,9 +194,9 @@ async def search( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, fetch_size: t.Optional[int] = None, @@ -209,16 +209,16 @@ async def search( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - result_position: t.Optional[t.Union["t.Literal['head', 'tail']", str]] = None, + result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, size: t.Optional[int] = None, tiebreaker_field: t.Optional[str] = None, timestamp_field: t.Optional[str] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_async/client/esql.py b/elasticsearch_serverless/_async/client/esql.py deleted file mode 100644 index 9973903..0000000 --- a/elasticsearch_serverless/_async/client/esql.py +++ /dev/null @@ -1,107 +0,0 @@ -# Licensed to Elasticsearch B.V. under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch B.V. licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import typing as t - -from elastic_transport import ObjectApiResponse - -from ._base import NamespacedClient -from .utils import _rewrite_parameters - - -class EsqlClient(NamespacedClient): - - @_rewrite_parameters( - body_fields=("query", "columnar", "filter", "locale", "params"), - ignore_deprecated_options={"params"}, - ) - async def query( - self, - *, - query: t.Optional[str] = None, - columnar: t.Optional[bool] = None, - delimiter: t.Optional[str] = None, - error_trace: t.Optional[bool] = None, - filter: t.Optional[t.Mapping[str, t.Any]] = None, - filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - format: t.Optional[str] = None, - human: t.Optional[bool] = None, - locale: t.Optional[str] = None, - params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None, - pretty: t.Optional[bool] = None, - body: t.Optional[t.Dict[str, t.Any]] = None, - ) -> ObjectApiResponse[t.Any]: - """ - Executes an ES|QL request - - ``_ - - :param query: The ES|QL query API accepts an ES|QL query string in the query - parameter, runs it, and returns the results. - :param columnar: By default, ES|QL returns results as rows. For example, FROM - returns each individual document as one row. For the JSON, YAML, CBOR and - smile formats, ES|QL can return the results in a columnar fashion where one - row represents all the values of a certain column in the results. - :param delimiter: The character to use between values within a CSV row. Only - valid for the CSV format. - :param filter: Specify a Query DSL query in the filter parameter to filter the - set of documents that an ES|QL query runs on. - :param format: A short version of the Accept header, e.g. json, yaml. - :param locale: - :param params: To avoid any attempts of hacking or code injection, extract the - values in a separate list of parameters. Use question mark placeholders (?) - in the query string for each of the parameters. - """ - if query is None and body is None: - raise ValueError("Empty value passed for parameter 'query'") - __path_parts: t.Dict[str, str] = {} - __path = "/_query" - __query: t.Dict[str, t.Any] = {} - __body: t.Dict[str, t.Any] = body if body is not None else {} - if delimiter is not None: - __query["delimiter"] = delimiter - if error_trace is not None: - __query["error_trace"] = error_trace - if filter_path is not None: - __query["filter_path"] = filter_path - if format is not None: - __query["format"] = format - if human is not None: - __query["human"] = human - if pretty is not None: - __query["pretty"] = pretty - if not __body: - if query is not None: - __body["query"] = query - if columnar is not None: - __body["columnar"] = columnar - if filter is not None: - __body["filter"] = filter - if locale is not None: - __body["locale"] = locale - if params is not None: - __body["params"] = params - __headers = {"accept": "application/json", "content-type": "application/json"} - return await self.perform_request( # type: ignore[return-value] - "POST", - __path, - params=__query, - headers=__headers, - body=__body, - endpoint_id="esql.query", - path_parts=__path_parts, - ) diff --git a/elasticsearch_serverless/_async/client/graph.py b/elasticsearch_serverless/_async/client/graph.py index 998b990..963428a 100644 --- a/elasticsearch_serverless/_async/client/graph.py +++ b/elasticsearch_serverless/_async/client/graph.py @@ -40,7 +40,7 @@ async def explore( pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, vertices: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_async/client/indices.py b/elasticsearch_serverless/_async/client/indices.py index c372441..a2766ae 100644 --- a/elasticsearch_serverless/_async/client/indices.py +++ b/elasticsearch_serverless/_async/client/indices.py @@ -30,28 +30,27 @@ async def add_block( self, *, index: str, - block: t.Union["t.Literal['metadata', 'read', 'read_only', 'write']", str], + block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]], allow_no_indices: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a block to an index. + Add an index block. Limits the operations allowed on an index by blocking specific + operation types. ``_ @@ -226,19 +225,17 @@ async def create( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a new index. + Create an index. Creates a new index. ``_ @@ -309,8 +306,8 @@ async def create_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a data stream. You must have a matching index template with data stream - enabled. + Create a data stream. Creates a data stream. You must have a matching index template + with data stream enabled. ``_ @@ -352,9 +349,9 @@ async def data_streams_stats( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -362,7 +359,7 @@ async def data_streams_stats( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves statistics for one or more data streams. + Get data stream stats. Retrieves statistics for one or more data streams. ``_ @@ -410,22 +407,20 @@ async def delete( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes one or more indices. + Delete indices. Deletes one or more indices. ``_ @@ -490,14 +485,12 @@ async def delete_alias( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes a data stream or index from an alias. + Delete an alias. Removes a data stream or index from an alias. ``_ @@ -549,22 +542,20 @@ async def delete_data_lifecycle( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes the data lifecycle from a data stream rendering it not managed by the - data stream lifecycle + Delete data stream lifecycles. Removes the data stream lifecycle from a data + stream, rendering it not managed by the data stream lifecycle. ``_ @@ -613,9 +604,9 @@ async def delete_data_stream( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -623,7 +614,7 @@ async def delete_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes one or more data streams and their backing indices. + Delete data streams. Deletes one or more data streams and their backing indices. ``_ @@ -665,11 +656,9 @@ async def delete_index_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Delete an index template. The provided may contain multiple @@ -724,9 +713,9 @@ async def exists( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -738,7 +727,8 @@ async def exists( pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Checks if a data stream, index, or alias exists. + Check indices. Checks if one or more indices, index aliases, or data streams + exist. ``_ @@ -804,9 +794,9 @@ async def exists_alias( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -816,7 +806,7 @@ async def exists_alias( pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Checks if an alias exists. + Check aliases. Checks if one or more data stream or index aliases exist. ``_ @@ -882,9 +872,7 @@ async def exists_index_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ @@ -932,14 +920,14 @@ async def explain_data_lifecycle( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about the index's current data stream lifecycle, such as - any potential encountered error, time since creation etc. + Get the status for a data stream lifecycle. Retrieves information about an index + or data stream’s current data stream lifecycle status, such as time since index + creation, time since rollover, the lifecycle configuration managing the index, + or any errors encountered during lifecycle execution. ``_ @@ -985,17 +973,15 @@ async def get( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, features: t.Optional[ t.Union[ - t.Sequence[ - t.Union["t.Literal['aliases', 'mappings', 'settings']", str] - ], - t.Union["t.Literal['aliases', 'mappings', 'settings']", str], + t.Sequence[t.Union[str, t.Literal["aliases", "mappings", "settings"]]], + t.Union[str, t.Literal["aliases", "mappings", "settings"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1004,14 +990,12 @@ async def get( ignore_unavailable: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about one or more indices. For data streams, the API returns - information about the stream’s backing indices. + Get index information. Returns information about one or more indices. For data + streams, the API returns information about the stream’s backing indices. ``_ @@ -1088,9 +1072,9 @@ async def get_alias( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1100,7 +1084,7 @@ async def get_alias( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for one or more aliases. + Get aliases. Retrieves information for one or more data stream or index aliases. ``_ @@ -1170,9 +1154,9 @@ async def get_data_lifecycle( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1181,7 +1165,8 @@ async def get_data_lifecycle( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves the data stream lifecycle configuration of one or more data streams. + Get data stream lifecycles. Retrieves the data stream lifecycle configuration + of one or more data streams. ``_ @@ -1229,9 +1214,9 @@ async def get_data_stream( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1240,7 +1225,7 @@ async def get_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about one or more data streams. + Get data streams. Retrieves information about one or more data streams. ``_ @@ -1293,9 +1278,7 @@ async def get_index_template( human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -1359,23 +1342,21 @@ async def get_mapping( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves mapping definitions for one or more indices. For data streams, the - API retrieves mappings for the stream’s backing indices. + Get mapping definitions. Retrieves mapping definitions for one or more indices. + For data streams, the API retrieves mappings for the stream’s backing indices. ``_ @@ -1444,9 +1425,9 @@ async def get_settings( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1455,14 +1436,12 @@ async def get_settings( ignore_unavailable: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns setting information for one or more indices. For data streams, returns - setting information for the stream’s backing indices. + Get index settings. Returns setting information for one or more indices. For + data streams, returns setting information for the stream’s backing indices. ``_ @@ -1546,14 +1525,14 @@ async def migrate_to_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Converts an index alias to a data stream. You must have a matching index template - that is data stream enabled. The alias must meet the following criteria: The - alias must have a write index; All indices for the alias must have a `@timestamp` - field mapping of a `date` or `date_nanos` field type; The alias must not have - any filters; The alias must not use custom routing. If successful, the request - removes the alias and creates a data stream with the same name. The indices for - the alias become hidden backing indices for the stream. The write index for the - alias becomes the write index for the stream. + Convert an index alias to a data stream. Converts an index alias to a data stream. + You must have a matching index template that is data stream enabled. The alias + must meet the following criteria: The alias must have a write index; All indices + for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` + field type; The alias must not have any filters; The alias must not use custom + routing. If successful, the request removes the alias and creates a data stream + with the same name. The indices for the alias become hidden backing indices for + the stream. The write index for the alias becomes the write index for the stream. ``_ @@ -1596,7 +1575,8 @@ async def modify_data_stream( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Performs one or more data stream modification actions in a single atomic operation. + Update data streams. Performs one or more data stream modification actions in + a single atomic operation. ``_ @@ -1650,17 +1630,15 @@ async def put_alias( human: t.Optional[bool] = None, index_routing: t.Optional[str] = None, is_write_index: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, routing: t.Optional[str] = None, search_routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a data stream or index to an alias. + Create or update an alias. Adds a data stream or index to an alias. ``_ @@ -1743,30 +1721,27 @@ async def put_data_lifecycle( self, *, name: t.Union[str, t.Sequence[str]], - data_retention: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, downsampling: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Update the data lifecycle of the specified data streams. + Update data stream lifecycles. Update the data stream lifecycle of the specified + data streams. ``_ @@ -1858,9 +1833,7 @@ async def put_index_template( human: t.Optional[bool] = None, ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, priority: t.Optional[int] = None, @@ -1994,7 +1967,7 @@ async def put_mapping( allow_no_indices: t.Optional[bool] = None, date_detection: t.Optional[bool] = None, dynamic: t.Optional[ - t.Union["t.Literal['false', 'runtime', 'strict', 'true']", str] + t.Union[str, t.Literal["false", "runtime", "strict", "true"]] ] = None, dynamic_date_formats: t.Optional[t.Sequence[str]] = None, dynamic_templates: t.Optional[ @@ -2007,18 +1980,16 @@ async def put_mapping( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, field_names: t.Optional[t.Mapping[str, t.Any]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, numeric_detection: t.Optional[bool] = None, pretty: t.Optional[bool] = None, @@ -2026,14 +1997,14 @@ async def put_mapping( routing: t.Optional[t.Mapping[str, t.Any]] = None, runtime: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, write_index_only: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds new fields to an existing data stream or index. You can also use this API - to change the search settings of existing fields. For data streams, these changes - are applied to all backing indices by default. + Update field mappings. Adds new fields to an existing data stream or index. You + can also use this API to change the search settings of existing fields. For data + streams, these changes are applied to all backing indices by default. ``_ @@ -2147,25 +2118,23 @@ async def put_settings( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, flat_settings: t.Optional[bool] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, preserve_existing: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Changes a dynamic index setting in real time. For data streams, index setting - changes are applied to all backing indices by default. + Update index settings. Changes dynamic index settings in real time. For data + streams, index setting changes are applied to all backing indices by default. ``_ @@ -2261,9 +2230,7 @@ async def put_template( human: t.Optional[bool] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, order: t.Optional[int] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -2349,9 +2316,9 @@ async def refresh( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2360,9 +2327,9 @@ async def refresh( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - A refresh makes recent operations performed on one or more indices available - for search. For data streams, the API runs the refresh operation on the stream’s - backing indices. + Refresh an index. A refresh makes recent operations performed on one or more + indices available for search. For data streams, the API runs the refresh operation + on the stream’s backing indices. ``_ @@ -2420,9 +2387,9 @@ async def resolve_index( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2483,19 +2450,17 @@ async def rollover( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a new index for a data stream or index alias. + Roll over to a new index. Creates a new index for a data stream or index alias. ``_ @@ -2587,9 +2552,7 @@ async def simulate_index_template( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -2662,9 +2625,7 @@ async def simulate_template( ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None, include_defaults: t.Optional[bool] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, priority: t.Optional[int] = None, @@ -2793,15 +2754,13 @@ async def update_aliases( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a data stream or index to an alias. + Create or update an alias. Adds a data stream or index to an alias. ``_ @@ -2853,15 +2812,15 @@ async def validate_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -2876,7 +2835,7 @@ async def validate_query( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Validates a potentially expensive query without executing it. + Validate a query. Validates a query without running it. ``_ diff --git a/elasticsearch_serverless/_async/client/inference.py b/elasticsearch_serverless/_async/client/inference.py index 89df532..b7fd1b7 100644 --- a/elasticsearch_serverless/_async/client/inference.py +++ b/elasticsearch_serverless/_async/client/inference.py @@ -32,8 +32,8 @@ async def delete( inference_id: str, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, dry_run: t.Optional[bool] = None, @@ -98,8 +98,8 @@ async def get( *, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, inference_id: t.Optional[str] = None, @@ -158,8 +158,8 @@ async def inference( input: t.Optional[t.Union[str, t.Sequence[str]]] = None, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, error_trace: t.Optional[bool] = None, @@ -168,7 +168,7 @@ async def inference( pretty: t.Optional[bool] = None, query: t.Optional[str] = None, task_settings: t.Optional[t.Any] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -245,8 +245,8 @@ async def put( body: t.Optional[t.Mapping[str, t.Any]] = None, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, error_trace: t.Optional[bool] = None, diff --git a/elasticsearch_serverless/_async/client/ingest.py b/elasticsearch_serverless/_async/client/ingest.py index a795bf0..97611e6 100644 --- a/elasticsearch_serverless/_async/client/ingest.py +++ b/elasticsearch_serverless/_async/client/ingest.py @@ -33,11 +33,9 @@ async def delete_pipeline( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Deletes one or more existing ingest pipeline. @@ -87,9 +85,7 @@ async def get_pipeline( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, summary: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -187,14 +183,12 @@ async def put_pipeline( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, if_version: t.Optional[int] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, on_failure: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, pretty: t.Optional[bool] = None, processors: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_async/client/license.py b/elasticsearch_serverless/_async/client/license.py index cadc727..70bb65c 100644 --- a/elasticsearch_serverless/_async/client/license.py +++ b/elasticsearch_serverless/_async/client/license.py @@ -37,9 +37,9 @@ async def get( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - This API returns information about the type of license, when it was issued, and - when it expires, for example. For more information about the different types - of licenses, see https://www.elastic.co/subscriptions. + Get license information. Returns information about your Elastic license, including + its type, its status, when it was issued, and when it expires. For more information + about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions). ``_ diff --git a/elasticsearch_serverless/_async/client/ml.py b/elasticsearch_serverless/_async/client/ml.py index a2eb508..8b5ffd5 100644 --- a/elasticsearch_serverless/_async/client/ml.py +++ b/elasticsearch_serverless/_async/client/ml.py @@ -38,11 +38,11 @@ async def close_job( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Close anomaly detection jobs A job can be opened and closed multiple times throughout + Close anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating @@ -115,7 +115,8 @@ async def delete_calendar( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes all scheduled events from a calendar, then deletes it. + Delete a calendar. Removes all scheduled events from a calendar, then deletes + it. ``_ @@ -156,7 +157,7 @@ async def delete_calendar_event( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes scheduled events from a calendar. + Delete events from a calendar. ``_ @@ -204,7 +205,7 @@ async def delete_calendar_job( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes anomaly detection jobs from a calendar. + Delete anomaly jobs from a calendar. ``_ @@ -250,10 +251,10 @@ async def delete_data_frame_analytics( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a data frame analytics job. + Delete a data frame analytics job. ``_ @@ -301,7 +302,7 @@ async def delete_datafeed( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing datafeed. + Delete a datafeed. ``_ @@ -348,7 +349,7 @@ async def delete_filter( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a filter. If an anomaly detection job references the filter, you cannot + Delete a filter. If an anomaly detection job references the filter, you cannot delete the filter. You must update or delete the job before you can delete the filter. @@ -393,7 +394,7 @@ async def delete_job( wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an anomaly detection job. All job configuration, model state and results + Delete an anomaly detection job. All job configuration, model state and results are deleted. It is not currently possible to delete multiple jobs using wildcards or a comma separated list. If you delete a job that has a datafeed, the request first tries to delete the datafeed. This behavior is equivalent to calling the @@ -452,8 +453,8 @@ async def delete_trained_model( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing trained inference model that is currently not referenced - by an ingest pipeline. + Delete an unreferenced trained model. The request deletes a trained inference + model that is not referenced by an ingest pipeline. ``_ @@ -498,9 +499,9 @@ async def delete_trained_model_alias( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a trained model alias. This API deletes an existing model alias that - refers to a trained model. If the model alias is missing or refers to a model - other than the one identified by the `model_id`, this API returns an error. + Delete a trained model alias. This API deletes an existing model alias that refers + to a trained model. If the model alias is missing or refers to a model other + than the one identified by the `model_id`, this API returns an error. ``_ @@ -555,9 +556,9 @@ async def estimate_model_memory( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Makes an estimation of the memory usage for an anomaly detection job model. It - is based on analysis configuration details for the job and cardinality estimates - for the fields it references. + Estimate job model memory usage. Makes an estimation of the memory usage for + an anomaly detection job model. It is based on analysis configuration details + for the job and cardinality estimates for the fields it references. ``_ @@ -622,10 +623,10 @@ async def evaluate_data_frame( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Evaluates the data frame analytics for an annotated index. The API packages together - commonly used evaluation metrics for various types of machine learning features. - This has been designed for use on indexes created by data frame analytics. Evaluation - requires both a ground truth field and an analytics result field to be present. + Evaluate data frame analytics. The API packages together commonly used evaluation + metrics for various types of machine learning features. This has been designed + for use on indexes created by data frame analytics. Evaluation requires both + a ground truth field and an analytics result field to be present. ``_ @@ -1341,7 +1342,7 @@ async def get_overall_buckets( *, job_id: str, allow_no_match: t.Optional[bool] = None, - bucket_span: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + bucket_span: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, end: t.Optional[t.Union[str, t.Any]] = None, error_trace: t.Optional[bool] = None, exclude_interim: t.Optional[bool] = None, @@ -1447,8 +1448,14 @@ async def get_trained_models( human: t.Optional[bool] = None, include: t.Optional[ t.Union[ - "t.Literal['definition', 'definition_status', 'feature_importance_baseline', 'hyperparameters', 'total_feature_importance']", str, + t.Literal[ + "definition", + "definition_status", + "feature_importance_baseline", + "hyperparameters", + "total_feature_importance", + ], ] ] = None, pretty: t.Optional[bool] = None, @@ -1599,7 +1606,7 @@ async def infer_trained_model( human: t.Optional[bool] = None, inference_config: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -1661,16 +1668,16 @@ async def open_job( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Opens one or more anomaly detection jobs. An anomaly detection job must be opened - in order for it to be ready to receive and analyze data. It can be opened and - closed multiple times throughout its lifecycle. When you open a new job, it starts - with an empty model. When you open an existing job, the most recent model state - is automatically loaded. The job is ready to resume its analysis from where it - left off, once new data is received. + Open anomaly detection jobs. An anomaly detection job must be opened in order + for it to be ready to receive and analyze data. It can be opened and closed multiple + times throughout its lifecycle. When you open a new job, it starts with an empty + model. When you open an existing job, the most recent model state is automatically + loaded. The job is ready to resume its analysis from where it left off, once + new data is received. ``_ @@ -2195,13 +2202,13 @@ async def put_datafeed( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, headers: t.Optional[t.Mapping[str, t.Union[str, t.Sequence[str]]]] = None, human: t.Optional[bool] = None, ignore_throttled: t.Optional[bool] = None, @@ -2213,7 +2220,7 @@ async def put_datafeed( max_empty_searches: t.Optional[int] = None, pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, - query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + query_delay: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, scroll_size: t.Optional[int] = None, @@ -2452,7 +2459,7 @@ async def put_job( allow_lazy_open: t.Optional[bool] = None, analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None, background_persist_interval: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, custom_settings: t.Optional[t.Any] = None, daily_model_snapshot_retention_after_days: t.Optional[int] = None, @@ -2471,8 +2478,8 @@ async def put_job( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Instantiates an anomaly detection job. If you include a `datafeed_config`, you - must have read index privileges on the source index. + Create an anomaly detection job. If you include a `datafeed_config`, you must + have read index privileges on the source index. ``_ @@ -2642,7 +2649,7 @@ async def put_trained_model( metadata: t.Optional[t.Any] = None, model_size_bytes: t.Optional[int] = None, model_type: t.Optional[ - t.Union["t.Literal['lang_ident', 'pytorch', 'tree_ensemble']", str] + t.Union[str, t.Literal["lang_ident", "pytorch", "tree_ensemble"]] ] = None, platform_architecture: t.Optional[str] = None, prefix_strings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -3008,7 +3015,7 @@ async def start_data_frame_analytics( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Starts a data frame analytics job. A data frame analytics job can be started @@ -3068,7 +3075,7 @@ async def start_datafeed( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, start: t.Optional[t.Union[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3142,12 +3149,12 @@ async def start_trained_model_deployment( human: t.Optional[bool] = None, number_of_allocations: t.Optional[int] = None, pretty: t.Optional[bool] = None, - priority: t.Optional[t.Union["t.Literal['low', 'normal']", str]] = None, + priority: t.Optional[t.Union[str, t.Literal["low", "normal"]]] = None, queue_capacity: t.Optional[int] = None, threads_per_allocation: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for: t.Optional[ - t.Union["t.Literal['fully_allocated', 'started', 'starting']", str] + t.Union[str, t.Literal["fully_allocated", "started", "starting"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3232,7 +3239,7 @@ async def stop_data_frame_analytics( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Stops one or more data frame analytics jobs. A data frame analytics job can be @@ -3297,7 +3304,7 @@ async def stop_datafeed( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3514,13 +3521,13 @@ async def update_datafeed( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, ignore_throttled: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, @@ -3531,7 +3538,7 @@ async def update_datafeed( max_empty_searches: t.Optional[int] = None, pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, - query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + query_delay: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, scroll_size: t.Optional[int] = None, @@ -3772,7 +3779,7 @@ async def update_job( allow_lazy_open: t.Optional[bool] = None, analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None, background_persist_interval: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, categorization_filters: t.Optional[t.Sequence[str]] = None, custom_settings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -3785,7 +3792,7 @@ async def update_job( human: t.Optional[bool] = None, model_plot_config: t.Optional[t.Mapping[str, t.Any]] = None, model_prune_window: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, model_snapshot_retention_days: t.Optional[int] = None, per_partition_categorization: t.Optional[t.Mapping[str, t.Any]] = None, diff --git a/elasticsearch_serverless/_async/client/query_rules.py b/elasticsearch_serverless/_async/client/query_rules.py index 203313e..f371704 100644 --- a/elasticsearch_serverless/_async/client/query_rules.py +++ b/elasticsearch_serverless/_async/client/query_rules.py @@ -251,7 +251,7 @@ async def list_rulesets( ) @_rewrite_parameters( - body_fields=("actions", "criteria", "type"), + body_fields=("actions", "criteria", "type", "priority"), ) async def put_rule( self, @@ -259,12 +259,15 @@ async def put_rule( ruleset_id: str, rule_id: str, actions: t.Optional[t.Mapping[str, t.Any]] = None, - criteria: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, - type: t.Optional[t.Union["t.Literal['pinned']", str]] = None, + criteria: t.Optional[ + t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] + ] = None, + type: t.Optional[t.Union[str, t.Literal["pinned"]]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, + priority: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -279,6 +282,7 @@ async def put_rule( :param actions: :param criteria: :param type: + :param priority: """ if ruleset_id in SKIP_IN_PATH: raise ValueError("Empty value passed for parameter 'ruleset_id'") @@ -312,6 +316,8 @@ async def put_rule( __body["criteria"] = criteria if type is not None: __body["type"] = type + if priority is not None: + __body["priority"] = priority __headers = {"accept": "application/json", "content-type": "application/json"} return await self.perform_request( # type: ignore[return-value] "PUT", @@ -330,7 +336,9 @@ async def put_ruleset( self, *, ruleset_id: str, - rules: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, + rules: t.Optional[ + t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] + ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, diff --git a/elasticsearch_serverless/_async/client/security.py b/elasticsearch_serverless/_async/client/security.py index 9291e6c..761dc6a 100644 --- a/elasticsearch_serverless/_async/client/security.py +++ b/elasticsearch_serverless/_async/client/security.py @@ -35,12 +35,12 @@ async def authenticate( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Enables you to submit a request with a basic auth header to authenticate a user - and retrieve information about the authenticated user. A successful call returns - a JSON structure that shows user information such as their username, the roles - that are assigned to the user, any assigned metadata, and information about the - realms that authenticated and authorized the user. If the user cannot be authenticated, - this API returns a 401 status code. + Authenticate a user. Authenticates a user and returns information about the authenticated + user. Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication). + A successful call returns a JSON structure that shows user information such as + their username, the roles that are assigned to the user, any assigned metadata, + and information about the realms that authenticated and authorized the user. + If the user cannot be authenticated, this API returns a 401 status code. ``_ """ @@ -72,24 +72,24 @@ async def create_api_key( self, *, error_trace: t.Optional[bool] = None, - expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, metadata: t.Optional[t.Mapping[str, t.Any]] = None, name: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, role_descriptors: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates an API key for access without requiring basic authentication. A successful - request returns a JSON structure that contains the API key, its unique id, and - its name. If applicable, it also returns expiration information for the API key - in milliseconds. NOTE: By default, API keys never expire. You can specify expiration - information when you create the API keys. + Create an API key. Creates an API key for access without requiring basic authentication. + A successful request returns a JSON structure that contains the API key, its + unique id, and its name. If applicable, it also returns expiration information + for the API key in milliseconds. NOTE: By default, API keys never expire. You + can specify expiration information when you create the API keys. ``_ @@ -163,10 +163,11 @@ async def get_api_key( with_profile_uid: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for one or more API keys. NOTE: If you have only the `manage_own_api_key` - privilege, this API returns only the API keys that you own. If you have `read_security`, - `manage_api_key` or greater privileges (including `manage_security`), this API - returns all API keys regardless of ownership. + Get API key information. Retrieves information for one or more API keys. NOTE: + If you have only the `manage_own_api_key` privilege, this API returns only the + API keys that you own. If you have `read_security`, `manage_api_key` or greater + privileges (including `manage_security`), this API returns all API keys regardless + of ownership. ``_ @@ -241,8 +242,67 @@ async def has_privileges( cluster: t.Optional[ t.Sequence[ t.Union[ - "t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_data_stream_global_retention', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_data_stream_global_retention', 'monitor_enrich', 'monitor_inference', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_connector_secrets', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']", str, + t.Literal[ + "all", + "cancel_task", + "create_snapshot", + "cross_cluster_replication", + "cross_cluster_search", + "delegate_pki", + "grant_api_key", + "manage", + "manage_api_key", + "manage_autoscaling", + "manage_behavioral_analytics", + "manage_ccr", + "manage_data_frame_transforms", + "manage_data_stream_global_retention", + "manage_enrich", + "manage_ilm", + "manage_index_templates", + "manage_inference", + "manage_ingest_pipelines", + "manage_logstash_pipelines", + "manage_ml", + "manage_oidc", + "manage_own_api_key", + "manage_pipeline", + "manage_rollup", + "manage_saml", + "manage_search_application", + "manage_search_query_rules", + "manage_search_synonyms", + "manage_security", + "manage_service_account", + "manage_slm", + "manage_token", + "manage_transform", + "manage_user_profile", + "manage_watcher", + "monitor", + "monitor_data_frame_transforms", + "monitor_data_stream_global_retention", + "monitor_enrich", + "monitor_inference", + "monitor_ml", + "monitor_rollup", + "monitor_snapshot", + "monitor_text_structure", + "monitor_transform", + "monitor_watcher", + "none", + "post_behavioral_analytics_event", + "read_ccr", + "read_fleet_secrets", + "read_ilm", + "read_pipeline", + "read_security", + "read_slm", + "transport_client", + "write_connector_secrets", + "write_fleet_secrets", + ], ] ] ] = None, @@ -254,7 +314,8 @@ async def has_privileges( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Determines whether the specified user has a specified list of privileges. + Check user privileges. Determines whether the specified user has a specified + list of privileges. ``_ @@ -317,13 +378,13 @@ async def invalidate_api_key( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Invalidates one or more API keys. The `manage_api_key` privilege allows deleting - any API keys. The `manage_own_api_key` only allows deleting API keys that are - owned by the user. In addition, with the `manage_own_api_key` privilege, an invalidation - request must be issued in one of the three formats: - Set the parameter `owner=true`. - - Or, set both `username` and `realm_name` to match the user’s identity. - Or, - if the request is issued by an API key, i.e. an API key invalidates itself, specify - its ID in the `ids` field. + Invalidate API keys. Invalidates one or more API keys. The `manage_api_key` privilege + allows deleting any API keys. The `manage_own_api_key` only allows deleting API + keys that are owned by the user. In addition, with the `manage_own_api_key` privilege, + an invalidation request must be issued in one of the three formats: - Set the + parameter `owner=true`. - Or, set both `username` and `realm_name` to match the + user’s identity. - Or, if the request is issued by an API key, i.e. an API key + invalidates itself, specify its ID in the `ids` field. ``_ @@ -416,8 +477,8 @@ async def query_api_keys( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for API keys in a paginated manner. You can optionally - filter the results with a query. + Query API keys. Retrieves a paginated list of API keys and their information. + You can optionally filter the results with a query. ``_ @@ -525,7 +586,7 @@ async def update_api_key( *, id: str, error_trace: t.Optional[bool] = None, - expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, metadata: t.Optional[t.Mapping[str, t.Any]] = None, @@ -534,22 +595,22 @@ async def update_api_key( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates attributes of an existing API key. Users can only update API keys that - they created or that were granted to them. Use this API to update API keys created - by the create API Key or grant API Key APIs. If you need to apply the same update - to many API keys, you can use bulk update API Keys to reduce overhead. It’s not - possible to update expired API keys, or API keys that have been invalidated by - invalidate API Key. This API supports updates to an API key’s access scope and - metadata. The access scope of an API key is derived from the `role_descriptors` - you specify in the request, and a snapshot of the owner user’s permissions at - the time of the request. The snapshot of the owner’s permissions is updated automatically - on every call. If you don’t specify `role_descriptors` in the request, a call - to this API might still change the API key’s access scope. This change can occur - if the owner user’s permissions have changed since the API key was created or - last modified. To update another user’s API key, use the `run_as` feature to - submit a request on behalf of another user. IMPORTANT: It’s not possible to use - an API key as the authentication credential for this API. To update an API key, - the owner user’s credentials are required. + Update an API key. Updates attributes of an existing API key. Users can only + update API keys that they created or that were granted to them. Use this API + to update API keys created by the create API Key or grant API Key APIs. If you + need to apply the same update to many API keys, you can use bulk update API Keys + to reduce overhead. It’s not possible to update expired API keys, or API keys + that have been invalidated by invalidate API Key. This API supports updates to + an API key’s access scope and metadata. The access scope of an API key is derived + from the `role_descriptors` you specify in the request, and a snapshot of the + owner user’s permissions at the time of the request. The snapshot of the owner’s + permissions is updated automatically on every call. If you don’t specify `role_descriptors` + in the request, a call to this API might still change the API key’s access scope. + This change can occur if the owner user’s permissions have changed since the + API key was created or last modified. To update another user’s API key, use the + `run_as` feature to submit a request on behalf of another user. IMPORTANT: It’s + not possible to use an API key as the authentication credential for this API. + To update an API key, the owner user’s credentials are required. ``_ diff --git a/elasticsearch_serverless/_async/client/sql.py b/elasticsearch_serverless/_async/client/sql.py index 9dc219c..c089ed4 100644 --- a/elasticsearch_serverless/_async/client/sql.py +++ b/elasticsearch_serverless/_async/client/sql.py @@ -124,10 +124,10 @@ async def get_async( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -254,19 +254,17 @@ async def query( format: t.Optional[str] = None, human: t.Optional[bool] = None, index_using_frozen: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, - page_timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + page_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, params: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, query: t.Optional[str] = None, - request_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + request_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, time_zone: t.Optional[str] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_async/client/tasks.py b/elasticsearch_serverless/_async/client/tasks.py index 9306a84..cb85eec 100644 --- a/elasticsearch_serverless/_async/client/tasks.py +++ b/elasticsearch_serverless/_async/client/tasks.py @@ -34,11 +34,12 @@ async def get( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about a task. + Get task information. Returns information about the tasks currently executing + in the cluster. ``_ diff --git a/elasticsearch_serverless/_async/client/transform.py b/elasticsearch_serverless/_async/client/transform.py index faa6557..eebc2b3 100644 --- a/elasticsearch_serverless/_async/client/transform.py +++ b/elasticsearch_serverless/_async/client/transform.py @@ -36,10 +36,10 @@ async def delete_transform( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a transform. + Delete a transform. Deletes a transform. ``_ @@ -99,7 +99,7 @@ async def get_transform( size: t.Optional[int] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves configuration information for transforms. + Get transforms. Retrieves configuration information for transforms. ``_ @@ -165,10 +165,10 @@ async def get_transform_stats( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, size: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves usage information for transforms. + Get transform stats. Retrieves usage information for transforms. ``_ @@ -236,7 +236,7 @@ async def preview_transform( dest: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, latest: t.Optional[t.Mapping[str, t.Any]] = None, pivot: t.Optional[t.Mapping[str, t.Any]] = None, @@ -245,14 +245,16 @@ async def preview_transform( settings: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Previews a transform. It returns a maximum of 100 results. The calculations are - based on all the current data in the source index. It also generates a list of - mappings and settings for the destination index. These values are determined - based on the field types of the source index and the transform aggregations. + Preview a transform. Generates a preview of the results that you will get when + you create a transform with the same configuration. It returns a maximum of 100 + results. The calculations are based on all the current data in the source index. + It also generates a list of mappings and settings for the destination index. + These values are determined based on the field types of the source index and + the transform aggregations. ``_ @@ -356,7 +358,7 @@ async def put_transform( description: t.Optional[str] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, latest: t.Optional[t.Mapping[str, t.Any]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, @@ -365,30 +367,31 @@ async def put_transform( retention_policy: t.Optional[t.Mapping[str, t.Any]] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a transform. A transform copies data from source indices, transforms - it, and persists it into an entity-centric destination index. You can also think - of the destination index as a two-dimensional tabular data structure (known as - a data frame). The ID for each document in the data frame is generated from a - hash of the entity, so there is a unique row per entity. You must choose either - the latest or pivot method for your transform; you cannot use both in a single - transform. If you choose to use the pivot method for your transform, the entities - are defined by the set of `group_by` fields in the pivot object. If you choose - to use the latest method, the entities are defined by the `unique_key` field - values in the latest object. You must have `create_index`, `index`, and `read` - privileges on the destination index and `read` and `view_index_metadata` privileges - on the source indices. When Elasticsearch security features are enabled, the - transform remembers which roles the user that created it had at the time of creation - and uses those same roles. If those roles do not have the required privileges - on the source and destination indices, the transform fails when it attempts unauthorized - operations. NOTE: You must use Kibana or this API to create a transform. Do not - add a transform directly into any `.transform-internal*` indices using the Elasticsearch - index API. If Elasticsearch security features are enabled, do not give users - any privileges on `.transform-internal*` indices. If you used transforms prior - to 7.5, also do not give users any privileges on `.data-frame-internal*` indices. + Create a transform. Creates a transform. A transform copies data from source + indices, transforms it, and persists it into an entity-centric destination index. + You can also think of the destination index as a two-dimensional tabular data + structure (known as a data frame). The ID for each document in the data frame + is generated from a hash of the entity, so there is a unique row per entity. + You must choose either the latest or pivot method for your transform; you cannot + use both in a single transform. If you choose to use the pivot method for your + transform, the entities are defined by the set of `group_by` fields in the pivot + object. If you choose to use the latest method, the entities are defined by the + `unique_key` field values in the latest object. You must have `create_index`, + `index`, and `read` privileges on the destination index and `read` and `view_index_metadata` + privileges on the source indices. When Elasticsearch security features are enabled, + the transform remembers which roles the user that created it had at the time + of creation and uses those same roles. If those roles do not have the required + privileges on the source and destination indices, the transform fails when it + attempts unauthorized operations. NOTE: You must use Kibana or this API to create + a transform. Do not add a transform directly into any `.transform-internal*` + indices using the Elasticsearch index API. If Elasticsearch security features + are enabled, do not give users any privileges on `.transform-internal*` indices. + If you used transforms prior to 7.5, also do not give users any privileges on + `.data-frame-internal*` indices. ``_ @@ -488,9 +491,9 @@ async def reset_transform( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Resets a transform. Before you can reset it, you must stop it; alternatively, - use the `force` query parameter. If the destination index was created by the - transform, it is deleted. + Reset a transform. Resets a transform. Before you can reset it, you must stop + it; alternatively, use the `force` query parameter. If the destination index + was created by the transform, it is deleted. ``_ @@ -535,13 +538,14 @@ async def schedule_now_transform( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Schedules now a transform. If you _schedule_now a transform, it will process - the new data instantly, without waiting for the configured frequency interval. - After _schedule_now API is called, the transform will be processed again at now - + frequency unless _schedule_now API is called again in the meantime. + Schedule a transform to start now. Instantly runs a transform to process data. + If you _schedule_now a transform, it will process the new data instantly, without + waiting for the configured frequency interval. After _schedule_now API is called, + the transform will be processed again at now + frequency unless _schedule_now + API is called again in the meantime. ``_ @@ -585,26 +589,27 @@ async def start_transform( from_: t.Optional[str] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Starts a transform. When you start a transform, it creates the destination index - if it does not already exist. The `number_of_shards` is set to `1` and the `auto_expand_replicas` - is set to `0-1`. If it is a pivot transform, it deduces the mapping definitions - for the destination index from the source indices and the transform aggregations. - If fields in the destination index are derived from scripts (as in the case of - `scripted_metric` or `bucket_script` aggregations), the transform uses dynamic - mappings unless an index template exists. If it is a latest transform, it does - not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings, - create the destination index before you start the transform. Alternatively, you - can create an index template, though it does not affect the deduced mappings - in a pivot transform. When the transform starts, a series of validations occur - to ensure its success. If you deferred validation when you created the transform, - they occur when you start the transform—​with the exception of privilege checks. - When Elasticsearch security features are enabled, the transform remembers which - roles the user that created it had at the time of creation and uses those same - roles. If those roles do not have the required privileges on the source and destination - indices, the transform fails when it attempts unauthorized operations. + Start a transform. Starts a transform. When you start a transform, it creates + the destination index if it does not already exist. The `number_of_shards` is + set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, + it deduces the mapping definitions for the destination index from the source + indices and the transform aggregations. If fields in the destination index are + derived from scripts (as in the case of `scripted_metric` or `bucket_script` + aggregations), the transform uses dynamic mappings unless an index template exists. + If it is a latest transform, it does not deduce mapping definitions; it uses + dynamic mappings. To use explicit mappings, create the destination index before + you start the transform. Alternatively, you can create an index template, though + it does not affect the deduced mappings in a pivot transform. When the transform + starts, a series of validations occur to ensure its success. If you deferred + validation when you created the transform, they occur when you start the transform—​with + the exception of privilege checks. When Elasticsearch security features are enabled, + the transform remembers which roles the user that created it had at the time + of creation and uses those same roles. If those roles do not have the required + privileges on the source and destination indices, the transform fails when it + attempts unauthorized operations. ``_ @@ -653,12 +658,12 @@ async def stop_transform( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_checkpoint: t.Optional[bool] = None, wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Stops one or more transforms. + Stop transforms. Stops one or more transforms. ``_ @@ -739,7 +744,7 @@ async def update_transform( dest: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, @@ -747,17 +752,18 @@ async def update_transform( settings: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates certain properties of a transform. All updated properties except `description` - do not take effect until after the transform starts the next checkpoint, thus - there is data consistency in each checkpoint. To use this API, you must have - `read` and `view_index_metadata` privileges for the source indices. You must - also have `index` and `read` privileges for the destination index. When Elasticsearch - security features are enabled, the transform remembers which roles the user who - updated it had at the time of update and runs with those privileges. + Update a transform. Updates certain properties of a transform. All updated properties + except `description` do not take effect until after the transform starts the + next checkpoint, thus there is data consistency in each checkpoint. To use this + API, you must have `read` and `view_index_metadata` privileges for the source + indices. You must also have `index` and `read` privileges for the destination + index. When Elasticsearch security features are enabled, the transform remembers + which roles the user who updated it had at the time of update and runs with those + privileges. ``_ diff --git a/elasticsearch_serverless/_sync/client/__init__.py b/elasticsearch_serverless/_sync/client/__init__.py index 916fa5e..7f6f22c 100644 --- a/elasticsearch_serverless/_sync/client/__init__.py +++ b/elasticsearch_serverless/_sync/client/__init__.py @@ -453,21 +453,22 @@ def bulk( pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, routing: t.Optional[str] = None, source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Performs multiple indexing or delete operations in a single API call. This reduces - overhead and can greatly increase indexing speed. + Bulk index or delete documents. Performs multiple indexing or delete operations + in a single API call. This reduces overhead and can greatly increase indexing + speed. ``_ @@ -664,15 +665,15 @@ def count( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -810,22 +811,22 @@ def create( pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a JSON document to the specified data stream or index and makes it searchable. - If the target is an index and the document already exists, the request updates - the document and increments its version. + Index a document. Adds a JSON document to the specified data stream or index + and makes it searchable. If the target is an index and the document already exists, + the request updates the document and increments its version. ``_ @@ -916,20 +917,20 @@ def delete( if_seq_no: t.Optional[int] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes a JSON document from the specified index. + Delete a document. Removes a JSON document from the specified index. ``_ @@ -1005,16 +1006,16 @@ def delete_by_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1031,29 +1032,27 @@ def delete_by_query( request_cache: t.Optional[bool] = None, requests_per_second: t.Optional[float] = None, routing: t.Optional[str] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, scroll_size: t.Optional[int] = None, - search_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, slice: t.Optional[t.Mapping[str, t.Any]] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, sort: t.Optional[t.Sequence[str]] = None, stats: t.Optional[t.Sequence[str]] = None, terminate_after: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[bool] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes documents that match the specified query. + Delete documents. Deletes documents that match the specified query. ``_ @@ -1227,14 +1226,12 @@ def delete_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a stored script or search template. + Delete a script or search template. Deletes a stored script or search template. ``_ @@ -1298,11 +1295,11 @@ def exists( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> HeadApiResponse: """ - Checks if a document in an index exists. + Check a document. Checks if a specified document exists. ``_ @@ -1399,11 +1396,11 @@ def exists_source( source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> HeadApiResponse: """ - Checks if a document's `_source` is stored. + Check for a document source. Checks if a document's `_source` is stored. ``_ @@ -1485,7 +1482,7 @@ def explain( id: str, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1503,8 +1500,8 @@ def explain( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about why a specific document matches (or doesn’t match) - a query. + Explain a document match result. Returns information about why a specific document + matches, or doesn’t match, a query. ``_ @@ -1604,9 +1601,9 @@ def field_caps( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1738,11 +1735,12 @@ def get( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns a document. + Get a document by its ID. Retrieves the document with the specified ID from an + index. ``_ @@ -1827,13 +1825,11 @@ def get_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves a stored script or search template. + Get a script or search template. Retrieves a stored script or search template. ``_ @@ -1891,11 +1887,11 @@ def get_source( stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns the source of a document. + Get a document's source. Returns the source of a document. ``_ @@ -1979,27 +1975,27 @@ def index( human: t.Optional[bool] = None, if_primary_term: t.Optional[int] = None, if_seq_no: t.Optional[int] = None, - op_type: t.Optional[t.Union["t.Literal['create', 'index']", str]] = None, + op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None, pipeline: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a JSON document to the specified data stream or index and makes it searchable. - If the target is an index and the document already exists, the request updates - the document and increments its version. + Index a document. Adds a JSON document to the specified data stream or index + and makes it searchable. If the target is an index and the document already exists, + the request updates the document and increments its version. ``_ @@ -2108,7 +2104,7 @@ def info( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns basic information about the cluster. + Get cluster info. Returns basic information about the cluster. ``_ """ @@ -2262,9 +2258,9 @@ def msearch( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2278,7 +2274,7 @@ def msearch( rest_total_hits_as_int: t.Optional[bool] = None, routing: t.Optional[str] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, typed_keys: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -2401,7 +2397,7 @@ def msearch_template( pretty: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, typed_keys: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -2496,7 +2492,7 @@ def mtermvectors( term_statistics: t.Optional[bool] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: @@ -2590,14 +2586,14 @@ def open_point_in_time( self, *, index: t.Union[str, t.Sequence[str]], - keep_alive: t.Union["t.Literal[-1]", "t.Literal[0]", str], + keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]], error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2678,15 +2674,14 @@ def put_script( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates or updates a stored script or search template. + Create or update a script or search template. Creates or updates a stored script + or search template. ``_ @@ -2757,9 +2752,9 @@ def rank_eval( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2845,7 +2840,7 @@ def reindex( *, dest: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, @@ -2855,20 +2850,20 @@ def reindex( requests_per_second: t.Optional[float] = None, require_alias: t.Optional[bool] = None, script: t.Optional[t.Mapping[str, t.Any]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, size: t.Optional[int] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Allows to copy documents from one index to another, optionally filtering the - source documents by a query, changing the destination index settings, or fetching - the documents from a remote cluster. + Reindex documents. Copies documents from a source to a destination. The source + can be any existing index, alias, or data stream. The destination must differ + from the source. For example, you cannot reindex a data stream into itself. ``_ @@ -3038,7 +3033,7 @@ def scripts_painless_execute( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Runs a script and returns a result. + Run a script. Runs a script and returns a result. ``_ @@ -3092,7 +3087,7 @@ def scroll( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3200,16 +3195,16 @@ def search( batched_reduce_size: t.Optional[int] = None, ccs_minimize_roundtrips: t.Optional[bool] = None, collapse: t.Optional[t.Mapping[str, t.Any]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -3248,12 +3243,12 @@ def search( routing: t.Optional[str] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_after: t.Optional[ t.Sequence[t.Union[None, bool, float, int, str, t.Any]] ] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, seq_no_primary_term: t.Optional[bool] = None, size: t.Optional[int] = None, @@ -3272,7 +3267,7 @@ def search( suggest: t.Optional[t.Mapping[str, t.Any]] = None, suggest_field: t.Optional[str] = None, suggest_mode: t.Optional[ - t.Union["t.Literal['always', 'missing', 'popular']", str] + t.Union[str, t.Literal["always", "missing", "popular"]] ] = None, suggest_size: t.Optional[int] = None, suggest_text: t.Optional[str] = None, @@ -3687,10 +3682,10 @@ def search_mvt( extent: t.Optional[int] = None, fields: t.Optional[t.Union[str, t.Sequence[str]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - grid_agg: t.Optional[t.Union["t.Literal['geohex', 'geotile']", str]] = None, + grid_agg: t.Optional[t.Union[str, t.Literal["geohex", "geotile"]]] = None, grid_precision: t.Optional[int] = None, grid_type: t.Optional[ - t.Union["t.Literal['centroid', 'grid', 'point']", str] + t.Union[str, t.Literal["centroid", "grid", "point"]] ] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, @@ -3708,8 +3703,7 @@ def search_mvt( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> BinaryApiResponse: """ - Searches a vector tile for geospatial values. Returns results as a binary Mapbox - vector tile. + Search a vector tile. Searches a vector tile for geospatial values. ``_ @@ -3853,9 +3847,9 @@ def search_template( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -3870,9 +3864,9 @@ def search_template( profile: t.Optional[bool] = None, rest_total_hits_as_int: t.Optional[bool] = None, routing: t.Optional[str] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, source: t.Optional[str] = None, typed_keys: t.Optional[bool] = None, @@ -4007,7 +4001,7 @@ def terms_enum( search_after: t.Optional[str] = None, size: t.Optional[int] = None, string: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -4106,13 +4100,13 @@ def termvectors( term_statistics: t.Optional[bool] = None, version: t.Optional[int] = None, version_type: t.Optional[ - t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str] + t.Union[str, t.Literal["external", "external_gte", "force", "internal"]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information and statistics about terms in the fields of a particular - document. + Get term vector information. Returns information and statistics about terms in + the fields of a particular document. ``_ @@ -4236,7 +4230,7 @@ def update( lang: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, require_alias: t.Optional[bool] = None, retry_on_conflict: t.Optional[int] = None, @@ -4246,15 +4240,16 @@ def update( source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, upsert: t.Optional[t.Mapping[str, t.Any]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates a document with a script or partial document. + Update a document. Updates a document by running a script or passing a partial + document. ``_ @@ -4369,16 +4364,16 @@ def update_by_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -4396,32 +4391,30 @@ def update_by_query( requests_per_second: t.Optional[float] = None, routing: t.Optional[str] = None, script: t.Optional[t.Mapping[str, t.Any]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, scroll_size: t.Optional[int] = None, - search_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, slice: t.Optional[t.Mapping[str, t.Any]] = None, - slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None, + slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None, sort: t.Optional[t.Sequence[str]] = None, stats: t.Optional[t.Sequence[str]] = None, terminate_after: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[bool] = None, version_type: t.Optional[bool] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, wait_for_completion: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates documents that match the specified query. If no query is specified, performs - an update on every document in the data stream or index without modifying the - source, which is useful for picking up mapping changes. + Update documents. Updates documents that match the specified query. If no query + is specified, performs an update on every document in the data stream or index + without modifying the source, which is useful for picking up mapping changes. ``_ diff --git a/elasticsearch_serverless/_sync/client/async_search.py b/elasticsearch_serverless/_sync/client/async_search.py index 8f53c40..8fbf318 100644 --- a/elasticsearch_serverless/_sync/client/async_search.py +++ b/elasticsearch_serverless/_sync/client/async_search.py @@ -77,11 +77,11 @@ def get( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, typed_keys: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -236,16 +236,16 @@ def submit( batched_reduce_size: t.Optional[int] = None, ccs_minimize_roundtrips: t.Optional[bool] = None, collapse: t.Optional[t.Mapping[str, t.Any]] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -258,7 +258,7 @@ def submit( ignore_throttled: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, knn: t.Optional[ t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] @@ -283,12 +283,12 @@ def submit( routing: t.Optional[str] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, - scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, search_after: t.Optional[ t.Sequence[t.Union[None, bool, float, int, str, t.Any]] ] = None, search_type: t.Optional[ - t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str] + t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]] ] = None, seq_no_primary_term: t.Optional[bool] = None, size: t.Optional[int] = None, @@ -307,7 +307,7 @@ def submit( suggest: t.Optional[t.Mapping[str, t.Any]] = None, suggest_field: t.Optional[str] = None, suggest_mode: t.Optional[ - t.Union["t.Literal['always', 'missing', 'popular']", str] + t.Union[str, t.Literal["always", "missing", "popular"]] ] = None, suggest_size: t.Optional[int] = None, suggest_text: t.Optional[str] = None, @@ -318,7 +318,7 @@ def submit( typed_keys: t.Optional[bool] = None, version: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_sync/client/cat.py b/elasticsearch_serverless/_sync/client/cat.py index 5c55a17..be3c1a3 100644 --- a/elasticsearch_serverless/_sync/client/cat.py +++ b/elasticsearch_serverless/_sync/client/cat.py @@ -34,9 +34,9 @@ def aliases( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -45,19 +45,17 @@ def aliases( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Retrieves the cluster’s index aliases, including filter and routing information. - The API does not return data stream aliases. IMPORTANT: cat APIs are only intended + Get aliases. Retrieves the cluster’s index aliases, including filter and routing + information. The API does not return data stream aliases. CAT APIs are only intended for human consumption using the command line or the Kibana console. They are - not intended for use by applications. For application consumption, use the aliases - API. + not intended for use by applications. For application consumption, use the /_alias + endpoints. ``_ @@ -134,19 +132,18 @@ def component_templates( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns information about component templates in a cluster. Component templates - are building blocks for constructing index templates that specify index mappings, - settings, and aliases. IMPORTANT: cat APIs are only intended for human consumption - using the command line or Kibana console. They are not intended for use by applications. - For application consumption, use the get component template API. + Get component templates. Returns information about component templates in a cluster. + Component templates are building blocks for constructing index templates that + specify index mappings, settings, and aliases. CAT APIs are only intended for + human consumption using the command line or Kibana console. They are not intended + for use by applications. For application consumption, use the /_component_template + endpoints. ``_ @@ -219,20 +216,18 @@ def count( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Provides quick access to a document count for a data stream, an index, or an - entire cluster. NOTE: The document count only includes live documents, not deleted - documents which have not yet been removed by the merge process. IMPORTANT: cat + Get a document count. Provides quick access to a document count for a data stream, + an index, or an entire cluster.n/ The document count only includes live documents, + not deleted documents which have not yet been removed by the merge process. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, - use the count API. + use /_count endpoints. ``_ @@ -305,15 +300,13 @@ def help( help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, v: t.Optional[bool] = None, ) -> TextApiResponse: """ - Returns help for the Cat APIs. + Get CAT help. Returns help for the CAT APIs. ``_ @@ -373,47 +366,45 @@ def indices( *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, h: t.Optional[t.Union[str, t.Sequence[str]]] = None, - health: t.Optional[t.Union["t.Literal['green', 'red', 'yellow']", str]] = None, + health: t.Optional[t.Union[str, t.Literal["green", "red", "yellow"]]] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, include_unloaded_segments: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, pri: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns high-level information about indices in a cluster, including backing - indices for data streams. IMPORTANT: cat APIs are only intended for human consumption - using the command line or Kibana console. They are not intended for use by applications. - For application consumption, use the get index API. Use the cat indices API to - get the following information for each index in a cluster: shard count; document - count; deleted document count; primary store size; total store size of all shards, - including shard replicas. These metrics are retrieved directly from Lucene, which - Elasticsearch uses internally to power indexing and search. As a result, all - document counts include hidden nested documents. To get an accurate count of - Elasticsearch documents, use the cat count or count APIs. + Get index information. Returns high-level information about indices in a cluster, + including backing indices for data streams. Use this request to get the following + information for each index in a cluster: - shard count - document count - deleted + document count - primary store size - total store size of all shards, including + shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch + uses internally to power indexing and search. As a result, all document counts + include hidden nested documents. To get an accurate count of Elasticsearch documents, + use the /_cat/count or _count endpoints. CAT APIs are only intended for human + consumption using the command line or Kibana console. They are not intended for + use by applications. For application consumption, use an index endpoint. ``_ @@ -502,7 +493,7 @@ def ml_data_frame_analytics( id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -511,45 +502,111 @@ def ml_data_frame_analytics( t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'create_time', 'description', 'dest_index', 'failure_reason', 'id', 'model_memory_limit', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'progress', 'source_index', 'state', 'type', 'version']", str, + t.Literal[ + "assignment_explanation", + "create_time", + "description", + "dest_index", + "failure_reason", + "id", + "model_memory_limit", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "progress", + "source_index", + "state", + "type", + "version", + ], ], ] ] = None, - time: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + time: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about data frame analytics jobs. - IMPORTANT: cat APIs are only intended for human consumption using the Kibana - console or command line. They are not intended for use by applications. For application - consumption, use the get data frame analytics jobs statistics API. + Get data frame analytics jobs. Returns configuration and usage information about + data frame analytics jobs. CAT APIs are only intended for human consumption using + the Kibana console or command line. They are not intended for use by applications. + For application consumption, use the /_ml/data_frame/analytics endpoints. ``_ @@ -631,49 +688,99 @@ def ml_datafeeds( t.Union[ t.Sequence[ t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ] ], t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ] ], t.Union[ - "t.Literal['ae', 'bc', 'id', 'na', 'ne', 'ni', 'nn', 's', 'sba', 'sc', 'seah', 'st']", str, + t.Literal[ + "ae", + "bc", + "id", + "na", + "ne", + "ni", + "nn", + "s", + "sba", + "sc", + "seah", + "st", + ], ], ] ] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about datafeeds. This API returns - a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, - you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges - to use this API. IMPORTANT: cat APIs are only intended for human consumption + Get datafeeds. Returns configuration and usage information about datafeeds. This + API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features + are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` + cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. - For application consumption, use the get datafeed statistics API. + For application consumption, use the /_ml/datafeeds endpoints. ``_ @@ -752,7 +859,7 @@ def ml_jobs( job_id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -761,50 +868,292 @@ def ml_jobs( t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ] ], t.Union[ - "t.Literal['assignment_explanation', 'buckets.count', 'buckets.time.exp_avg', 'buckets.time.exp_avg_hour', 'buckets.time.max', 'buckets.time.min', 'buckets.time.total', 'data.buckets', 'data.earliest_record', 'data.empty_buckets', 'data.input_bytes', 'data.input_fields', 'data.input_records', 'data.invalid_dates', 'data.last', 'data.last_empty_bucket', 'data.last_sparse_bucket', 'data.latest_record', 'data.missing_fields', 'data.out_of_order_timestamps', 'data.processed_fields', 'data.processed_records', 'data.sparse_buckets', 'forecasts.memory.avg', 'forecasts.memory.max', 'forecasts.memory.min', 'forecasts.memory.total', 'forecasts.records.avg', 'forecasts.records.max', 'forecasts.records.min', 'forecasts.records.total', 'forecasts.time.avg', 'forecasts.time.max', 'forecasts.time.min', 'forecasts.time.total', 'forecasts.total', 'id', 'model.bucket_allocation_failures', 'model.by_fields', 'model.bytes', 'model.bytes_exceeded', 'model.categorization_status', 'model.categorized_doc_count', 'model.dead_category_count', 'model.failed_category_count', 'model.frequent_category_count', 'model.log_time', 'model.memory_limit', 'model.memory_status', 'model.over_fields', 'model.partition_fields', 'model.rare_category_count', 'model.timestamp', 'model.total_category_count', 'node.address', 'node.ephemeral_id', 'node.id', 'node.name', 'opened_time', 'state']", str, + t.Literal[ + "assignment_explanation", + "buckets.count", + "buckets.time.exp_avg", + "buckets.time.exp_avg_hour", + "buckets.time.max", + "buckets.time.min", + "buckets.time.total", + "data.buckets", + "data.earliest_record", + "data.empty_buckets", + "data.input_bytes", + "data.input_fields", + "data.input_records", + "data.invalid_dates", + "data.last", + "data.last_empty_bucket", + "data.last_sparse_bucket", + "data.latest_record", + "data.missing_fields", + "data.out_of_order_timestamps", + "data.processed_fields", + "data.processed_records", + "data.sparse_buckets", + "forecasts.memory.avg", + "forecasts.memory.max", + "forecasts.memory.min", + "forecasts.memory.total", + "forecasts.records.avg", + "forecasts.records.max", + "forecasts.records.min", + "forecasts.records.total", + "forecasts.time.avg", + "forecasts.time.max", + "forecasts.time.min", + "forecasts.time.total", + "forecasts.total", + "id", + "model.bucket_allocation_failures", + "model.by_fields", + "model.bytes", + "model.bytes_exceeded", + "model.categorization_status", + "model.categorized_doc_count", + "model.dead_category_count", + "model.failed_category_count", + "model.frequent_category_count", + "model.log_time", + "model.memory_limit", + "model.memory_status", + "model.over_fields", + "model.partition_fields", + "model.rare_category_count", + "model.timestamp", + "model.total_category_count", + "node.address", + "node.ephemeral_id", + "node.id", + "node.name", + "opened_time", + "state", + ], ], ] ] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information for anomaly detection jobs. This - API returns a maximum of 10,000 jobs. If the Elasticsearch security features - are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` - cluster privileges to use this API. IMPORTANT: cat APIs are only intended for + Get anomaly detection jobs. Returns configuration and usage information for anomaly + detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch + security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, + or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended - for use by applications. For application consumption, use the get anomaly detection - job statistics API. + for use by applications. For application consumption, use the /_ml/anomaly_detectors + endpoints. ``_ @@ -887,7 +1236,7 @@ def ml_trained_models( model_id: t.Optional[str] = None, allow_no_match: t.Optional[bool] = None, bytes: t.Optional[ - t.Union["t.Literal['b', 'gb', 'kb', 'mb', 'pb', 'tb']", str] + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -897,34 +1246,92 @@ def ml_trained_models( t.Union[ t.Sequence[ t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ] ], t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ] ], t.Union[ - "t.Literal['create_time', 'created_by', 'data_frame_analytics_id', 'description', 'heap_size', 'id', 'ingest.count', 'ingest.current', 'ingest.failed', 'ingest.pipelines', 'ingest.time', 'license', 'operations', 'version']", str, + t.Literal[ + "create_time", + "created_by", + "data_frame_analytics_id", + "description", + "heap_size", + "id", + "ingest.count", + "ingest.current", + "ingest.failed", + "ingest.pipelines", + "ingest.time", + "license", + "operations", + "version", + ], ], ] ] = None, @@ -932,10 +1339,10 @@ def ml_trained_models( v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about inference trained models. IMPORTANT: - cat APIs are only intended for human consumption using the Kibana console or - command line. They are not intended for use by applications. For application - consumption, use the get trained models statistics API. + Get trained models. Returns configuration and usage information about inference + trained models. CAT APIs are only intended for human consumption using the Kibana + console or command line. They are not intended for use by applications. For application + consumption, use the /_ml/trained_models endpoints. ``_ @@ -1028,48 +1435,182 @@ def transforms( t.Union[ t.Sequence[ t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ] ], t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ], ] ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, s: t.Optional[ t.Union[ t.Sequence[ t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ] ], t.Union[ - "t.Literal['changes_last_detection_time', 'checkpoint', 'checkpoint_duration_time_exp_avg', 'checkpoint_progress', 'create_time', 'delete_time', 'description', 'dest_index', 'docs_per_second', 'documents_deleted', 'documents_indexed', 'documents_processed', 'frequency', 'id', 'index_failure', 'index_time', 'index_total', 'indexed_documents_exp_avg', 'last_search_time', 'max_page_search_size', 'pages_processed', 'pipeline', 'processed_documents_exp_avg', 'processing_time', 'reason', 'search_failure', 'search_time', 'search_total', 'source_index', 'state', 'transform_type', 'trigger_count', 'version']", str, + t.Literal[ + "changes_last_detection_time", + "checkpoint", + "checkpoint_duration_time_exp_avg", + "checkpoint_progress", + "create_time", + "delete_time", + "description", + "dest_index", + "docs_per_second", + "documents_deleted", + "documents_indexed", + "documents_processed", + "frequency", + "id", + "index_failure", + "index_time", + "index_total", + "indexed_documents_exp_avg", + "last_search_time", + "max_page_search_size", + "pages_processed", + "pipeline", + "processed_documents_exp_avg", + "processing_time", + "reason", + "search_failure", + "search_time", + "search_total", + "source_index", + "state", + "transform_type", + "trigger_count", + "version", + ], ], ] ] = None, size: t.Optional[int] = None, time: t.Optional[ - t.Union["t.Literal['d', 'h', 'm', 'micros', 'ms', 'nanos', 's']", str] + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ - Returns configuration and usage information about transforms. IMPORTANT: cat - APIs are only intended for human consumption using the Kibana console or command - line. They are not intended for use by applications. For application consumption, - use the get transform statistics API. + Get transforms. Returns configuration and usage information about transforms. + CAT APIs are only intended for human consumption using the Kibana console or + command line. They are not intended for use by applications. For application + consumption, use the /_transform endpoints. ``_ diff --git a/elasticsearch_serverless/_sync/client/cluster.py b/elasticsearch_serverless/_sync/client/cluster.py index b9ccbf3..400f290 100644 --- a/elasticsearch_serverless/_sync/client/cluster.py +++ b/elasticsearch_serverless/_sync/client/cluster.py @@ -33,15 +33,14 @@ def delete_component_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes component templates. Component templates are building blocks for constructing - index templates that specify index mappings, settings, and aliases. + Delete component templates. Deletes component templates. Component templates + are building blocks for constructing index templates that specify index mappings, + settings, and aliases. ``_ @@ -89,13 +88,12 @@ def exists_component_template( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Returns information about whether a particular component template exist + Check component templates. Returns information about whether a particular component + template exists. ``_ @@ -146,13 +144,11 @@ def get_component_template( human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about component templates. + Get component templates. Retrieves information about component templates. ``_ @@ -208,12 +204,10 @@ def info( target: t.Union[ t.Sequence[ t.Union[ - "t.Literal['_all', 'http', 'ingest', 'script', 'thread_pool']", str + str, t.Literal["_all", "http", "ingest", "script", "thread_pool"] ] ], - t.Union[ - "t.Literal['_all', 'http', 'ingest', 'script', 'thread_pool']", str - ], + t.Union[str, t.Literal["_all", "http", "ingest", "script", "thread_pool"]], ], error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -221,7 +215,7 @@ def info( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns different information about the cluster. + Get cluster info. Returns basic information about the cluster. ``_ @@ -265,26 +259,25 @@ def put_component_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, version: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates or updates a component template. Component templates are building blocks - for constructing index templates that specify index mappings, settings, and aliases. - An index template can be composed of multiple component templates. To use a component - template, specify it in an index template’s `composed_of` list. Component templates - are only applied to new data streams and indices as part of a matching index - template. Settings and mappings specified directly in the index template or the - create index request override any settings or mappings specified in a component - template. Component templates are only used during index creation. For data streams, - this includes data stream creation and the creation of a stream’s backing indices. - Changes to component templates do not affect existing indices, including a stream’s - backing indices. You can use C-style `/* *\\/` block comments in component templates. + Create or update a component template. Creates or updates a component template. + Component templates are building blocks for constructing index templates that + specify index mappings, settings, and aliases. An index template can be composed + of multiple component templates. To use a component template, specify it in an + index template’s `composed_of` list. Component templates are only applied to + new data streams and indices as part of a matching index template. Settings and + mappings specified directly in the index template or the create index request + override any settings or mappings specified in a component template. Component + templates are only used during index creation. For data streams, this includes + data stream creation and the creation of a stream’s backing indices. Changes + to component templates do not affect existing indices, including a stream’s backing + indices. You can use C-style `/* *\\/` block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket. diff --git a/elasticsearch_serverless/_sync/client/enrich.py b/elasticsearch_serverless/_sync/client/enrich.py index c6bf5f2..6a855c4 100644 --- a/elasticsearch_serverless/_sync/client/enrich.py +++ b/elasticsearch_serverless/_sync/client/enrich.py @@ -36,7 +36,7 @@ def delete_policy( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing enrich policy and its enrich index. + Delete an enrich policy. Deletes an existing enrich policy and its enrich index. ``_ @@ -121,7 +121,7 @@ def get_policy( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about an enrich policy. + Get an enrich policy. Returns information about an enrich policy. ``_ @@ -171,7 +171,7 @@ def put_policy( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates an enrich policy. + Create an enrich policy. Creates an enrich policy. ``_ @@ -224,8 +224,8 @@ def stats( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns enrich coordinator statistics and information about enrich policies that - are currently executing. + Get enrich stats. Returns enrich coordinator statistics and information about + enrich policies that are currently executing. ``_ """ diff --git a/elasticsearch_serverless/_sync/client/eql.py b/elasticsearch_serverless/_sync/client/eql.py index 4c57f43..ce3e515 100644 --- a/elasticsearch_serverless/_sync/client/eql.py +++ b/elasticsearch_serverless/_sync/client/eql.py @@ -76,10 +76,10 @@ def get( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -194,9 +194,9 @@ def search( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, fetch_size: t.Optional[int] = None, @@ -209,16 +209,16 @@ def search( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - result_position: t.Optional[t.Union["t.Literal['head', 'tail']", str]] = None, + result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, size: t.Optional[int] = None, tiebreaker_field: t.Optional[str] = None, timestamp_field: t.Optional[str] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_sync/client/graph.py b/elasticsearch_serverless/_sync/client/graph.py index 45f4965..f411f32 100644 --- a/elasticsearch_serverless/_sync/client/graph.py +++ b/elasticsearch_serverless/_sync/client/graph.py @@ -40,7 +40,7 @@ def explore( pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, vertices: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_sync/client/indices.py b/elasticsearch_serverless/_sync/client/indices.py index 30ee227..e7ff2f2 100644 --- a/elasticsearch_serverless/_sync/client/indices.py +++ b/elasticsearch_serverless/_sync/client/indices.py @@ -30,28 +30,27 @@ def add_block( self, *, index: str, - block: t.Union["t.Literal['metadata', 'read', 'read_only', 'write']", str], + block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]], allow_no_indices: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a block to an index. + Add an index block. Limits the operations allowed on an index by blocking specific + operation types. ``_ @@ -226,19 +225,17 @@ def create( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a new index. + Create an index. Creates a new index. ``_ @@ -309,8 +306,8 @@ def create_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a data stream. You must have a matching index template with data stream - enabled. + Create a data stream. Creates a data stream. You must have a matching index template + with data stream enabled. ``_ @@ -352,9 +349,9 @@ def data_streams_stats( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -362,7 +359,7 @@ def data_streams_stats( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves statistics for one or more data streams. + Get data stream stats. Retrieves statistics for one or more data streams. ``_ @@ -410,22 +407,20 @@ def delete( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes one or more indices. + Delete indices. Deletes one or more indices. ``_ @@ -490,14 +485,12 @@ def delete_alias( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes a data stream or index from an alias. + Delete an alias. Removes a data stream or index from an alias. ``_ @@ -549,22 +542,20 @@ def delete_data_lifecycle( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes the data lifecycle from a data stream rendering it not managed by the - data stream lifecycle + Delete data stream lifecycles. Removes the data stream lifecycle from a data + stream, rendering it not managed by the data stream lifecycle. ``_ @@ -613,9 +604,9 @@ def delete_data_stream( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -623,7 +614,7 @@ def delete_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes one or more data streams and their backing indices. + Delete data streams. Deletes one or more data streams and their backing indices. ``_ @@ -665,11 +656,9 @@ def delete_index_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Delete an index template. The provided may contain multiple @@ -724,9 +713,9 @@ def exists( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -738,7 +727,8 @@ def exists( pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Checks if a data stream, index, or alias exists. + Check indices. Checks if one or more indices, index aliases, or data streams + exist. ``_ @@ -804,9 +794,9 @@ def exists_alias( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -816,7 +806,7 @@ def exists_alias( pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ - Checks if an alias exists. + Check aliases. Checks if one or more data stream or index aliases exist. ``_ @@ -882,9 +872,7 @@ def exists_index_template( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> HeadApiResponse: """ @@ -932,14 +920,14 @@ def explain_data_lifecycle( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about the index's current data stream lifecycle, such as - any potential encountered error, time since creation etc. + Get the status for a data stream lifecycle. Retrieves information about an index + or data stream’s current data stream lifecycle status, such as time since index + creation, time since rollover, the lifecycle configuration managing the index, + or any errors encountered during lifecycle execution. ``_ @@ -985,17 +973,15 @@ def get( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, features: t.Optional[ t.Union[ - t.Sequence[ - t.Union["t.Literal['aliases', 'mappings', 'settings']", str] - ], - t.Union["t.Literal['aliases', 'mappings', 'settings']", str], + t.Sequence[t.Union[str, t.Literal["aliases", "mappings", "settings"]]], + t.Union[str, t.Literal["aliases", "mappings", "settings"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1004,14 +990,12 @@ def get( ignore_unavailable: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about one or more indices. For data streams, the API returns - information about the stream’s backing indices. + Get index information. Returns information about one or more indices. For data + streams, the API returns information about the stream’s backing indices. ``_ @@ -1088,9 +1072,9 @@ def get_alias( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1100,7 +1084,7 @@ def get_alias( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for one or more aliases. + Get aliases. Retrieves information for one or more data stream or index aliases. ``_ @@ -1170,9 +1154,9 @@ def get_data_lifecycle( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1181,7 +1165,8 @@ def get_data_lifecycle( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves the data stream lifecycle configuration of one or more data streams. + Get data stream lifecycles. Retrieves the data stream lifecycle configuration + of one or more data streams. ``_ @@ -1229,9 +1214,9 @@ def get_data_stream( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1240,7 +1225,7 @@ def get_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information about one or more data streams. + Get data streams. Retrieves information about one or more data streams. ``_ @@ -1293,9 +1278,7 @@ def get_index_template( human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -1359,23 +1342,21 @@ def get_mapping( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves mapping definitions for one or more indices. For data streams, the - API retrieves mappings for the stream’s backing indices. + Get mapping definitions. Retrieves mapping definitions for one or more indices. + For data streams, the API retrieves mappings for the stream’s backing indices. ``_ @@ -1444,9 +1425,9 @@ def get_settings( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -1455,14 +1436,12 @@ def get_settings( ignore_unavailable: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, local: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns setting information for one or more indices. For data streams, returns - setting information for the stream’s backing indices. + Get index settings. Returns setting information for one or more indices. For + data streams, returns setting information for the stream’s backing indices. ``_ @@ -1546,14 +1525,14 @@ def migrate_to_data_stream( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Converts an index alias to a data stream. You must have a matching index template - that is data stream enabled. The alias must meet the following criteria: The - alias must have a write index; All indices for the alias must have a `@timestamp` - field mapping of a `date` or `date_nanos` field type; The alias must not have - any filters; The alias must not use custom routing. If successful, the request - removes the alias and creates a data stream with the same name. The indices for - the alias become hidden backing indices for the stream. The write index for the - alias becomes the write index for the stream. + Convert an index alias to a data stream. Converts an index alias to a data stream. + You must have a matching index template that is data stream enabled. The alias + must meet the following criteria: The alias must have a write index; All indices + for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` + field type; The alias must not have any filters; The alias must not use custom + routing. If successful, the request removes the alias and creates a data stream + with the same name. The indices for the alias become hidden backing indices for + the stream. The write index for the alias becomes the write index for the stream. ``_ @@ -1596,7 +1575,8 @@ def modify_data_stream( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Performs one or more data stream modification actions in a single atomic operation. + Update data streams. Performs one or more data stream modification actions in + a single atomic operation. ``_ @@ -1650,17 +1630,15 @@ def put_alias( human: t.Optional[bool] = None, index_routing: t.Optional[str] = None, is_write_index: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, routing: t.Optional[str] = None, search_routing: t.Optional[str] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a data stream or index to an alias. + Create or update an alias. Adds a data stream or index to an alias. ``_ @@ -1743,30 +1721,27 @@ def put_data_lifecycle( self, *, name: t.Union[str, t.Sequence[str]], - data_retention: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, downsampling: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Update the data lifecycle of the specified data streams. + Update data stream lifecycles. Update the data stream lifecycle of the specified + data streams. ``_ @@ -1858,9 +1833,7 @@ def put_index_template( human: t.Optional[bool] = None, ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, priority: t.Optional[int] = None, @@ -1994,7 +1967,7 @@ def put_mapping( allow_no_indices: t.Optional[bool] = None, date_detection: t.Optional[bool] = None, dynamic: t.Optional[ - t.Union["t.Literal['false', 'runtime', 'strict', 'true']", str] + t.Union[str, t.Literal["false", "runtime", "strict", "true"]] ] = None, dynamic_date_formats: t.Optional[t.Sequence[str]] = None, dynamic_templates: t.Optional[ @@ -2007,18 +1980,16 @@ def put_mapping( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, field_names: t.Optional[t.Mapping[str, t.Any]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, numeric_detection: t.Optional[bool] = None, pretty: t.Optional[bool] = None, @@ -2026,14 +1997,14 @@ def put_mapping( routing: t.Optional[t.Mapping[str, t.Any]] = None, runtime: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, write_index_only: t.Optional[bool] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds new fields to an existing data stream or index. You can also use this API - to change the search settings of existing fields. For data streams, these changes - are applied to all backing indices by default. + Update field mappings. Adds new fields to an existing data stream or index. You + can also use this API to change the search settings of existing fields. For data + streams, these changes are applied to all backing indices by default. ``_ @@ -2147,25 +2118,23 @@ def put_settings( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, flat_settings: t.Optional[bool] = None, human: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, preserve_existing: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Changes a dynamic index setting in real time. For data streams, index setting - changes are applied to all backing indices by default. + Update index settings. Changes dynamic index settings in real time. For data + streams, index setting changes are applied to all backing indices by default. ``_ @@ -2261,9 +2230,7 @@ def put_template( human: t.Optional[bool] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, order: t.Optional[int] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -2349,9 +2316,9 @@ def refresh( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2360,9 +2327,9 @@ def refresh( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - A refresh makes recent operations performed on one or more indices available - for search. For data streams, the API runs the refresh operation on the stream’s - backing indices. + Refresh an index. A refresh makes recent operations performed on one or more + indices available for search. For data streams, the API runs the refresh operation + on the stream’s backing indices. ``_ @@ -2420,9 +2387,9 @@ def resolve_index( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -2483,19 +2450,17 @@ def rollover( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, mappings: t.Optional[t.Mapping[str, t.Any]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_active_shards: t.Optional[ - t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]] + t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a new index for a data stream or index alias. + Roll over to a new index. Creates a new index for a data stream or index alias. ``_ @@ -2587,9 +2552,7 @@ def simulate_index_template( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, include_defaults: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -2662,9 +2625,7 @@ def simulate_template( ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None, include_defaults: t.Optional[bool] = None, index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, priority: t.Optional[int] = None, @@ -2793,15 +2754,13 @@ def update_aliases( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Adds a data stream or index to an alias. + Create or update an alias. Adds a data stream or index to an alias. ``_ @@ -2853,15 +2812,15 @@ def validate_query( allow_no_indices: t.Optional[bool] = None, analyze_wildcard: t.Optional[bool] = None, analyzer: t.Optional[str] = None, - default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None, + default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None, df: t.Optional[str] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, explain: t.Optional[bool] = None, @@ -2876,7 +2835,7 @@ def validate_query( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Validates a potentially expensive query without executing it. + Validate a query. Validates a query without running it. ``_ diff --git a/elasticsearch_serverless/_sync/client/inference.py b/elasticsearch_serverless/_sync/client/inference.py index be4a9cf..2fc2a8d 100644 --- a/elasticsearch_serverless/_sync/client/inference.py +++ b/elasticsearch_serverless/_sync/client/inference.py @@ -32,8 +32,8 @@ def delete( inference_id: str, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, dry_run: t.Optional[bool] = None, @@ -98,8 +98,8 @@ def get( *, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, inference_id: t.Optional[str] = None, @@ -158,8 +158,8 @@ def inference( input: t.Optional[t.Union[str, t.Sequence[str]]] = None, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, error_trace: t.Optional[bool] = None, @@ -168,7 +168,7 @@ def inference( pretty: t.Optional[bool] = None, query: t.Optional[str] = None, task_settings: t.Optional[t.Any] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -245,8 +245,8 @@ def put( body: t.Optional[t.Mapping[str, t.Any]] = None, task_type: t.Optional[ t.Union[ - "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']", str, + t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"], ] ] = None, error_trace: t.Optional[bool] = None, diff --git a/elasticsearch_serverless/_sync/client/ingest.py b/elasticsearch_serverless/_sync/client/ingest.py index e0becc3..583e928 100644 --- a/elasticsearch_serverless/_sync/client/ingest.py +++ b/elasticsearch_serverless/_sync/client/ingest.py @@ -33,11 +33,9 @@ def delete_pipeline( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Deletes one or more existing ingest pipeline. @@ -87,9 +85,7 @@ def get_pipeline( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, summary: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -187,14 +183,12 @@ def put_pipeline( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, if_version: t.Optional[int] = None, - master_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, on_failure: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, pretty: t.Optional[bool] = None, processors: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, version: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_sync/client/license.py b/elasticsearch_serverless/_sync/client/license.py index 4658bf3..b63fecd 100644 --- a/elasticsearch_serverless/_sync/client/license.py +++ b/elasticsearch_serverless/_sync/client/license.py @@ -37,9 +37,9 @@ def get( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - This API returns information about the type of license, when it was issued, and - when it expires, for example. For more information about the different types - of licenses, see https://www.elastic.co/subscriptions. + Get license information. Returns information about your Elastic license, including + its type, its status, when it was issued, and when it expires. For more information + about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions). ``_ diff --git a/elasticsearch_serverless/_sync/client/ml.py b/elasticsearch_serverless/_sync/client/ml.py index 76c89ed..14070dd 100644 --- a/elasticsearch_serverless/_sync/client/ml.py +++ b/elasticsearch_serverless/_sync/client/ml.py @@ -38,11 +38,11 @@ def close_job( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Close anomaly detection jobs A job can be opened and closed multiple times throughout + Close anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating @@ -115,7 +115,8 @@ def delete_calendar( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Removes all scheduled events from a calendar, then deletes it. + Delete a calendar. Removes all scheduled events from a calendar, then deletes + it. ``_ @@ -156,7 +157,7 @@ def delete_calendar_event( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes scheduled events from a calendar. + Delete events from a calendar. ``_ @@ -204,7 +205,7 @@ def delete_calendar_job( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes anomaly detection jobs from a calendar. + Delete anomaly jobs from a calendar. ``_ @@ -250,10 +251,10 @@ def delete_data_frame_analytics( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a data frame analytics job. + Delete a data frame analytics job. ``_ @@ -301,7 +302,7 @@ def delete_datafeed( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing datafeed. + Delete a datafeed. ``_ @@ -348,7 +349,7 @@ def delete_filter( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a filter. If an anomaly detection job references the filter, you cannot + Delete a filter. If an anomaly detection job references the filter, you cannot delete the filter. You must update or delete the job before you can delete the filter. @@ -393,7 +394,7 @@ def delete_job( wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an anomaly detection job. All job configuration, model state and results + Delete an anomaly detection job. All job configuration, model state and results are deleted. It is not currently possible to delete multiple jobs using wildcards or a comma separated list. If you delete a job that has a datafeed, the request first tries to delete the datafeed. This behavior is equivalent to calling the @@ -452,8 +453,8 @@ def delete_trained_model( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes an existing trained inference model that is currently not referenced - by an ingest pipeline. + Delete an unreferenced trained model. The request deletes a trained inference + model that is not referenced by an ingest pipeline. ``_ @@ -498,9 +499,9 @@ def delete_trained_model_alias( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a trained model alias. This API deletes an existing model alias that - refers to a trained model. If the model alias is missing or refers to a model - other than the one identified by the `model_id`, this API returns an error. + Delete a trained model alias. This API deletes an existing model alias that refers + to a trained model. If the model alias is missing or refers to a model other + than the one identified by the `model_id`, this API returns an error. ``_ @@ -555,9 +556,9 @@ def estimate_model_memory( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Makes an estimation of the memory usage for an anomaly detection job model. It - is based on analysis configuration details for the job and cardinality estimates - for the fields it references. + Estimate job model memory usage. Makes an estimation of the memory usage for + an anomaly detection job model. It is based on analysis configuration details + for the job and cardinality estimates for the fields it references. ``_ @@ -622,10 +623,10 @@ def evaluate_data_frame( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Evaluates the data frame analytics for an annotated index. The API packages together - commonly used evaluation metrics for various types of machine learning features. - This has been designed for use on indexes created by data frame analytics. Evaluation - requires both a ground truth field and an analytics result field to be present. + Evaluate data frame analytics. The API packages together commonly used evaluation + metrics for various types of machine learning features. This has been designed + for use on indexes created by data frame analytics. Evaluation requires both + a ground truth field and an analytics result field to be present. ``_ @@ -1341,7 +1342,7 @@ def get_overall_buckets( *, job_id: str, allow_no_match: t.Optional[bool] = None, - bucket_span: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + bucket_span: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, end: t.Optional[t.Union[str, t.Any]] = None, error_trace: t.Optional[bool] = None, exclude_interim: t.Optional[bool] = None, @@ -1447,8 +1448,14 @@ def get_trained_models( human: t.Optional[bool] = None, include: t.Optional[ t.Union[ - "t.Literal['definition', 'definition_status', 'feature_importance_baseline', 'hyperparameters', 'total_feature_importance']", str, + t.Literal[ + "definition", + "definition_status", + "feature_importance_baseline", + "hyperparameters", + "total_feature_importance", + ], ] ] = None, pretty: t.Optional[bool] = None, @@ -1599,7 +1606,7 @@ def infer_trained_model( human: t.Optional[bool] = None, inference_config: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -1661,16 +1668,16 @@ def open_job( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Opens one or more anomaly detection jobs. An anomaly detection job must be opened - in order for it to be ready to receive and analyze data. It can be opened and - closed multiple times throughout its lifecycle. When you open a new job, it starts - with an empty model. When you open an existing job, the most recent model state - is automatically loaded. The job is ready to resume its analysis from where it - left off, once new data is received. + Open anomaly detection jobs. An anomaly detection job must be opened in order + for it to be ready to receive and analyze data. It can be opened and closed multiple + times throughout its lifecycle. When you open a new job, it starts with an empty + model. When you open an existing job, the most recent model state is automatically + loaded. The job is ready to resume its analysis from where it left off, once + new data is received. ``_ @@ -2195,13 +2202,13 @@ def put_datafeed( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, headers: t.Optional[t.Mapping[str, t.Union[str, t.Sequence[str]]]] = None, human: t.Optional[bool] = None, ignore_throttled: t.Optional[bool] = None, @@ -2213,7 +2220,7 @@ def put_datafeed( max_empty_searches: t.Optional[int] = None, pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, - query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + query_delay: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, scroll_size: t.Optional[int] = None, @@ -2452,7 +2459,7 @@ def put_job( allow_lazy_open: t.Optional[bool] = None, analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None, background_persist_interval: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, custom_settings: t.Optional[t.Any] = None, daily_model_snapshot_retention_after_days: t.Optional[int] = None, @@ -2471,8 +2478,8 @@ def put_job( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Instantiates an anomaly detection job. If you include a `datafeed_config`, you - must have read index privileges on the source index. + Create an anomaly detection job. If you include a `datafeed_config`, you must + have read index privileges on the source index. ``_ @@ -2642,7 +2649,7 @@ def put_trained_model( metadata: t.Optional[t.Any] = None, model_size_bytes: t.Optional[int] = None, model_type: t.Optional[ - t.Union["t.Literal['lang_ident', 'pytorch', 'tree_ensemble']", str] + t.Union[str, t.Literal["lang_ident", "pytorch", "tree_ensemble"]] ] = None, platform_architecture: t.Optional[str] = None, prefix_strings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -3008,7 +3015,7 @@ def start_data_frame_analytics( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Starts a data frame analytics job. A data frame analytics job can be started @@ -3068,7 +3075,7 @@ def start_datafeed( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, start: t.Optional[t.Union[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3142,12 +3149,12 @@ def start_trained_model_deployment( human: t.Optional[bool] = None, number_of_allocations: t.Optional[int] = None, pretty: t.Optional[bool] = None, - priority: t.Optional[t.Union["t.Literal['low', 'normal']", str]] = None, + priority: t.Optional[t.Union[str, t.Literal["low", "normal"]]] = None, queue_capacity: t.Optional[int] = None, threads_per_allocation: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for: t.Optional[ - t.Union["t.Literal['fully_allocated', 'started', 'starting']", str] + t.Union[str, t.Literal["fully_allocated", "started", "starting"]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3232,7 +3239,7 @@ def stop_data_frame_analytics( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ Stops one or more data frame analytics jobs. A data frame analytics job can be @@ -3297,7 +3304,7 @@ def stop_datafeed( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -3514,13 +3521,13 @@ def update_datafeed( expand_wildcards: t.Optional[ t.Union[ t.Sequence[ - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str] + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]] ], - t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str], + t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]], ] ] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, ignore_throttled: t.Optional[bool] = None, ignore_unavailable: t.Optional[bool] = None, @@ -3531,7 +3538,7 @@ def update_datafeed( max_empty_searches: t.Optional[int] = None, pretty: t.Optional[bool] = None, query: t.Optional[t.Mapping[str, t.Any]] = None, - query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + query_delay: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, scroll_size: t.Optional[int] = None, @@ -3772,7 +3779,7 @@ def update_job( allow_lazy_open: t.Optional[bool] = None, analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None, background_persist_interval: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, categorization_filters: t.Optional[t.Sequence[str]] = None, custom_settings: t.Optional[t.Mapping[str, t.Any]] = None, @@ -3785,7 +3792,7 @@ def update_job( human: t.Optional[bool] = None, model_plot_config: t.Optional[t.Mapping[str, t.Any]] = None, model_prune_window: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, model_snapshot_retention_days: t.Optional[int] = None, per_partition_categorization: t.Optional[t.Mapping[str, t.Any]] = None, diff --git a/elasticsearch_serverless/_sync/client/query_rules.py b/elasticsearch_serverless/_sync/client/query_rules.py index 3b211b2..06dda16 100644 --- a/elasticsearch_serverless/_sync/client/query_rules.py +++ b/elasticsearch_serverless/_sync/client/query_rules.py @@ -251,7 +251,7 @@ def list_rulesets( ) @_rewrite_parameters( - body_fields=("actions", "criteria", "type"), + body_fields=("actions", "criteria", "type", "priority"), ) def put_rule( self, @@ -259,12 +259,15 @@ def put_rule( ruleset_id: str, rule_id: str, actions: t.Optional[t.Mapping[str, t.Any]] = None, - criteria: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, - type: t.Optional[t.Union["t.Literal['pinned']", str]] = None, + criteria: t.Optional[ + t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] + ] = None, + type: t.Optional[t.Union[str, t.Literal["pinned"]]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, + priority: t.Optional[int] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -279,6 +282,7 @@ def put_rule( :param actions: :param criteria: :param type: + :param priority: """ if ruleset_id in SKIP_IN_PATH: raise ValueError("Empty value passed for parameter 'ruleset_id'") @@ -312,6 +316,8 @@ def put_rule( __body["criteria"] = criteria if type is not None: __body["type"] = type + if priority is not None: + __body["priority"] = priority __headers = {"accept": "application/json", "content-type": "application/json"} return self.perform_request( # type: ignore[return-value] "PUT", @@ -330,7 +336,9 @@ def put_ruleset( self, *, ruleset_id: str, - rules: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, + rules: t.Optional[ + t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]] + ] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, diff --git a/elasticsearch_serverless/_sync/client/security.py b/elasticsearch_serverless/_sync/client/security.py index c71c4c6..40f7021 100644 --- a/elasticsearch_serverless/_sync/client/security.py +++ b/elasticsearch_serverless/_sync/client/security.py @@ -35,12 +35,12 @@ def authenticate( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Enables you to submit a request with a basic auth header to authenticate a user - and retrieve information about the authenticated user. A successful call returns - a JSON structure that shows user information such as their username, the roles - that are assigned to the user, any assigned metadata, and information about the - realms that authenticated and authorized the user. If the user cannot be authenticated, - this API returns a 401 status code. + Authenticate a user. Authenticates a user and returns information about the authenticated + user. Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication). + A successful call returns a JSON structure that shows user information such as + their username, the roles that are assigned to the user, any assigned metadata, + and information about the realms that authenticated and authorized the user. + If the user cannot be authenticated, this API returns a 401 status code. ``_ """ @@ -72,24 +72,24 @@ def create_api_key( self, *, error_trace: t.Optional[bool] = None, - expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, metadata: t.Optional[t.Mapping[str, t.Any]] = None, name: t.Optional[str] = None, pretty: t.Optional[bool] = None, refresh: t.Optional[ - t.Union["t.Literal['false', 'true', 'wait_for']", bool, str] + t.Union[bool, str, t.Literal["false", "true", "wait_for"]] ] = None, role_descriptors: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates an API key for access without requiring basic authentication. A successful - request returns a JSON structure that contains the API key, its unique id, and - its name. If applicable, it also returns expiration information for the API key - in milliseconds. NOTE: By default, API keys never expire. You can specify expiration - information when you create the API keys. + Create an API key. Creates an API key for access without requiring basic authentication. + A successful request returns a JSON structure that contains the API key, its + unique id, and its name. If applicable, it also returns expiration information + for the API key in milliseconds. NOTE: By default, API keys never expire. You + can specify expiration information when you create the API keys. ``_ @@ -163,10 +163,11 @@ def get_api_key( with_profile_uid: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for one or more API keys. NOTE: If you have only the `manage_own_api_key` - privilege, this API returns only the API keys that you own. If you have `read_security`, - `manage_api_key` or greater privileges (including `manage_security`), this API - returns all API keys regardless of ownership. + Get API key information. Retrieves information for one or more API keys. NOTE: + If you have only the `manage_own_api_key` privilege, this API returns only the + API keys that you own. If you have `read_security`, `manage_api_key` or greater + privileges (including `manage_security`), this API returns all API keys regardless + of ownership. ``_ @@ -241,8 +242,67 @@ def has_privileges( cluster: t.Optional[ t.Sequence[ t.Union[ - "t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_data_stream_global_retention', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_data_stream_global_retention', 'monitor_enrich', 'monitor_inference', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_connector_secrets', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']", str, + t.Literal[ + "all", + "cancel_task", + "create_snapshot", + "cross_cluster_replication", + "cross_cluster_search", + "delegate_pki", + "grant_api_key", + "manage", + "manage_api_key", + "manage_autoscaling", + "manage_behavioral_analytics", + "manage_ccr", + "manage_data_frame_transforms", + "manage_data_stream_global_retention", + "manage_enrich", + "manage_ilm", + "manage_index_templates", + "manage_inference", + "manage_ingest_pipelines", + "manage_logstash_pipelines", + "manage_ml", + "manage_oidc", + "manage_own_api_key", + "manage_pipeline", + "manage_rollup", + "manage_saml", + "manage_search_application", + "manage_search_query_rules", + "manage_search_synonyms", + "manage_security", + "manage_service_account", + "manage_slm", + "manage_token", + "manage_transform", + "manage_user_profile", + "manage_watcher", + "monitor", + "monitor_data_frame_transforms", + "monitor_data_stream_global_retention", + "monitor_enrich", + "monitor_inference", + "monitor_ml", + "monitor_rollup", + "monitor_snapshot", + "monitor_text_structure", + "monitor_transform", + "monitor_watcher", + "none", + "post_behavioral_analytics_event", + "read_ccr", + "read_fleet_secrets", + "read_ilm", + "read_pipeline", + "read_security", + "read_slm", + "transport_client", + "write_connector_secrets", + "write_fleet_secrets", + ], ] ] ] = None, @@ -254,7 +314,8 @@ def has_privileges( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Determines whether the specified user has a specified list of privileges. + Check user privileges. Determines whether the specified user has a specified + list of privileges. ``_ @@ -317,13 +378,13 @@ def invalidate_api_key( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Invalidates one or more API keys. The `manage_api_key` privilege allows deleting - any API keys. The `manage_own_api_key` only allows deleting API keys that are - owned by the user. In addition, with the `manage_own_api_key` privilege, an invalidation - request must be issued in one of the three formats: - Set the parameter `owner=true`. - - Or, set both `username` and `realm_name` to match the user’s identity. - Or, - if the request is issued by an API key, i.e. an API key invalidates itself, specify - its ID in the `ids` field. + Invalidate API keys. Invalidates one or more API keys. The `manage_api_key` privilege + allows deleting any API keys. The `manage_own_api_key` only allows deleting API + keys that are owned by the user. In addition, with the `manage_own_api_key` privilege, + an invalidation request must be issued in one of the three formats: - Set the + parameter `owner=true`. - Or, set both `username` and `realm_name` to match the + user’s identity. - Or, if the request is issued by an API key, i.e. an API key + invalidates itself, specify its ID in the `ids` field. ``_ @@ -416,8 +477,8 @@ def query_api_keys( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves information for API keys in a paginated manner. You can optionally - filter the results with a query. + Query API keys. Retrieves a paginated list of API keys and their information. + You can optionally filter the results with a query. ``_ @@ -525,7 +586,7 @@ def update_api_key( *, id: str, error_trace: t.Optional[bool] = None, - expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, metadata: t.Optional[t.Mapping[str, t.Any]] = None, @@ -534,22 +595,22 @@ def update_api_key( body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates attributes of an existing API key. Users can only update API keys that - they created or that were granted to them. Use this API to update API keys created - by the create API Key or grant API Key APIs. If you need to apply the same update - to many API keys, you can use bulk update API Keys to reduce overhead. It’s not - possible to update expired API keys, or API keys that have been invalidated by - invalidate API Key. This API supports updates to an API key’s access scope and - metadata. The access scope of an API key is derived from the `role_descriptors` - you specify in the request, and a snapshot of the owner user’s permissions at - the time of the request. The snapshot of the owner’s permissions is updated automatically - on every call. If you don’t specify `role_descriptors` in the request, a call - to this API might still change the API key’s access scope. This change can occur - if the owner user’s permissions have changed since the API key was created or - last modified. To update another user’s API key, use the `run_as` feature to - submit a request on behalf of another user. IMPORTANT: It’s not possible to use - an API key as the authentication credential for this API. To update an API key, - the owner user’s credentials are required. + Update an API key. Updates attributes of an existing API key. Users can only + update API keys that they created or that were granted to them. Use this API + to update API keys created by the create API Key or grant API Key APIs. If you + need to apply the same update to many API keys, you can use bulk update API Keys + to reduce overhead. It’s not possible to update expired API keys, or API keys + that have been invalidated by invalidate API Key. This API supports updates to + an API key’s access scope and metadata. The access scope of an API key is derived + from the `role_descriptors` you specify in the request, and a snapshot of the + owner user’s permissions at the time of the request. The snapshot of the owner’s + permissions is updated automatically on every call. If you don’t specify `role_descriptors` + in the request, a call to this API might still change the API key’s access scope. + This change can occur if the owner user’s permissions have changed since the + API key was created or last modified. To update another user’s API key, use the + `run_as` feature to submit a request on behalf of another user. IMPORTANT: It’s + not possible to use an API key as the authentication credential for this API. + To update an API key, the owner user’s credentials are required. ``_ diff --git a/elasticsearch_serverless/_sync/client/sql.py b/elasticsearch_serverless/_sync/client/sql.py index ea25c4c..3635bfc 100644 --- a/elasticsearch_serverless/_sync/client/sql.py +++ b/elasticsearch_serverless/_sync/client/sql.py @@ -124,10 +124,10 @@ def get_async( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, human: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -254,19 +254,17 @@ def query( format: t.Optional[str] = None, human: t.Optional[bool] = None, index_using_frozen: t.Optional[bool] = None, - keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, keep_on_completion: t.Optional[bool] = None, - page_timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + page_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, params: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, query: t.Optional[str] = None, - request_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] - ] = None, + request_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None, time_zone: t.Optional[str] = None, wait_for_completion_timeout: t.Optional[ - t.Union["t.Literal[-1]", "t.Literal[0]", str] + t.Union[str, t.Literal[-1], t.Literal[0]] ] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: diff --git a/elasticsearch_serverless/_sync/client/tasks.py b/elasticsearch_serverless/_sync/client/tasks.py index 6ab0f12..a35acf7 100644 --- a/elasticsearch_serverless/_sync/client/tasks.py +++ b/elasticsearch_serverless/_sync/client/tasks.py @@ -34,11 +34,12 @@ def get( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Returns information about a task. + Get task information. Returns information about the tasks currently executing + in the cluster. ``_ diff --git a/elasticsearch_serverless/_sync/client/transform.py b/elasticsearch_serverless/_sync/client/transform.py index 3f3de36..c09881b 100644 --- a/elasticsearch_serverless/_sync/client/transform.py +++ b/elasticsearch_serverless/_sync/client/transform.py @@ -36,10 +36,10 @@ def delete_transform( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Deletes a transform. + Delete a transform. Deletes a transform. ``_ @@ -99,7 +99,7 @@ def get_transform( size: t.Optional[int] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves configuration information for transforms. + Get transforms. Retrieves configuration information for transforms. ``_ @@ -165,10 +165,10 @@ def get_transform_stats( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, size: t.Optional[int] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Retrieves usage information for transforms. + Get transform stats. Retrieves usage information for transforms. ``_ @@ -236,7 +236,7 @@ def preview_transform( dest: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, latest: t.Optional[t.Mapping[str, t.Any]] = None, pivot: t.Optional[t.Mapping[str, t.Any]] = None, @@ -245,14 +245,16 @@ def preview_transform( settings: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Previews a transform. It returns a maximum of 100 results. The calculations are - based on all the current data in the source index. It also generates a list of - mappings and settings for the destination index. These values are determined - based on the field types of the source index and the transform aggregations. + Preview a transform. Generates a preview of the results that you will get when + you create a transform with the same configuration. It returns a maximum of 100 + results. The calculations are based on all the current data in the source index. + It also generates a list of mappings and settings for the destination index. + These values are determined based on the field types of the source index and + the transform aggregations. ``_ @@ -356,7 +358,7 @@ def put_transform( description: t.Optional[str] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, latest: t.Optional[t.Mapping[str, t.Any]] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, @@ -365,30 +367,31 @@ def put_transform( retention_policy: t.Optional[t.Mapping[str, t.Any]] = None, settings: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Creates a transform. A transform copies data from source indices, transforms - it, and persists it into an entity-centric destination index. You can also think - of the destination index as a two-dimensional tabular data structure (known as - a data frame). The ID for each document in the data frame is generated from a - hash of the entity, so there is a unique row per entity. You must choose either - the latest or pivot method for your transform; you cannot use both in a single - transform. If you choose to use the pivot method for your transform, the entities - are defined by the set of `group_by` fields in the pivot object. If you choose - to use the latest method, the entities are defined by the `unique_key` field - values in the latest object. You must have `create_index`, `index`, and `read` - privileges on the destination index and `read` and `view_index_metadata` privileges - on the source indices. When Elasticsearch security features are enabled, the - transform remembers which roles the user that created it had at the time of creation - and uses those same roles. If those roles do not have the required privileges - on the source and destination indices, the transform fails when it attempts unauthorized - operations. NOTE: You must use Kibana or this API to create a transform. Do not - add a transform directly into any `.transform-internal*` indices using the Elasticsearch - index API. If Elasticsearch security features are enabled, do not give users - any privileges on `.transform-internal*` indices. If you used transforms prior - to 7.5, also do not give users any privileges on `.data-frame-internal*` indices. + Create a transform. Creates a transform. A transform copies data from source + indices, transforms it, and persists it into an entity-centric destination index. + You can also think of the destination index as a two-dimensional tabular data + structure (known as a data frame). The ID for each document in the data frame + is generated from a hash of the entity, so there is a unique row per entity. + You must choose either the latest or pivot method for your transform; you cannot + use both in a single transform. If you choose to use the pivot method for your + transform, the entities are defined by the set of `group_by` fields in the pivot + object. If you choose to use the latest method, the entities are defined by the + `unique_key` field values in the latest object. You must have `create_index`, + `index`, and `read` privileges on the destination index and `read` and `view_index_metadata` + privileges on the source indices. When Elasticsearch security features are enabled, + the transform remembers which roles the user that created it had at the time + of creation and uses those same roles. If those roles do not have the required + privileges on the source and destination indices, the transform fails when it + attempts unauthorized operations. NOTE: You must use Kibana or this API to create + a transform. Do not add a transform directly into any `.transform-internal*` + indices using the Elasticsearch index API. If Elasticsearch security features + are enabled, do not give users any privileges on `.transform-internal*` indices. + If you used transforms prior to 7.5, also do not give users any privileges on + `.data-frame-internal*` indices. ``_ @@ -488,9 +491,9 @@ def reset_transform( pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Resets a transform. Before you can reset it, you must stop it; alternatively, - use the `force` query parameter. If the destination index was created by the - transform, it is deleted. + Reset a transform. Resets a transform. Before you can reset it, you must stop + it; alternatively, use the `force` query parameter. If the destination index + was created by the transform, it is deleted. ``_ @@ -535,13 +538,14 @@ def schedule_now_transform( filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Schedules now a transform. If you _schedule_now a transform, it will process - the new data instantly, without waiting for the configured frequency interval. - After _schedule_now API is called, the transform will be processed again at now - + frequency unless _schedule_now API is called again in the meantime. + Schedule a transform to start now. Instantly runs a transform to process data. + If you _schedule_now a transform, it will process the new data instantly, without + waiting for the configured frequency interval. After _schedule_now API is called, + the transform will be processed again at now + frequency unless _schedule_now + API is called again in the meantime. ``_ @@ -585,26 +589,27 @@ def start_transform( from_: t.Optional[str] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ - Starts a transform. When you start a transform, it creates the destination index - if it does not already exist. The `number_of_shards` is set to `1` and the `auto_expand_replicas` - is set to `0-1`. If it is a pivot transform, it deduces the mapping definitions - for the destination index from the source indices and the transform aggregations. - If fields in the destination index are derived from scripts (as in the case of - `scripted_metric` or `bucket_script` aggregations), the transform uses dynamic - mappings unless an index template exists. If it is a latest transform, it does - not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings, - create the destination index before you start the transform. Alternatively, you - can create an index template, though it does not affect the deduced mappings - in a pivot transform. When the transform starts, a series of validations occur - to ensure its success. If you deferred validation when you created the transform, - they occur when you start the transform—​with the exception of privilege checks. - When Elasticsearch security features are enabled, the transform remembers which - roles the user that created it had at the time of creation and uses those same - roles. If those roles do not have the required privileges on the source and destination - indices, the transform fails when it attempts unauthorized operations. + Start a transform. Starts a transform. When you start a transform, it creates + the destination index if it does not already exist. The `number_of_shards` is + set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, + it deduces the mapping definitions for the destination index from the source + indices and the transform aggregations. If fields in the destination index are + derived from scripts (as in the case of `scripted_metric` or `bucket_script` + aggregations), the transform uses dynamic mappings unless an index template exists. + If it is a latest transform, it does not deduce mapping definitions; it uses + dynamic mappings. To use explicit mappings, create the destination index before + you start the transform. Alternatively, you can create an index template, though + it does not affect the deduced mappings in a pivot transform. When the transform + starts, a series of validations occur to ensure its success. If you deferred + validation when you created the transform, they occur when you start the transform—​with + the exception of privilege checks. When Elasticsearch security features are enabled, + the transform remembers which roles the user that created it had at the time + of creation and uses those same roles. If those roles do not have the required + privileges on the source and destination indices, the transform fails when it + attempts unauthorized operations. ``_ @@ -653,12 +658,12 @@ def stop_transform( force: t.Optional[bool] = None, human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, wait_for_checkpoint: t.Optional[bool] = None, wait_for_completion: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ - Stops one or more transforms. + Stop transforms. Stops one or more transforms. ``_ @@ -739,7 +744,7 @@ def update_transform( dest: t.Optional[t.Mapping[str, t.Any]] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, - frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, human: t.Optional[bool] = None, meta: t.Optional[t.Mapping[str, t.Any]] = None, pretty: t.Optional[bool] = None, @@ -747,17 +752,18 @@ def update_transform( settings: t.Optional[t.Mapping[str, t.Any]] = None, source: t.Optional[t.Mapping[str, t.Any]] = None, sync: t.Optional[t.Mapping[str, t.Any]] = None, - timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, body: t.Optional[t.Dict[str, t.Any]] = None, ) -> ObjectApiResponse[t.Any]: """ - Updates certain properties of a transform. All updated properties except `description` - do not take effect until after the transform starts the next checkpoint, thus - there is data consistency in each checkpoint. To use this API, you must have - `read` and `view_index_metadata` privileges for the source indices. You must - also have `index` and `read` privileges for the destination index. When Elasticsearch - security features are enabled, the transform remembers which roles the user who - updated it had at the time of update and runs with those privileges. + Update a transform. Updates certain properties of a transform. All updated properties + except `description` do not take effect until after the transform starts the + next checkpoint, thus there is data consistency in each checkpoint. To use this + API, you must have `read` and `view_index_metadata` privileges for the source + indices. You must also have `index` and `read` privileges for the destination + index. When Elasticsearch security features are enabled, the transform remembers + which roles the user who updated it had at the time of update and runs with those + privileges. ``_