From 38a5d1f65b4a2ddf711bb5dab40267fd472aeaf0 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 10 Nov 2025 06:03:21 +0000 Subject: [PATCH] Auto-generated API code --- elasticsearch/_async/client/cat.py | 38 ++++++++++++++++++++++++++ elasticsearch/_async/client/cluster.py | 3 +- elasticsearch/_async/client/indices.py | 6 ++-- elasticsearch/_sync/client/cat.py | 38 ++++++++++++++++++++++++++ elasticsearch/_sync/client/cluster.py | 3 +- elasticsearch/_sync/client/indices.py | 6 ++-- elasticsearch/_version.py | 2 +- elasticsearch/dsl/aggs.py | 14 +++++----- 8 files changed, 94 insertions(+), 16 deletions(-) diff --git a/elasticsearch/_async/client/cat.py b/elasticsearch/_async/client/cat.py index 8a048de5f..81fbc03ab 100644 --- a/elasticsearch/_async/client/cat.py +++ b/elasticsearch/_async/client/cat.py @@ -2895,10 +2895,20 @@ async def segments( self, *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, + allow_closed: t.Optional[bool] = None, + allow_no_indices: t.Optional[bool] = None, bytes: t.Optional[ 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[str, t.Literal["all", "closed", "hidden", "none", "open"]] + ], + 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[ @@ -2949,6 +2959,8 @@ async def segments( ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, + ignore_throttled: t.Optional[bool] = None, + ignore_unavailable: t.Optional[bool] = None, local: t.Optional[bool] = None, master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, @@ -2972,6 +2984,14 @@ async def segments( :param index: A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + :param allow_closed: If true, allow closed indices to be returned in the response + otherwise if false, keep the legacy behaviour of throwing an exception if + index pattern matches closed indices + :param allow_no_indices: If false, the request returns an error if any wildcard + expression, index alias, or _all value targets only missing or closed indices. + This behavior applies even if the request targets other open indices. For + example, a request targeting foo*,bar* returns an error if an index starts + with foo but no index starts with bar. :param bytes: Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are @@ -2980,12 +3000,20 @@ async def segments( least `1.0`. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down. + :param expand_wildcards: Type of index that wildcard expressions can match. If + the request can target data streams, this argument determines whether wildcard + expressions match hidden data streams. Supports comma-separated values, such + as open,hidden. :param format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: A comma-separated list of columns names to display. It supports simple wildcards. :param help: When set to `true` will output available columns. This option can't be combined with any other query string option. + :param ignore_throttled: If true, concrete, expanded or aliased indices are ignored + when frozen. + :param ignore_unavailable: If true, missing or closed indices are not included + in the response. :param local: If `true`, the request computes the list of selected nodes from the local cluster state. If `false` the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating @@ -3010,10 +3038,16 @@ async def segments( __path_parts = {} __path = "/_cat/segments" __query: t.Dict[str, t.Any] = {} + if allow_closed is not None: + __query["allow_closed"] = allow_closed + if allow_no_indices is not None: + __query["allow_no_indices"] = allow_no_indices if bytes is not None: __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace + if expand_wildcards is not None: + __query["expand_wildcards"] = expand_wildcards if filter_path is not None: __query["filter_path"] = filter_path if format is not None: @@ -3024,6 +3058,10 @@ async def segments( __query["help"] = help if human is not None: __query["human"] = human + if ignore_throttled is not None: + __query["ignore_throttled"] = ignore_throttled + if ignore_unavailable is not None: + __query["ignore_unavailable"] = ignore_unavailable if local is not None: __query["local"] = local if master_timeout is not None: diff --git a/elasticsearch/_async/client/cluster.py b/elasticsearch/_async/client/cluster.py index 760b9a775..c641a38ad 100644 --- a/elasticsearch/_async/client/cluster.py +++ b/elasticsearch/_async/client/cluster.py @@ -1123,7 +1123,8 @@ async def state( when unavailable (missing or closed) :param local: Return local information, do not retrieve the state from master node (default: false) - :param master_timeout: Specify timeout for connection to master + :param master_timeout: Timeout for waiting for new cluster state in case it is + blocked :param wait_for_metadata_version: Wait for the metadata version to be equal or greater than the specified metadata version :param wait_for_timeout: The maximum time to wait for wait_for_metadata_version diff --git a/elasticsearch/_async/client/indices.py b/elasticsearch/_async/client/indices.py index 1b31232f5..478f4c350 100644 --- a/elasticsearch/_async/client/indices.py +++ b/elasticsearch/_async/client/indices.py @@ -2629,8 +2629,8 @@ async def get_index_template( ``_ - :param name: Comma-separated list of index template names used to limit the request. - Wildcard (*) expressions are supported. + :param name: Name of index template to retrieve. Wildcard (*) expressions are + supported. :param flat_settings: If true, returns settings in flat format. :param include_defaults: If true, returns all relevant default configurations for the index template. @@ -3427,7 +3427,7 @@ async def put_data_lifecycle( *, name: t.Union[str, t.Sequence[str]], data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, - downsampling: t.Optional[t.Mapping[str, t.Any]] = None, + downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, enabled: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ diff --git a/elasticsearch/_sync/client/cat.py b/elasticsearch/_sync/client/cat.py index 5be8efaba..59674a13e 100644 --- a/elasticsearch/_sync/client/cat.py +++ b/elasticsearch/_sync/client/cat.py @@ -2895,10 +2895,20 @@ def segments( self, *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, + allow_closed: t.Optional[bool] = None, + allow_no_indices: t.Optional[bool] = None, bytes: t.Optional[ 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[str, t.Literal["all", "closed", "hidden", "none", "open"]] + ], + 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[ @@ -2949,6 +2959,8 @@ def segments( ] = None, help: t.Optional[bool] = None, human: t.Optional[bool] = None, + ignore_throttled: t.Optional[bool] = None, + ignore_unavailable: t.Optional[bool] = None, local: t.Optional[bool] = None, master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, @@ -2972,6 +2984,14 @@ def segments( :param index: A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + :param allow_closed: If true, allow closed indices to be returned in the response + otherwise if false, keep the legacy behaviour of throwing an exception if + index pattern matches closed indices + :param allow_no_indices: If false, the request returns an error if any wildcard + expression, index alias, or _all value targets only missing or closed indices. + This behavior applies even if the request targets other open indices. For + example, a request targeting foo*,bar* returns an error if an index starts + with foo but no index starts with bar. :param bytes: Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are @@ -2980,12 +3000,20 @@ def segments( least `1.0`. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down. + :param expand_wildcards: Type of index that wildcard expressions can match. If + the request can target data streams, this argument determines whether wildcard + expressions match hidden data streams. Supports comma-separated values, such + as open,hidden. :param format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: A comma-separated list of columns names to display. It supports simple wildcards. :param help: When set to `true` will output available columns. This option can't be combined with any other query string option. + :param ignore_throttled: If true, concrete, expanded or aliased indices are ignored + when frozen. + :param ignore_unavailable: If true, missing or closed indices are not included + in the response. :param local: If `true`, the request computes the list of selected nodes from the local cluster state. If `false` the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating @@ -3010,10 +3038,16 @@ def segments( __path_parts = {} __path = "/_cat/segments" __query: t.Dict[str, t.Any] = {} + if allow_closed is not None: + __query["allow_closed"] = allow_closed + if allow_no_indices is not None: + __query["allow_no_indices"] = allow_no_indices if bytes is not None: __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace + if expand_wildcards is not None: + __query["expand_wildcards"] = expand_wildcards if filter_path is not None: __query["filter_path"] = filter_path if format is not None: @@ -3024,6 +3058,10 @@ def segments( __query["help"] = help if human is not None: __query["human"] = human + if ignore_throttled is not None: + __query["ignore_throttled"] = ignore_throttled + if ignore_unavailable is not None: + __query["ignore_unavailable"] = ignore_unavailable if local is not None: __query["local"] = local if master_timeout is not None: diff --git a/elasticsearch/_sync/client/cluster.py b/elasticsearch/_sync/client/cluster.py index d7322bf5f..675dc97af 100644 --- a/elasticsearch/_sync/client/cluster.py +++ b/elasticsearch/_sync/client/cluster.py @@ -1123,7 +1123,8 @@ def state( when unavailable (missing or closed) :param local: Return local information, do not retrieve the state from master node (default: false) - :param master_timeout: Specify timeout for connection to master + :param master_timeout: Timeout for waiting for new cluster state in case it is + blocked :param wait_for_metadata_version: Wait for the metadata version to be equal or greater than the specified metadata version :param wait_for_timeout: The maximum time to wait for wait_for_metadata_version diff --git a/elasticsearch/_sync/client/indices.py b/elasticsearch/_sync/client/indices.py index d09c243cf..c7d76803b 100644 --- a/elasticsearch/_sync/client/indices.py +++ b/elasticsearch/_sync/client/indices.py @@ -2629,8 +2629,8 @@ def get_index_template( ``_ - :param name: Comma-separated list of index template names used to limit the request. - Wildcard (*) expressions are supported. + :param name: Name of index template to retrieve. Wildcard (*) expressions are + supported. :param flat_settings: If true, returns settings in flat format. :param include_defaults: If true, returns all relevant default configurations for the index template. @@ -3427,7 +3427,7 @@ def put_data_lifecycle( *, name: t.Union[str, t.Sequence[str]], data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, - downsampling: t.Optional[t.Mapping[str, t.Any]] = None, + downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, enabled: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, expand_wildcards: t.Optional[ diff --git a/elasticsearch/_version.py b/elasticsearch/_version.py index 41c149a22..2bde20e6e 100644 --- a/elasticsearch/_version.py +++ b/elasticsearch/_version.py @@ -16,4 +16,4 @@ # under the License. __versionstr__ = "8.19.2" -__es_specification_commit__ = "f4816bb41c52c1bfda93c48191f0a0e4e2d575be" +__es_specification_commit__ = "915447a681bc397d2c7038ee72eb45648eb2abe3" diff --git a/elasticsearch/dsl/aggs.py b/elasticsearch/dsl/aggs.py index 9d0e9cc1d..831973d2d 100644 --- a/elasticsearch/dsl/aggs.py +++ b/elasticsearch/dsl/aggs.py @@ -1513,9 +1513,9 @@ class GeoLine(Agg[_R]): ordered by the chosen sort field. :arg point: (required) The name of the geo_point field. - :arg sort: (required) The name of the numeric field to use as the sort - key for ordering the points. When the `geo_line` aggregation is - nested inside a `time_series` aggregation, this field defaults to + :arg sort: The name of the numeric field to use as the sort key for + ordering the points. When the `geo_line` aggregation is nested + inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error. :arg include_sort: When `true`, returns an additional array of the sort values in the feature properties. @@ -1852,9 +1852,9 @@ def __init__( class Line(Agg[_R]): """ :arg point: (required) The name of the geo_point field. - :arg sort: (required) The name of the numeric field to use as the sort - key for ordering the points. When the `geo_line` aggregation is - nested inside a `time_series` aggregation, this field defaults to + :arg sort: The name of the numeric field to use as the sort key for + ordering the points. When the `geo_line` aggregation is nested + inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error. :arg include_sort: When `true`, returns an additional array of the sort values in the feature properties. @@ -2677,7 +2677,7 @@ def __init__( self, *, keyed: Union[bool, "DefaultType"] = DEFAULT, - percents: Union[Sequence[float], "DefaultType"] = DEFAULT, + percents: Union[float, Sequence[float], "DefaultType"] = DEFAULT, hdr: Union["types.HdrMethod", Dict[str, Any], "DefaultType"] = DEFAULT, tdigest: Union["types.TDigest", Dict[str, Any], "DefaultType"] = DEFAULT, format: Union[str, "DefaultType"] = DEFAULT,