Skip to content

Commit 54c0639

Browse files
Auto-generated API code
1 parent f9785b6 commit 54c0639

File tree

13 files changed

+105
-71
lines changed

13 files changed

+105
-71
lines changed

elasticsearch/_async/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,10 +3301,20 @@ async def segments(
33013301
self,
33023302
*,
33033303
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3304+
allow_closed: t.Optional[bool] = None,
3305+
allow_no_indices: t.Optional[bool] = None,
33043306
bytes: t.Optional[
33053307
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
33063308
] = None,
33073309
error_trace: t.Optional[bool] = None,
3310+
expand_wildcards: t.Optional[
3311+
t.Union[
3312+
t.Sequence[
3313+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3314+
],
3315+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3316+
]
3317+
] = None,
33083318
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
33093319
format: t.Optional[str] = None,
33103320
h: t.Optional[
@@ -3355,6 +3365,8 @@ async def segments(
33553365
] = None,
33563366
help: t.Optional[bool] = None,
33573367
human: t.Optional[bool] = None,
3368+
ignore_throttled: t.Optional[bool] = None,
3369+
ignore_unavailable: t.Optional[bool] = None,
33583370
local: t.Optional[bool] = None,
33593371
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
33603372
pretty: t.Optional[bool] = None,
@@ -3378,6 +3390,14 @@ async def segments(
33783390
:param index: A comma-separated list of data streams, indices, and aliases used
33793391
to limit the request. Supports wildcards (`*`). To target all data streams
33803392
and indices, omit this parameter or use `*` or `_all`.
3393+
:param allow_closed: If true, allow closed indices to be returned in the response
3394+
otherwise if false, keep the legacy behaviour of throwing an exception if
3395+
index pattern matches closed indices
3396+
:param allow_no_indices: If false, the request returns an error if any wildcard
3397+
expression, index alias, or _all value targets only missing or closed indices.
3398+
This behavior applies even if the request targets other open indices. For
3399+
example, a request targeting foo*,bar* returns an error if an index starts
3400+
with foo but no index starts with bar.
33813401
:param bytes: Sets the units for columns that contain a byte-size value. Note
33823402
that byte-size value units work in terms of powers of 1024. For instance
33833403
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
@@ -3386,12 +3406,20 @@ async def segments(
33863406
least `1.0`. If given, byte-size values are rendered as an integer with no
33873407
suffix, representing the value of the column in the chosen unit. Values that
33883408
are not an exact multiple of the chosen unit are rounded down.
3409+
:param expand_wildcards: Type of index that wildcard expressions can match. If
3410+
the request can target data streams, this argument determines whether wildcard
3411+
expressions match hidden data streams. Supports comma-separated values, such
3412+
as open,hidden.
33893413
:param format: Specifies the format to return the columnar data in, can be set
33903414
to `text`, `json`, `cbor`, `yaml`, or `smile`.
33913415
:param h: A comma-separated list of columns names to display. It supports simple
33923416
wildcards.
33933417
:param help: When set to `true` will output available columns. This option can't
33943418
be combined with any other query string option.
3419+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3420+
when frozen.
3421+
:param ignore_unavailable: If true, missing or closed indices are not included
3422+
in the response.
33953423
:param local: If `true`, the request computes the list of selected nodes from
33963424
the local cluster state. If `false` the list of selected nodes are computed
33973425
from the cluster state of the master node. In both cases the coordinating
@@ -3416,10 +3444,16 @@ async def segments(
34163444
__path_parts = {}
34173445
__path = "/_cat/segments"
34183446
__query: t.Dict[str, t.Any] = {}
3447+
if allow_closed is not None:
3448+
__query["allow_closed"] = allow_closed
3449+
if allow_no_indices is not None:
3450+
__query["allow_no_indices"] = allow_no_indices
34193451
if bytes is not None:
34203452
__query["bytes"] = bytes
34213453
if error_trace is not None:
34223454
__query["error_trace"] = error_trace
3455+
if expand_wildcards is not None:
3456+
__query["expand_wildcards"] = expand_wildcards
34233457
if filter_path is not None:
34243458
__query["filter_path"] = filter_path
34253459
if format is not None:
@@ -3430,6 +3464,10 @@ async def segments(
34303464
__query["help"] = help
34313465
if human is not None:
34323466
__query["human"] = human
3467+
if ignore_throttled is not None:
3468+
__query["ignore_throttled"] = ignore_throttled
3469+
if ignore_unavailable is not None:
3470+
__query["ignore_unavailable"] = ignore_unavailable
34333471
if local is not None:
34343472
__query["local"] = local
34353473
if master_timeout is not None:

elasticsearch/_async/client/cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,8 @@ async def state(
11241124
when unavailable (missing or closed)
11251125
:param local: Return local information, do not retrieve the state from master
11261126
node (default: false)
1127-
:param master_timeout: Specify timeout for connection to master
1127+
:param master_timeout: Timeout for waiting for new cluster state in case it is
1128+
blocked
11281129
:param wait_for_metadata_version: Wait for the metadata version to be equal or
11291130
greater than the specified metadata version
11301131
:param wait_for_timeout: The maximum time to wait for wait_for_metadata_version

elasticsearch/_async/client/indices.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,8 +2767,8 @@ async def get_index_template(
27672767
27682768
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template>`_
27692769
2770-
:param name: Comma-separated list of index template names used to limit the request.
2771-
Wildcard (*) expressions are supported.
2770+
:param name: Name of index template to retrieve. Wildcard (*) expressions are
2771+
supported.
27722772
:param flat_settings: If true, returns settings in flat format.
27732773
:param include_defaults: If true, returns all relevant default configurations
27742774
for the index template.
@@ -3565,7 +3565,7 @@ async def put_data_lifecycle(
35653565
*,
35663566
name: t.Union[str, t.Sequence[str]],
35673567
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3568-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3568+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
35693569
enabled: t.Optional[bool] = None,
35703570
error_trace: t.Optional[bool] = None,
35713571
expand_wildcards: t.Optional[

elasticsearch/_async/client/security.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,8 @@ async def query_role(
37113711
:param size: The number of hits to return. It must not be negative. By default,
37123712
you cannot page through more than 10,000 hits using the `from` and `size`
37133713
parameters. To page through more hits, use the `search_after` parameter.
3714-
:param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
3714+
:param sort: The sort definition. You can sort on `name`, `description`, `metadata`,
3715+
`applications.application`, `applications.privileges`, and `applications.resources`.
37153716
In addition, sort can also be applied to the `_doc` field to sort by index
37163717
order.
37173718
"""

elasticsearch/_sync/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,10 +3301,20 @@ def segments(
33013301
self,
33023302
*,
33033303
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3304+
allow_closed: t.Optional[bool] = None,
3305+
allow_no_indices: t.Optional[bool] = None,
33043306
bytes: t.Optional[
33053307
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
33063308
] = None,
33073309
error_trace: t.Optional[bool] = None,
3310+
expand_wildcards: t.Optional[
3311+
t.Union[
3312+
t.Sequence[
3313+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3314+
],
3315+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3316+
]
3317+
] = None,
33083318
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
33093319
format: t.Optional[str] = None,
33103320
h: t.Optional[
@@ -3355,6 +3365,8 @@ def segments(
33553365
] = None,
33563366
help: t.Optional[bool] = None,
33573367
human: t.Optional[bool] = None,
3368+
ignore_throttled: t.Optional[bool] = None,
3369+
ignore_unavailable: t.Optional[bool] = None,
33583370
local: t.Optional[bool] = None,
33593371
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
33603372
pretty: t.Optional[bool] = None,
@@ -3378,6 +3390,14 @@ def segments(
33783390
:param index: A comma-separated list of data streams, indices, and aliases used
33793391
to limit the request. Supports wildcards (`*`). To target all data streams
33803392
and indices, omit this parameter or use `*` or `_all`.
3393+
:param allow_closed: If true, allow closed indices to be returned in the response
3394+
otherwise if false, keep the legacy behaviour of throwing an exception if
3395+
index pattern matches closed indices
3396+
:param allow_no_indices: If false, the request returns an error if any wildcard
3397+
expression, index alias, or _all value targets only missing or closed indices.
3398+
This behavior applies even if the request targets other open indices. For
3399+
example, a request targeting foo*,bar* returns an error if an index starts
3400+
with foo but no index starts with bar.
33813401
:param bytes: Sets the units for columns that contain a byte-size value. Note
33823402
that byte-size value units work in terms of powers of 1024. For instance
33833403
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
@@ -3386,12 +3406,20 @@ def segments(
33863406
least `1.0`. If given, byte-size values are rendered as an integer with no
33873407
suffix, representing the value of the column in the chosen unit. Values that
33883408
are not an exact multiple of the chosen unit are rounded down.
3409+
:param expand_wildcards: Type of index that wildcard expressions can match. If
3410+
the request can target data streams, this argument determines whether wildcard
3411+
expressions match hidden data streams. Supports comma-separated values, such
3412+
as open,hidden.
33893413
:param format: Specifies the format to return the columnar data in, can be set
33903414
to `text`, `json`, `cbor`, `yaml`, or `smile`.
33913415
:param h: A comma-separated list of columns names to display. It supports simple
33923416
wildcards.
33933417
:param help: When set to `true` will output available columns. This option can't
33943418
be combined with any other query string option.
3419+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3420+
when frozen.
3421+
:param ignore_unavailable: If true, missing or closed indices are not included
3422+
in the response.
33953423
:param local: If `true`, the request computes the list of selected nodes from
33963424
the local cluster state. If `false` the list of selected nodes are computed
33973425
from the cluster state of the master node. In both cases the coordinating
@@ -3416,10 +3444,16 @@ def segments(
34163444
__path_parts = {}
34173445
__path = "/_cat/segments"
34183446
__query: t.Dict[str, t.Any] = {}
3447+
if allow_closed is not None:
3448+
__query["allow_closed"] = allow_closed
3449+
if allow_no_indices is not None:
3450+
__query["allow_no_indices"] = allow_no_indices
34193451
if bytes is not None:
34203452
__query["bytes"] = bytes
34213453
if error_trace is not None:
34223454
__query["error_trace"] = error_trace
3455+
if expand_wildcards is not None:
3456+
__query["expand_wildcards"] = expand_wildcards
34233457
if filter_path is not None:
34243458
__query["filter_path"] = filter_path
34253459
if format is not None:
@@ -3430,6 +3464,10 @@ def segments(
34303464
__query["help"] = help
34313465
if human is not None:
34323466
__query["human"] = human
3467+
if ignore_throttled is not None:
3468+
__query["ignore_throttled"] = ignore_throttled
3469+
if ignore_unavailable is not None:
3470+
__query["ignore_unavailable"] = ignore_unavailable
34333471
if local is not None:
34343472
__query["local"] = local
34353473
if master_timeout is not None:

elasticsearch/_sync/client/cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,8 @@ def state(
11241124
when unavailable (missing or closed)
11251125
:param local: Return local information, do not retrieve the state from master
11261126
node (default: false)
1127-
:param master_timeout: Specify timeout for connection to master
1127+
:param master_timeout: Timeout for waiting for new cluster state in case it is
1128+
blocked
11281129
:param wait_for_metadata_version: Wait for the metadata version to be equal or
11291130
greater than the specified metadata version
11301131
:param wait_for_timeout: The maximum time to wait for wait_for_metadata_version

elasticsearch/_sync/client/indices.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,8 +2767,8 @@ def get_index_template(
27672767
27682768
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template>`_
27692769
2770-
:param name: Comma-separated list of index template names used to limit the request.
2771-
Wildcard (*) expressions are supported.
2770+
:param name: Name of index template to retrieve. Wildcard (*) expressions are
2771+
supported.
27722772
:param flat_settings: If true, returns settings in flat format.
27732773
:param include_defaults: If true, returns all relevant default configurations
27742774
for the index template.
@@ -3565,7 +3565,7 @@ def put_data_lifecycle(
35653565
*,
35663566
name: t.Union[str, t.Sequence[str]],
35673567
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3568-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3568+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
35693569
enabled: t.Optional[bool] = None,
35703570
error_trace: t.Optional[bool] = None,
35713571
expand_wildcards: t.Optional[

elasticsearch/_sync/client/security.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,8 @@ def query_role(
37113711
:param size: The number of hits to return. It must not be negative. By default,
37123712
you cannot page through more than 10,000 hits using the `from` and `size`
37133713
parameters. To page through more hits, use the `search_after` parameter.
3714-
:param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
3714+
:param sort: The sort definition. You can sort on `name`, `description`, `metadata`,
3715+
`applications.application`, `applications.privileges`, and `applications.resources`.
37153716
In addition, sort can also be applied to the `_doc` field to sort by index
37163717
order.
37173718
"""

elasticsearch/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818
__versionstr__ = "9.1.2"
19-
__es_specification_commit__ = "cc623e3b52dd3dfd85848ee992713d37da020bfb"
19+
__es_specification_commit__ = "4b900da5fec424d5787a761fa0e798f2d135409e"

elasticsearch/dsl/aggs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ def __init__(
14951495
"DefaultType",
14961496
] = DEFAULT,
14971497
field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1498-
precision: Union[float, str, "DefaultType"] = DEFAULT,
1498+
precision: Union[int, str, "DefaultType"] = DEFAULT,
14991499
shard_size: Union[int, "DefaultType"] = DEFAULT,
15001500
size: Union[int, "DefaultType"] = DEFAULT,
15011501
**kwargs: Any,
@@ -1579,7 +1579,7 @@ def __init__(
15791579
self,
15801580
*,
15811581
field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1582-
precision: Union[float, "DefaultType"] = DEFAULT,
1582+
precision: Union[int, "DefaultType"] = DEFAULT,
15831583
shard_size: Union[int, "DefaultType"] = DEFAULT,
15841584
size: Union[int, "DefaultType"] = DEFAULT,
15851585
bounds: Union[
@@ -2680,7 +2680,7 @@ def __init__(
26802680
self,
26812681
*,
26822682
keyed: Union[bool, "DefaultType"] = DEFAULT,
2683-
percents: Union[Sequence[float], "DefaultType"] = DEFAULT,
2683+
percents: Union[float, Sequence[float], "DefaultType"] = DEFAULT,
26842684
hdr: Union["types.HdrMethod", Dict[str, Any], "DefaultType"] = DEFAULT,
26852685
tdigest: Union["types.TDigest", Dict[str, Any], "DefaultType"] = DEFAULT,
26862686
format: Union[str, "DefaultType"] = DEFAULT,

0 commit comments

Comments
 (0)