diff --git a/elasticsearch/_async/client/cat.py b/elasticsearch/_async/client/cat.py index 84f946f5c..fc121e9ca 100644 --- a/elasticsearch/_async/client/cat.py +++ b/elasticsearch/_async/client/cat.py @@ -36,6 +36,9 @@ async def aliases( self, *, name: t.Optional[t.Union[str, t.Sequence[str]]] = 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[ @@ -80,6 +83,9 @@ async def aliases( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -95,6 +101,14 @@ async def aliases( :param name: A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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: The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated @@ -112,6 +126,12 @@ async def aliases( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -122,6 +142,8 @@ async def aliases( __path_parts = {} __path = "/_cat/aliases" __query: t.Dict[str, t.Any] = {} + 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: @@ -142,6 +164,8 @@ async def aliases( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -213,6 +237,9 @@ async def allocation( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -227,7 +254,14 @@ async def allocation( :param node_id: A comma-separated list of node identifiers or names used to limit the returned information. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -242,6 +276,12 @@ async def allocation( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -274,6 +314,8 @@ async def allocation( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -291,6 +333,9 @@ async def component_templates( self, *, name: t.Optional[str] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -330,6 +375,9 @@ async def component_templates( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -346,6 +394,14 @@ async def component_templates( :param name: The name of the component template. It accepts wildcard expressions. If it is omitted, all component templates are returned. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -360,6 +416,12 @@ async def component_templates( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -370,6 +432,8 @@ async def component_templates( __path_parts = {} __path = "/_cat/component_templates" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -390,6 +454,8 @@ async def component_templates( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -407,6 +473,9 @@ async def count( self, *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -420,6 +489,9 @@ async def count( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -437,6 +509,14 @@ async def count( :param index: A comma-separated list of data streams, indices, and aliases used to limit the request. It supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -446,6 +526,12 @@ async def count( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -456,6 +542,8 @@ async def count( __path_parts = {} __path = "/_cat/count" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -472,6 +560,8 @@ async def count( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -507,6 +597,9 @@ async def fielddata( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -522,7 +615,14 @@ async def fielddata( :param fields: Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -532,6 +632,12 @@ async def fielddata( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -560,6 +666,8 @@ async def fielddata( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -576,6 +684,9 @@ async def fielddata( async def health( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -652,6 +763,14 @@ async def health( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -661,13 +780,20 @@ async def health( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/health" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1092,7 +1218,14 @@ async def indices( :param index: Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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: The type of index that wildcard patterns can match. :param format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. @@ -1109,7 +1242,12 @@ async def indices( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1166,6 +1304,9 @@ async def indices( async def master( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -1181,6 +1322,9 @@ async def master( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -1193,6 +1337,14 @@ async def master( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -1207,11 +1359,19 @@ async def master( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/master" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1232,6 +1392,8 @@ async def master( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -1374,8 +1536,15 @@ async def ml_data_frame_analytics( :param id: The ID of the data frame analytics to fetch :param allow_no_match: Whether to ignore if a wildcard expression matches no - configs. (This includes `_all` string or when no configs have been specified) - :param bytes: The unit in which to display byte values + configs. (This includes `_all` string or when no configs have been specified.) + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1383,7 +1552,12 @@ async def ml_data_frame_analytics( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1434,6 +1608,9 @@ async def ml_datafeeds( *, datafeed_id: t.Optional[str] = None, allow_no_match: 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, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, @@ -1549,6 +1726,14 @@ async def ml_datafeeds( array when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1556,7 +1741,12 @@ async def ml_datafeeds( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1569,6 +1759,8 @@ async def ml_datafeeds( __query: t.Dict[str, t.Any] = {} if allow_no_match is not None: __query["allow_no_match"] = allow_no_match + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1914,7 +2106,14 @@ async def ml_jobs( array when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1922,7 +2121,12 @@ async def ml_jobs( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2099,7 +2303,14 @@ async def ml_trained_models( when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param from_: Skips the specified number of transforms. @@ -2109,7 +2320,12 @@ async def ml_trained_models( :param s: A comma-separated list of column names or aliases used to sort the response. :param size: The maximum number of transforms to display. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2162,6 +2378,9 @@ async def ml_trained_models( async def nodeattrs( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2189,6 +2408,9 @@ async def nodeattrs( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2201,6 +2423,14 @@ async def nodeattrs( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2215,11 +2445,19 @@ async def nodeattrs( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/nodeattrs" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2240,6 +2478,8 @@ async def nodeattrs( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -2478,7 +2718,14 @@ async def nodes( ``_ - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param full_id: If `true`, return the full node ID. If `false`, return the shortened @@ -2493,7 +2740,12 @@ async def nodes( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} @@ -2541,6 +2793,9 @@ async def nodes( async def pending_tasks( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2578,6 +2833,14 @@ async def pending_tasks( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2592,12 +2855,19 @@ async def pending_tasks( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/pending_tasks" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2636,6 +2906,9 @@ async def pending_tasks( async def plugins( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2659,6 +2932,9 @@ async def plugins( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2671,6 +2947,14 @@ async def plugins( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2686,11 +2970,19 @@ async def plugins( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/plugins" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2713,6 +3005,8 @@ async def plugins( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -2831,7 +3125,14 @@ async def recovery( to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. :param active_only: If `true`, the response only includes ongoing shard recoveries. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 detailed: If `true`, the response includes detailed information about shard recoveries. :param format: Specifies the format to return the columnar data in, can be set @@ -2843,7 +3144,12 @@ async def recovery( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2894,6 +3200,9 @@ async def recovery( async def repositories( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2904,6 +3213,9 @@ async def repositories( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2916,6 +3228,14 @@ async def repositories( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -2929,11 +3249,19 @@ async def repositories( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/repositories" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2954,6 +3282,8 @@ async def repositories( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3029,6 +3359,9 @@ async def segments( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -3045,7 +3378,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 bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3060,6 +3400,12 @@ async def segments( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3092,6 +3438,8 @@ async def segments( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3295,7 +3643,14 @@ async def shards( :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 bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -3305,7 +3660,12 @@ async def shards( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3355,6 +3715,9 @@ async def snapshots( self, *, repository: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3425,6 +3788,14 @@ async def snapshots( :param repository: A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, Elasticsearch returns an error. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3437,7 +3808,12 @@ async def snapshots( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3448,6 +3824,8 @@ async def snapshots( __path_parts = {} __path = "/_cat/snapshots" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3488,6 +3866,9 @@ async def tasks( self, *, actions: t.Optional[t.Sequence[str]] = None, + bytes: t.Optional[ + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] + ] = None, detailed: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -3562,6 +3943,14 @@ async def tasks( ``_ :param actions: The task action names, which are used to limit the response. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 detailed: If `true`, the response includes detailed information about shard recoveries. :param format: Specifies the format to return the columnar data in, can be set @@ -3576,7 +3965,12 @@ async def tasks( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. :param v: When set to `true` will enable verbose output. @@ -3588,6 +3982,8 @@ async def tasks( __query: t.Dict[str, t.Any] = {} if actions is not None: __query["actions"] = actions + if bytes is not None: + __query["bytes"] = bytes if detailed is not None: __query["detailed"] = detailed if error_trace is not None: @@ -3633,6 +4029,9 @@ async def templates( self, *, name: t.Optional[str] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3660,6 +4059,9 @@ async def templates( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -3675,6 +4077,14 @@ async def templates( :param name: The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3689,6 +4099,12 @@ async def templates( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3699,6 +4115,8 @@ async def templates( __path_parts = {} __path = "/_cat/templates" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3719,6 +4137,8 @@ async def templates( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3736,6 +4156,9 @@ async def thread_pool( self, *, thread_pool_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3819,6 +4242,14 @@ async def thread_pool( :param thread_pool_patterns: A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -3832,7 +4263,12 @@ async def thread_pool( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3843,6 +4279,8 @@ async def thread_pool( __path_parts = {} __path = "/_cat/thread_pool" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3885,6 +4323,9 @@ async def transforms( *, transform_id: t.Optional[str] = None, allow_no_match: 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, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, @@ -4084,6 +4525,14 @@ async def transforms( array when there are no matches and the subset of results when there are partial matches. If `false`, the request returns a 404 status code when there are no matches or only partial matches. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param from_: Skips the specified number of transforms. @@ -4093,7 +4542,12 @@ async def transforms( :param s: Comma-separated list of column names or column aliases used to sort the response. :param size: The maximum number of transforms to obtain. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -4106,6 +4560,8 @@ async def transforms( __query: t.Dict[str, t.Any] = {} if allow_no_match is not None: __query["allow_no_match"] = allow_no_match + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: diff --git a/elasticsearch/_async/client/connector.py b/elasticsearch/_async/client/connector.py index 6c4bca043..70e468db7 100644 --- a/elasticsearch/_async/client/connector.py +++ b/elasticsearch/_async/client/connector.py @@ -103,7 +103,7 @@ async def delete( :param connector_id: The unique identifier of the connector to be deleted :param delete_sync_jobs: A flag indicating if associated sync jobs should be - also removed. Defaults to false. + also removed. :param hard: A flag indicating if the connector should be hard deleted. """ if connector_id in SKIP_IN_PATH: @@ -360,7 +360,7 @@ async def list( :param connector_name: A comma-separated list of connector names to fetch connector documents for - :param from_: Starting offset (default: 0) + :param from_: Starting offset :param include_deleted: A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. :param index_name: A comma-separated list of connector index names to fetch connector @@ -955,7 +955,7 @@ async def sync_job_list( ``_ :param connector_id: A connector id to fetch connector sync jobs for - :param from_: Starting offset (default: 0) + :param from_: Starting offset :param job_type: A comma-separated list of job types to fetch the sync jobs for :param size: Specifies a max number of results to get :param status: A sync job status to fetch connector sync jobs for diff --git a/elasticsearch/_async/client/indices.py b/elasticsearch/_async/client/indices.py index c12ec00b0..275341a21 100644 --- a/elasticsearch/_async/client/indices.py +++ b/elasticsearch/_async/client/indices.py @@ -833,7 +833,11 @@ async def create_from( if pretty is not None: __query["pretty"] = pretty __body = create_from if create_from is not None else body - __headers = {"accept": "application/json", "content-type": "application/json"} + if not __body: + __body = None + __headers = {"accept": "application/json"} + if __body is not None: + __headers["content-type"] = "application/json" return await self.perform_request( # type: ignore[return-value] "PUT", __path, @@ -4549,6 +4553,7 @@ async def refresh( For data streams, the API runs the refresh operation on the stream’s backing indices.

By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds. You can change this default interval with the index.refresh_interval setting.

+

In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.

Refresh requests are synchronous and do not return a response until the refresh operation completes.

Refreshes are resource-intensive. To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.

@@ -5414,7 +5419,9 @@ async def shrink( path_parts=__path_parts, ) - @_rewrite_parameters() + @_rewrite_parameters( + body_name="index_template", + ) async def simulate_index_template( self, *, @@ -5425,6 +5432,8 @@ 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, + index_template: t.Optional[t.Mapping[str, t.Any]] = None, + body: t.Optional[t.Mapping[str, t.Any]] = None, master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -5444,12 +5453,19 @@ async def simulate_index_template( only be dry-run added if new or can also replace an existing one :param include_defaults: If true, returns all relevant default configurations for the index template. + :param index_template: :param master_timeout: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for parameter 'name'") + if index_template is None and body is None: + raise ValueError( + "Empty value passed for parameters 'index_template' and 'body', one of them should be set." + ) + elif index_template is not None and body is not None: + raise ValueError("Cannot set both 'index_template' and 'body'") __path_parts: t.Dict[str, str] = {"name": _quote(name)} __path = f'/_index_template/_simulate_index/{__path_parts["name"]}' __query: t.Dict[str, t.Any] = {} @@ -5469,12 +5485,18 @@ async def simulate_index_template( __query["master_timeout"] = master_timeout if pretty is not None: __query["pretty"] = pretty + __body = index_template if index_template is not None else body + if not __body: + __body = None __headers = {"accept": "application/json"} + if __body is not None: + __headers["content-type"] = "application/json" return await self.perform_request( # type: ignore[return-value] "POST", __path, params=__query, headers=__headers, + body=__body, endpoint_id="indices.simulate_index_template", path_parts=__path_parts, ) @@ -5823,8 +5845,8 @@ async def stats( are requested). :param include_unloaded_segments: If true, the response includes information from segments that are not loaded into memory. - :param level: Indicates whether statistics are aggregated at the cluster, index, - or shard level. + :param level: Indicates whether statistics are aggregated at the cluster, indices, + or shards level. """ __path_parts: t.Dict[str, str] if index not in SKIP_IN_PATH and metric not in SKIP_IN_PATH: diff --git a/elasticsearch/_async/client/inference.py b/elasticsearch/_async/client/inference.py index 621156307..333d3f5f9 100644 --- a/elasticsearch/_async/client/inference.py +++ b/elasticsearch/_async/client/inference.py @@ -2504,7 +2504,7 @@ async def sparse_embedding( ) @_rewrite_parameters( - body_fields=("input", "task_settings"), + body_fields=("input", "input_type", "task_settings"), ) async def text_embedding( self, @@ -2514,6 +2514,7 @@ async def text_embedding( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, + input_type: t.Optional[str] = None, pretty: t.Optional[bool] = None, task_settings: t.Optional[t.Any] = None, timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, @@ -2529,6 +2530,13 @@ async def text_embedding( :param inference_id: The inference Id :param input: Inference input. Either a string or an array of strings. + :param input_type: The input data type for the text embedding model. Possible + values include: * `SEARCH` * `INGEST` * `CLASSIFICATION` * `CLUSTERING` Not + all services support all values. Unsupported values will trigger a validation + exception. Accepted values depend on the configured inference service, refer + to the relevant service-specific documentation for more info. > info > The + `input_type` parameter specified on the root level of the request body will + take precedence over the `input_type` parameter specified in `task_settings`. :param task_settings: Optional task settings :param timeout: Specifies the amount of time to wait for the inference request to complete. @@ -2554,6 +2562,8 @@ async def text_embedding( if not __body: if input is not None: __body["input"] = input + if input_type is not None: + __body["input_type"] = input_type if task_settings is not None: __body["task_settings"] = task_settings if not __body: diff --git a/elasticsearch/_async/client/logstash.py b/elasticsearch/_async/client/logstash.py index c63983710..c724911dc 100644 --- a/elasticsearch/_async/client/logstash.py +++ b/elasticsearch/_async/client/logstash.py @@ -141,7 +141,9 @@ async def put_pipeline( ``_ - :param id: An identifier for the pipeline. + :param id: An identifier for the pipeline. Pipeline IDs must begin with a letter + or underscore and contain only letters, underscores, dashes, hyphens and + numbers. :param pipeline: """ if id in SKIP_IN_PATH: diff --git a/elasticsearch/_async/client/nodes.py b/elasticsearch/_async/client/nodes.py index 1b007e7cb..1945501ee 100644 --- a/elasticsearch/_async/client/nodes.py +++ b/elasticsearch/_async/client/nodes.py @@ -404,8 +404,8 @@ async def stats( are requested). :param include_unloaded_segments: If `true`, the response includes information from segments that are not loaded into memory. - :param level: Indicates whether statistics are aggregated at the cluster, index, - or shard level. + :param level: Indicates whether statistics are aggregated at the node, indices, + or shards level. :param timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. :param types: A comma-separated list of document types for the indexing index diff --git a/elasticsearch/_async/client/shutdown.py b/elasticsearch/_async/client/shutdown.py index 5dbc33e92..9502d1fe6 100644 --- a/elasticsearch/_async/client/shutdown.py +++ b/elasticsearch/_async/client/shutdown.py @@ -33,13 +33,9 @@ async def delete_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ .. raw:: html @@ -97,9 +93,7 @@ async def get_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -162,14 +156,10 @@ async def put_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, target_node_name: t.Optional[str] = None, - timeout: t.Optional[ - t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = 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]: """ diff --git a/elasticsearch/_async/client/streams.py b/elasticsearch/_async/client/streams.py new file mode 100644 index 000000000..d083c6301 --- /dev/null +++ b/elasticsearch/_async/client/streams.py @@ -0,0 +1,174 @@ +# 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. + +class C: + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + async def logs_disable( + self, + *, + 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[str, t.Literal[-1], t.Literal[0]]] = None, + pretty: t.Optional[bool] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, + ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: + """ + .. raw:: html + +

Disable logs stream.

+

Turn off the logs stream feature for this cluster.

+ + + ``_ + + :param master_timeout: The period to wait for a connection to the master node. + If no response is received before the timeout expires, the request fails + and returns an error. + :param timeout: The period to wait for a response. If no response is received + before the timeout expires, the request fails and returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/logs/_disable" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + if timeout is not None: + __query["timeout"] = timeout + __headers = {"accept": "application/json,text/plain"} + return await self.perform_request( # type: ignore[return-value] + "POST", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.logs_disable", + path_parts=__path_parts, + ) + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + async def logs_enable( + self, + *, + 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[str, t.Literal[-1], t.Literal[0]]] = None, + pretty: t.Optional[bool] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, + ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: + """ + .. raw:: html + +

Enable logs stream.

+

Turn on the logs stream feature for this cluster.

+

NOTE: To protect existing data, this feature can be turned on only if the + cluster does not have existing indices or data streams that match the pattern logs|logs.*. + If those indices or data streams exist, a 409 - Conflict response and error is returned.

+ + + ``_ + + :param master_timeout: The period to wait for a connection to the master node. + If no response is received before the timeout expires, the request fails + and returns an error. + :param timeout: The period to wait for a response. If no response is received + before the timeout expires, the request fails and returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/logs/_enable" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + if timeout is not None: + __query["timeout"] = timeout + __headers = {"accept": "application/json,text/plain"} + return await self.perform_request( # type: ignore[return-value] + "POST", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.logs_enable", + path_parts=__path_parts, + ) + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + async def status( + self, + *, + 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, + pretty: t.Optional[bool] = None, + ) -> ObjectApiResponse[t.Any]: + """ + .. raw:: html + +

Get the status of streams.

+

Get the current status for all types of streams.

+ + + ``_ + + :param master_timeout: Period to wait for a connection to the master node. If + no response is received before the timeout expires, the request fails and + returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/status" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + __headers = {"accept": "application/json"} + return await self.perform_request( # type: ignore[return-value] + "GET", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.status", + path_parts=__path_parts, + ) diff --git a/elasticsearch/_async/client/watcher.py b/elasticsearch/_async/client/watcher.py index e0b7b39ec..8558b9920 100644 --- a/elasticsearch/_async/client/watcher.py +++ b/elasticsearch/_async/client/watcher.py @@ -552,11 +552,7 @@ async def put_watch( __body["transform"] = transform if trigger is not None: __body["trigger"] = trigger - if not __body: - __body = None # type: ignore[assignment] - __headers = {"accept": "application/json"} - if __body is not None: - __headers["content-type"] = "application/json" + __headers = {"accept": "application/json", "content-type": "application/json"} return await self.perform_request( # type: ignore[return-value] "PUT", __path, diff --git a/elasticsearch/_sync/client/cat.py b/elasticsearch/_sync/client/cat.py index 5349a32ec..46b6820ae 100644 --- a/elasticsearch/_sync/client/cat.py +++ b/elasticsearch/_sync/client/cat.py @@ -36,6 +36,9 @@ def aliases( self, *, name: t.Optional[t.Union[str, t.Sequence[str]]] = 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[ @@ -80,6 +83,9 @@ def aliases( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -95,6 +101,14 @@ def aliases( :param name: A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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: The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated @@ -112,6 +126,12 @@ def aliases( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -122,6 +142,8 @@ def aliases( __path_parts = {} __path = "/_cat/aliases" __query: t.Dict[str, t.Any] = {} + 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: @@ -142,6 +164,8 @@ def aliases( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -213,6 +237,9 @@ def allocation( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -227,7 +254,14 @@ def allocation( :param node_id: A comma-separated list of node identifiers or names used to limit the returned information. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -242,6 +276,12 @@ def allocation( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -274,6 +314,8 @@ def allocation( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -291,6 +333,9 @@ def component_templates( self, *, name: t.Optional[str] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -330,6 +375,9 @@ def component_templates( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -346,6 +394,14 @@ def component_templates( :param name: The name of the component template. It accepts wildcard expressions. If it is omitted, all component templates are returned. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -360,6 +416,12 @@ def component_templates( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -370,6 +432,8 @@ def component_templates( __path_parts = {} __path = "/_cat/component_templates" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -390,6 +454,8 @@ def component_templates( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -407,6 +473,9 @@ def count( self, *, index: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -420,6 +489,9 @@ def count( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -437,6 +509,14 @@ def count( :param index: A comma-separated list of data streams, indices, and aliases used to limit the request. It supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -446,6 +526,12 @@ def count( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -456,6 +542,8 @@ def count( __path_parts = {} __path = "/_cat/count" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -472,6 +560,8 @@ def count( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -507,6 +597,9 @@ def fielddata( human: t.Optional[bool] = None, pretty: t.Optional[bool] = None, s: t.Optional[t.Union[str, t.Sequence[str]]] = None, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -522,7 +615,14 @@ def fielddata( :param fields: Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -532,6 +632,12 @@ def fielddata( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -560,6 +666,8 @@ def fielddata( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -576,6 +684,9 @@ def fielddata( def health( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -652,6 +763,14 @@ def health( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -661,13 +780,20 @@ def health( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/health" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1092,7 +1218,14 @@ def indices( :param index: Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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: The type of index that wildcard patterns can match. :param format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. @@ -1109,7 +1242,12 @@ def indices( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1166,6 +1304,9 @@ def indices( def master( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -1181,6 +1322,9 @@ def master( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -1193,6 +1337,14 @@ def master( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -1207,11 +1359,19 @@ def master( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/master" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1232,6 +1392,8 @@ def master( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -1374,8 +1536,15 @@ def ml_data_frame_analytics( :param id: The ID of the data frame analytics to fetch :param allow_no_match: Whether to ignore if a wildcard expression matches no - configs. (This includes `_all` string or when no configs have been specified) - :param bytes: The unit in which to display byte values + configs. (This includes `_all` string or when no configs have been specified.) + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1383,7 +1552,12 @@ def ml_data_frame_analytics( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1434,6 +1608,9 @@ def ml_datafeeds( *, datafeed_id: t.Optional[str] = None, allow_no_match: 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, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, @@ -1549,6 +1726,14 @@ def ml_datafeeds( array when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1556,7 +1741,12 @@ def ml_datafeeds( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -1569,6 +1759,8 @@ def ml_datafeeds( __query: t.Dict[str, t.Any] = {} if allow_no_match is not None: __query["allow_no_match"] = allow_no_match + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -1914,7 +2106,14 @@ def ml_jobs( array when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: Comma-separated list of column names to display. @@ -1922,7 +2121,12 @@ def ml_jobs( be combined with any other query string option. :param s: Comma-separated list of column names or column aliases used to sort the response. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2099,7 +2303,14 @@ def ml_trained_models( when there are no matches and the subset of results when there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial matches. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param from_: Skips the specified number of transforms. @@ -2109,7 +2320,12 @@ def ml_trained_models( :param s: A comma-separated list of column names or aliases used to sort the response. :param size: The maximum number of transforms to display. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2162,6 +2378,9 @@ def ml_trained_models( def nodeattrs( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2189,6 +2408,9 @@ def nodeattrs( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2201,6 +2423,14 @@ def nodeattrs( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2215,11 +2445,19 @@ def nodeattrs( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/nodeattrs" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2240,6 +2478,8 @@ def nodeattrs( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -2478,7 +2718,14 @@ def nodes( ``_ - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param full_id: If `true`, return the full node ID. If `false`, return the shortened @@ -2493,7 +2740,12 @@ def nodes( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} @@ -2541,6 +2793,9 @@ def nodes( def pending_tasks( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2578,6 +2833,14 @@ def pending_tasks( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2592,12 +2855,19 @@ def pending_tasks( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/pending_tasks" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2636,6 +2906,9 @@ def pending_tasks( def plugins( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2659,6 +2932,9 @@ def plugins( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2671,6 +2947,14 @@ def plugins( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -2686,11 +2970,19 @@ def plugins( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/plugins" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2713,6 +3005,8 @@ def plugins( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -2831,7 +3125,14 @@ def recovery( to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. :param active_only: If `true`, the response only includes ongoing shard recoveries. - :param bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 detailed: If `true`, the response includes detailed information about shard recoveries. :param format: Specifies the format to return the columnar data in, can be set @@ -2843,7 +3144,12 @@ def recovery( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -2894,6 +3200,9 @@ def recovery( def repositories( self, *, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -2904,6 +3213,9 @@ def repositories( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -2916,6 +3228,14 @@ def repositories( ``_ + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -2929,11 +3249,19 @@ def repositories( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] = {} __path = "/_cat/repositories" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -2954,6 +3282,8 @@ def repositories( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3029,6 +3359,9 @@ def segments( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -3045,7 +3378,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 bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3060,6 +3400,12 @@ def segments( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3092,6 +3438,8 @@ def segments( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3295,7 +3643,14 @@ def shards( :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 bytes: The unit used to display byte values. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -3305,7 +3660,12 @@ def shards( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3355,6 +3715,9 @@ def snapshots( self, *, repository: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3425,6 +3788,14 @@ def snapshots( :param repository: A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, Elasticsearch returns an error. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3437,7 +3808,12 @@ def snapshots( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3448,6 +3824,8 @@ def snapshots( __path_parts = {} __path = "/_cat/snapshots" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3488,6 +3866,9 @@ def tasks( self, *, actions: t.Optional[t.Sequence[str]] = None, + bytes: t.Optional[ + t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]] + ] = None, detailed: t.Optional[bool] = None, error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, @@ -3562,6 +3943,14 @@ def tasks( ``_ :param actions: The task action names, which are used to limit the response. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 detailed: If `true`, the response includes detailed information about shard recoveries. :param format: Specifies the format to return the columnar data in, can be set @@ -3576,7 +3965,12 @@ def tasks( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: Unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. :param v: When set to `true` will enable verbose output. @@ -3588,6 +3982,8 @@ def tasks( __query: t.Dict[str, t.Any] = {} if actions is not None: __query["actions"] = actions + if bytes is not None: + __query["bytes"] = bytes if detailed is not None: __query["detailed"] = detailed if error_trace is not None: @@ -3633,6 +4029,9 @@ def templates( self, *, name: t.Optional[str] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3660,6 +4059,9 @@ def templates( 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, + time: t.Optional[ + t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, v: t.Optional[bool] = None, ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: """ @@ -3675,6 +4077,14 @@ def templates( :param name: The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 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 @@ -3689,6 +4099,12 @@ def templates( :param s: List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3699,6 +4115,8 @@ def templates( __path_parts = {} __path = "/_cat/templates" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3719,6 +4137,8 @@ def templates( __query["pretty"] = pretty if s is not None: __query["s"] = s + if time is not None: + __query["time"] = time if v is not None: __query["v"] = v __headers = {"accept": "text/plain,application/json"} @@ -3736,6 +4156,9 @@ def thread_pool( self, *, thread_pool_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None, + bytes: t.Optional[ + 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, format: t.Optional[str] = None, @@ -3819,6 +4242,14 @@ def thread_pool( :param thread_pool_patterns: A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param h: List of columns to appear in the response. Supports simple wildcards. @@ -3832,7 +4263,12 @@ def thread_pool( :param s: A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -3843,6 +4279,8 @@ def thread_pool( __path_parts = {} __path = "/_cat/thread_pool" __query: t.Dict[str, t.Any] = {} + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: @@ -3885,6 +4323,9 @@ def transforms( *, transform_id: t.Optional[str] = None, allow_no_match: 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, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, format: t.Optional[str] = None, @@ -4084,6 +4525,14 @@ def transforms( array when there are no matches and the subset of results when there are partial matches. If `false`, the request returns a 404 status code when there are no matches or only partial matches. + :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 + rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the + numeric value of the column is as small as possible whilst still being at + 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 format: Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. :param from_: Skips the specified number of transforms. @@ -4093,7 +4542,12 @@ def transforms( :param s: Comma-separated list of column names or column aliases used to sort the response. :param size: The maximum number of transforms to obtain. - :param time: The unit used to display time values. + :param time: Sets the units for columns that contain a time duration. If omitted, + time duration values are rendered with a suffix such as `ms`, `s`, `m` or + `h`, chosen such that the numeric value of the column is as small as possible + whilst still being at least `1.0`. If given, time duration values are rendered + as an integer with no suffix. Values that are not an exact multiple of the + chosen unit are rounded down. :param v: When set to `true` will enable verbose output. """ __path_parts: t.Dict[str, str] @@ -4106,6 +4560,8 @@ def transforms( __query: t.Dict[str, t.Any] = {} if allow_no_match is not None: __query["allow_no_match"] = allow_no_match + if bytes is not None: + __query["bytes"] = bytes if error_trace is not None: __query["error_trace"] = error_trace if filter_path is not None: diff --git a/elasticsearch/_sync/client/connector.py b/elasticsearch/_sync/client/connector.py index 58771108a..c28a4c823 100644 --- a/elasticsearch/_sync/client/connector.py +++ b/elasticsearch/_sync/client/connector.py @@ -103,7 +103,7 @@ def delete( :param connector_id: The unique identifier of the connector to be deleted :param delete_sync_jobs: A flag indicating if associated sync jobs should be - also removed. Defaults to false. + also removed. :param hard: A flag indicating if the connector should be hard deleted. """ if connector_id in SKIP_IN_PATH: @@ -360,7 +360,7 @@ def list( :param connector_name: A comma-separated list of connector names to fetch connector documents for - :param from_: Starting offset (default: 0) + :param from_: Starting offset :param include_deleted: A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. :param index_name: A comma-separated list of connector index names to fetch connector @@ -955,7 +955,7 @@ def sync_job_list( ``_ :param connector_id: A connector id to fetch connector sync jobs for - :param from_: Starting offset (default: 0) + :param from_: Starting offset :param job_type: A comma-separated list of job types to fetch the sync jobs for :param size: Specifies a max number of results to get :param status: A sync job status to fetch connector sync jobs for diff --git a/elasticsearch/_sync/client/indices.py b/elasticsearch/_sync/client/indices.py index 26ca08f14..3ffb87699 100644 --- a/elasticsearch/_sync/client/indices.py +++ b/elasticsearch/_sync/client/indices.py @@ -833,7 +833,11 @@ def create_from( if pretty is not None: __query["pretty"] = pretty __body = create_from if create_from is not None else body - __headers = {"accept": "application/json", "content-type": "application/json"} + if not __body: + __body = None + __headers = {"accept": "application/json"} + if __body is not None: + __headers["content-type"] = "application/json" return self.perform_request( # type: ignore[return-value] "PUT", __path, @@ -4549,6 +4553,7 @@ def refresh( For data streams, the API runs the refresh operation on the stream’s backing indices.

By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds. You can change this default interval with the index.refresh_interval setting.

+

In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.

Refresh requests are synchronous and do not return a response until the refresh operation completes.

Refreshes are resource-intensive. To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.

@@ -5414,7 +5419,9 @@ def shrink( path_parts=__path_parts, ) - @_rewrite_parameters() + @_rewrite_parameters( + body_name="index_template", + ) def simulate_index_template( self, *, @@ -5425,6 +5432,8 @@ 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, + index_template: t.Optional[t.Mapping[str, t.Any]] = None, + body: t.Optional[t.Mapping[str, t.Any]] = None, master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: @@ -5444,12 +5453,19 @@ def simulate_index_template( only be dry-run added if new or can also replace an existing one :param include_defaults: If true, returns all relevant default configurations for the index template. + :param index_template: :param master_timeout: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for parameter 'name'") + if index_template is None and body is None: + raise ValueError( + "Empty value passed for parameters 'index_template' and 'body', one of them should be set." + ) + elif index_template is not None and body is not None: + raise ValueError("Cannot set both 'index_template' and 'body'") __path_parts: t.Dict[str, str] = {"name": _quote(name)} __path = f'/_index_template/_simulate_index/{__path_parts["name"]}' __query: t.Dict[str, t.Any] = {} @@ -5469,12 +5485,18 @@ def simulate_index_template( __query["master_timeout"] = master_timeout if pretty is not None: __query["pretty"] = pretty + __body = index_template if index_template is not None else body + if not __body: + __body = None __headers = {"accept": "application/json"} + if __body is not None: + __headers["content-type"] = "application/json" return self.perform_request( # type: ignore[return-value] "POST", __path, params=__query, headers=__headers, + body=__body, endpoint_id="indices.simulate_index_template", path_parts=__path_parts, ) @@ -5823,8 +5845,8 @@ def stats( are requested). :param include_unloaded_segments: If true, the response includes information from segments that are not loaded into memory. - :param level: Indicates whether statistics are aggregated at the cluster, index, - or shard level. + :param level: Indicates whether statistics are aggregated at the cluster, indices, + or shards level. """ __path_parts: t.Dict[str, str] if index not in SKIP_IN_PATH and metric not in SKIP_IN_PATH: diff --git a/elasticsearch/_sync/client/inference.py b/elasticsearch/_sync/client/inference.py index eb430506c..448147133 100644 --- a/elasticsearch/_sync/client/inference.py +++ b/elasticsearch/_sync/client/inference.py @@ -2504,7 +2504,7 @@ def sparse_embedding( ) @_rewrite_parameters( - body_fields=("input", "task_settings"), + body_fields=("input", "input_type", "task_settings"), ) def text_embedding( self, @@ -2514,6 +2514,7 @@ def text_embedding( error_trace: t.Optional[bool] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, human: t.Optional[bool] = None, + input_type: t.Optional[str] = None, pretty: t.Optional[bool] = None, task_settings: t.Optional[t.Any] = None, timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, @@ -2529,6 +2530,13 @@ def text_embedding( :param inference_id: The inference Id :param input: Inference input. Either a string or an array of strings. + :param input_type: The input data type for the text embedding model. Possible + values include: * `SEARCH` * `INGEST` * `CLASSIFICATION` * `CLUSTERING` Not + all services support all values. Unsupported values will trigger a validation + exception. Accepted values depend on the configured inference service, refer + to the relevant service-specific documentation for more info. > info > The + `input_type` parameter specified on the root level of the request body will + take precedence over the `input_type` parameter specified in `task_settings`. :param task_settings: Optional task settings :param timeout: Specifies the amount of time to wait for the inference request to complete. @@ -2554,6 +2562,8 @@ def text_embedding( if not __body: if input is not None: __body["input"] = input + if input_type is not None: + __body["input_type"] = input_type if task_settings is not None: __body["task_settings"] = task_settings if not __body: diff --git a/elasticsearch/_sync/client/logstash.py b/elasticsearch/_sync/client/logstash.py index f8abefa14..ae8e2a1dc 100644 --- a/elasticsearch/_sync/client/logstash.py +++ b/elasticsearch/_sync/client/logstash.py @@ -141,7 +141,9 @@ def put_pipeline( ``_ - :param id: An identifier for the pipeline. + :param id: An identifier for the pipeline. Pipeline IDs must begin with a letter + or underscore and contain only letters, underscores, dashes, hyphens and + numbers. :param pipeline: """ if id in SKIP_IN_PATH: diff --git a/elasticsearch/_sync/client/nodes.py b/elasticsearch/_sync/client/nodes.py index ef6c67b10..242c443a4 100644 --- a/elasticsearch/_sync/client/nodes.py +++ b/elasticsearch/_sync/client/nodes.py @@ -404,8 +404,8 @@ def stats( are requested). :param include_unloaded_segments: If `true`, the response includes information from segments that are not loaded into memory. - :param level: Indicates whether statistics are aggregated at the cluster, index, - or shard level. + :param level: Indicates whether statistics are aggregated at the node, indices, + or shards level. :param timeout: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. :param types: A comma-separated list of document types for the indexing index diff --git a/elasticsearch/_sync/client/shutdown.py b/elasticsearch/_sync/client/shutdown.py index d7ec41511..28b360ca3 100644 --- a/elasticsearch/_sync/client/shutdown.py +++ b/elasticsearch/_sync/client/shutdown.py @@ -33,13 +33,9 @@ def delete_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, ) -> ObjectApiResponse[t.Any]: """ .. raw:: html @@ -97,9 +93,7 @@ def get_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, ) -> ObjectApiResponse[t.Any]: """ @@ -162,14 +156,10 @@ def put_node( 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = None, + master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, pretty: t.Optional[bool] = None, target_node_name: t.Optional[str] = None, - timeout: t.Optional[ - t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] - ] = 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]: """ diff --git a/elasticsearch/_sync/client/streams.py b/elasticsearch/_sync/client/streams.py new file mode 100644 index 000000000..a0fc6f4e8 --- /dev/null +++ b/elasticsearch/_sync/client/streams.py @@ -0,0 +1,174 @@ +# 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. + +class C: + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + def logs_disable( + self, + *, + 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[str, t.Literal[-1], t.Literal[0]]] = None, + pretty: t.Optional[bool] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, + ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: + """ + .. raw:: html + +

Disable logs stream.

+

Turn off the logs stream feature for this cluster.

+ + + ``_ + + :param master_timeout: The period to wait for a connection to the master node. + If no response is received before the timeout expires, the request fails + and returns an error. + :param timeout: The period to wait for a response. If no response is received + before the timeout expires, the request fails and returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/logs/_disable" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + if timeout is not None: + __query["timeout"] = timeout + __headers = {"accept": "application/json,text/plain"} + return self.perform_request( # type: ignore[return-value] + "POST", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.logs_disable", + path_parts=__path_parts, + ) + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + def logs_enable( + self, + *, + 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[str, t.Literal[-1], t.Literal[0]]] = None, + pretty: t.Optional[bool] = None, + timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None, + ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]: + """ + .. raw:: html + +

Enable logs stream.

+

Turn on the logs stream feature for this cluster.

+

NOTE: To protect existing data, this feature can be turned on only if the + cluster does not have existing indices or data streams that match the pattern logs|logs.*. + If those indices or data streams exist, a 409 - Conflict response and error is returned.

+ + + ``_ + + :param master_timeout: The period to wait for a connection to the master node. + If no response is received before the timeout expires, the request fails + and returns an error. + :param timeout: The period to wait for a response. If no response is received + before the timeout expires, the request fails and returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/logs/_enable" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + if timeout is not None: + __query["timeout"] = timeout + __headers = {"accept": "application/json,text/plain"} + return self.perform_request( # type: ignore[return-value] + "POST", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.logs_enable", + path_parts=__path_parts, + ) + + @_rewrite_parameters() + @_stability_warning(Stability.EXPERIMENTAL) + def status( + self, + *, + 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[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]] + ] = None, + pretty: t.Optional[bool] = None, + ) -> ObjectApiResponse[t.Any]: + """ + .. raw:: html + +

Get the status of streams.

+

Get the current status for all types of streams.

+ + + ``_ + + :param master_timeout: Period to wait for a connection to the master node. If + no response is received before the timeout expires, the request fails and + returns an error. + """ + __path_parts: t.Dict[str, str] = {} + __path = "/_streams/status" + __query: t.Dict[str, t.Any] = {} + if error_trace is not None: + __query["error_trace"] = error_trace + if filter_path is not None: + __query["filter_path"] = filter_path + if human is not None: + __query["human"] = human + if master_timeout is not None: + __query["master_timeout"] = master_timeout + if pretty is not None: + __query["pretty"] = pretty + __headers = {"accept": "application/json"} + return self.perform_request( # type: ignore[return-value] + "GET", + __path, + params=__query, + headers=__headers, + endpoint_id="streams.status", + path_parts=__path_parts, + ) diff --git a/elasticsearch/_sync/client/watcher.py b/elasticsearch/_sync/client/watcher.py index 9839cb80b..d14f8481d 100644 --- a/elasticsearch/_sync/client/watcher.py +++ b/elasticsearch/_sync/client/watcher.py @@ -552,11 +552,7 @@ def put_watch( __body["transform"] = transform if trigger is not None: __body["trigger"] = trigger - if not __body: - __body = None # type: ignore[assignment] - __headers = {"accept": "application/json"} - if __body is not None: - __headers["content-type"] = "application/json" + __headers = {"accept": "application/json", "content-type": "application/json"} return self.perform_request( # type: ignore[return-value] "PUT", __path, diff --git a/elasticsearch/dsl/aggs.py b/elasticsearch/dsl/aggs.py index 802d6eca0..2a6b2ff91 100644 --- a/elasticsearch/dsl/aggs.py +++ b/elasticsearch/dsl/aggs.py @@ -653,6 +653,54 @@ def __init__( ) +class CartesianBounds(Agg[_R]): + """ + A metric aggregation that computes the spatial bounding box containing + all values for a Point or Shape field. + + :arg field: The field on which to run the aggregation. + :arg missing: The value to apply to documents that do not have a + value. By default, documents without a value are ignored. + :arg script: + """ + + name = "cartesian_bounds" + + def __init__( + self, + *, + field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT, + missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT, + script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT, + **kwargs: Any, + ): + super().__init__(field=field, missing=missing, script=script, **kwargs) + + +class CartesianCentroid(Agg[_R]): + """ + A metric aggregation that computes the weighted centroid from all + coordinate values for point and shape fields. + + :arg field: The field on which to run the aggregation. + :arg missing: The value to apply to documents that do not have a + value. By default, documents without a value are ignored. + :arg script: + """ + + name = "cartesian_centroid" + + def __init__( + self, + *, + field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT, + missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT, + script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT, + **kwargs: Any, + ): + super().__init__(field=field, missing=missing, script=script, **kwargs) + + class CategorizeText(Bucket[_R]): """ A multi-bucket aggregation that groups semi-structured text into @@ -735,6 +783,43 @@ def __init__( ) +class ChangePoint(Pipeline[_R]): + """ + A sibling pipeline that detects, spikes, dips, and change points in a + metric. Given a distribution of values provided by the sibling multi- + bucket aggregation, this aggregation indicates the bucket of any spike + or dip and/or the bucket at which the largest change in the + distribution of values, if they are statistically significant. There + must be at least 22 bucketed values. Fewer than 1,000 is preferred. + + :arg format: `DecimalFormat` pattern for the output value. If + specified, the formatted value is returned in the aggregation’s + `value_as_string` property. + :arg gap_policy: Policy to apply when gaps are found in the data. + Defaults to `skip` if omitted. + :arg buckets_path: Path to the buckets that contain one set of values + to correlate. + """ + + name = "change_point" + + def __init__( + self, + *, + format: Union[str, "DefaultType"] = DEFAULT, + gap_policy: Union[ + Literal["skip", "insert_zeros", "keep_values"], "DefaultType" + ] = DEFAULT, + buckets_path: Union[ + str, Sequence[str], Mapping[str, str], "DefaultType" + ] = DEFAULT, + **kwargs: Any, + ): + super().__init__( + format=format, gap_policy=gap_policy, buckets_path=buckets_path, **kwargs + ) + + class Children(Bucket[_R]): """ A single bucket aggregation that selects child documents that have the @@ -2980,6 +3065,14 @@ class SignificantTerms(Bucket[_R]): the foreground sample with a term divided by the number of documents in the background with the term. :arg script_heuristic: Customized score, implemented via a script. + :arg p_value: Significant terms heuristic that calculates the p-value + between the term existing in foreground and background sets. The + p-value is the probability of obtaining test results at least as + extreme as the results actually observed, under the assumption + that the null hypothesis is correct. The p-value is calculated + assuming that the foreground set and the background set are + independent https://en.wikipedia.org/wiki/Bernoulli_trial, with + the null hypothesis that the probabilities are the same. :arg shard_min_doc_count: Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the `min_doc_count`. Terms will only be considered if @@ -3033,6 +3126,9 @@ def __init__( script_heuristic: Union[ "types.ScriptedHeuristic", Dict[str, Any], "DefaultType" ] = DEFAULT, + p_value: Union[ + "types.PValueHeuristic", Dict[str, Any], "DefaultType" + ] = DEFAULT, shard_min_doc_count: Union[int, "DefaultType"] = DEFAULT, shard_size: Union[int, "DefaultType"] = DEFAULT, size: Union[int, "DefaultType"] = DEFAULT, @@ -3051,6 +3147,7 @@ def __init__( mutual_information=mutual_information, percentage=percentage, script_heuristic=script_heuristic, + p_value=p_value, shard_min_doc_count=shard_min_doc_count, shard_size=shard_size, size=size, diff --git a/elasticsearch/dsl/field.py b/elasticsearch/dsl/field.py index 3f71f76eb..c1e309d8c 100644 --- a/elasticsearch/dsl/field.py +++ b/elasticsearch/dsl/field.py @@ -3871,9 +3871,13 @@ class SemanticText(Field): sent in the inference endpoint associated with inference_id. If chunking settings are updated, they will not be applied to existing documents until they are reindexed. + :arg fields: """ name = "semantic_text" + _param_defs = { + "fields": {"type": "field", "hash": True}, + } def __init__( self, @@ -3884,6 +3888,7 @@ def __init__( chunking_settings: Union[ "types.ChunkingSettings", Dict[str, Any], "DefaultType" ] = DEFAULT, + fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT, **kwargs: Any, ): if meta is not DEFAULT: @@ -3894,6 +3899,8 @@ def __init__( kwargs["search_inference_id"] = search_inference_id if chunking_settings is not DEFAULT: kwargs["chunking_settings"] = chunking_settings + if fields is not DEFAULT: + kwargs["fields"] = fields super().__init__(*args, **kwargs) diff --git a/elasticsearch/dsl/response/__init__.py b/elasticsearch/dsl/response/__init__.py index 712cda27b..b58464e16 100644 --- a/elasticsearch/dsl/response/__init__.py +++ b/elasticsearch/dsl/response/__init__.py @@ -233,10 +233,13 @@ def search_after(self) -> "SearchBase[_R]": "types.SimpleValueAggregate", "types.DerivativeAggregate", "types.BucketMetricValueAggregate", + "types.ChangePointAggregate", "types.StatsAggregate", "types.StatsBucketAggregate", "types.ExtendedStatsAggregate", "types.ExtendedStatsBucketAggregate", + "types.CartesianBoundsAggregate", + "types.CartesianCentroidAggregate", "types.GeoBoundsAggregate", "types.GeoCentroidAggregate", "types.HistogramAggregate", diff --git a/elasticsearch/dsl/types.py b/elasticsearch/dsl/types.py index 534521437..5d518c9d2 100644 --- a/elasticsearch/dsl/types.py +++ b/elasticsearch/dsl/types.py @@ -2774,6 +2774,31 @@ def __init__( super().__init__(kwargs) +class PValueHeuristic(AttrDict[Any]): + """ + :arg background_is_superset: + :arg normalize_above: Should the results be normalized when above the + given value. Allows for consistent significance results at various + scales. Note: `0` is a special value which means no normalization + """ + + background_is_superset: Union[bool, DefaultType] + normalize_above: Union[int, DefaultType] + + def __init__( + self, + *, + background_is_superset: Union[bool, DefaultType] = DEFAULT, + normalize_above: Union[int, DefaultType] = DEFAULT, + **kwargs: Any, + ): + if background_is_superset is not DEFAULT: + kwargs["background_is_superset"] = background_is_superset + if normalize_above is not DEFAULT: + kwargs["normalize_above"] = normalize_above + super().__init__(kwargs) + + class PercentageScoreHeuristic(AttrDict[Any]): pass @@ -4009,24 +4034,25 @@ def __init__( class TextEmbedding(AttrDict[Any]): """ - :arg model_id: (required) :arg model_text: (required) + :arg model_id: Model ID is required for all dense_vector fields but + may be inferred for semantic_text fields """ - model_id: Union[str, DefaultType] model_text: Union[str, DefaultType] + model_id: Union[str, DefaultType] def __init__( self, *, - model_id: Union[str, DefaultType] = DEFAULT, model_text: Union[str, DefaultType] = DEFAULT, + model_id: Union[str, DefaultType] = DEFAULT, **kwargs: Any, ): - if model_id is not DEFAULT: - kwargs["model_id"] = model_id if model_text is not DEFAULT: kwargs["model_text"] = model_text + if model_id is not DEFAULT: + kwargs["model_id"] = model_id super().__init__(kwargs) @@ -4659,6 +4685,82 @@ class CardinalityAggregate(AttrDict[Any]): meta: Mapping[str, Any] +class CartesianBoundsAggregate(AttrDict[Any]): + """ + :arg bounds: + :arg meta: + """ + + bounds: "TopLeftBottomRightGeoBounds" + meta: Mapping[str, Any] + + +class CartesianCentroidAggregate(AttrDict[Any]): + """ + :arg count: (required) + :arg location: + :arg meta: + """ + + count: int + location: "CartesianPoint" + meta: Mapping[str, Any] + + +class CartesianPoint(AttrDict[Any]): + """ + :arg x: (required) + :arg y: (required) + """ + + x: float + y: float + + +class ChangePointAggregate(AttrDict[Any]): + """ + :arg type: (required) + :arg bucket: + :arg meta: + """ + + type: "ChangeType" + bucket: "ChangePointBucket" + meta: Mapping[str, Any] + + +class ChangePointBucket(AttrDict[Any]): + """ + :arg key: (required) + :arg doc_count: (required) + """ + + key: Union[int, float, str, bool, None] + doc_count: int + + +class ChangeType(AttrDict[Any]): + """ + :arg dip: + :arg distribution_change: + :arg indeterminable: + :arg non_stationary: + :arg spike: + :arg stationary: + :arg step_change: + :arg trend_change: + """ + + dip: "Dip" + distribution_change: "DistributionChange" + indeterminable: "Indeterminable" + non_stationary: "NonStationary" + spike: "Spike" + stationary: "Stationary" + step_change: "StepChange" + trend_change: "TrendChange" + + class ChildrenAggregate(AttrDict[Any]): """ :arg doc_count: (required) @@ -4936,6 +5038,26 @@ class DfsStatisticsProfile(AttrDict[Any]): children: Sequence["DfsStatisticsProfile"] +class Dip(AttrDict[Any]): + """ + :arg p_value: (required) + :arg change_point: (required) + """ + + p_value: float + change_point: int + + +class DistributionChange(AttrDict[Any]): + """ + :arg p_value: (required) + :arg change_point: (required) + """ + + p_value: float + change_point: int + + class DoubleTermsAggregate(AttrDict[Any]): """ Result of a `terms` aggregation when the field is some kind of decimal @@ -5497,6 +5619,14 @@ class HitsMetadata(AttrDict[Any]): max_score: Union[float, None] +class Indeterminable(AttrDict[Any]): + """ + :arg reason: (required) + """ + + reason: str + + class InferenceAggregate(AttrDict[Any]): """ :arg value: @@ -5899,6 +6029,18 @@ class NestedIdentity(AttrDict[Any]): _nested: "NestedIdentity" +class NonStationary(AttrDict[Any]): + """ + :arg p_value: (required) + :arg r_value: (required) + :arg trend: (required) + """ + + p_value: float + r_value: float + trend: str + + class ParentAggregate(AttrDict[Any]): """ :arg doc_count: (required) @@ -6256,6 +6398,16 @@ class SimpleValueAggregate(AttrDict[Any]): meta: Mapping[str, Any] +class Spike(AttrDict[Any]): + """ + :arg p_value: (required) + :arg change_point: (required) + """ + + p_value: float + change_point: int + + class StandardDeviationBounds(AttrDict[Any]): """ :arg upper: (required) @@ -6292,6 +6444,10 @@ class StandardDeviationBoundsAsString(AttrDict[Any]): lower_sampling: str +class Stationary(AttrDict[Any]): + pass + + class StatsAggregate(AttrDict[Any]): """ Statistics aggregation result. `min`, `max` and `avg` are missing if @@ -6347,6 +6503,16 @@ class StatsBucketAggregate(AttrDict[Any]): meta: Mapping[str, Any] +class StepChange(AttrDict[Any]): + """ + :arg p_value: (required) + :arg change_point: (required) + """ + + p_value: float + change_point: int + + class StringRareTermsAggregate(AttrDict[Any]): """ Result of the `rare_terms` aggregation when the field is a string. @@ -6578,6 +6744,18 @@ class TotalHits(AttrDict[Any]): value: int +class TrendChange(AttrDict[Any]): + """ + :arg p_value: (required) + :arg r_value: (required) + :arg change_point: (required) + """ + + p_value: float + r_value: float + change_point: int + + class UnmappedRareTermsAggregate(AttrDict[Any]): """ Result of a `rare_terms` aggregation when the field is unmapped.