Skip to content

Commit 3dbfda1

Browse files
Auto-generated API code
1 parent 9a9c592 commit 3dbfda1

File tree

20 files changed

+1278
-168
lines changed

20 files changed

+1278
-168
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ async def field_caps(
21332133
] = None,
21342134
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
21352135
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2136-
filters: t.Optional[str] = None,
2136+
filters: t.Optional[t.Union[str, t.Sequence[str]]] = None,
21372137
human: t.Optional[bool] = None,
21382138
ignore_unavailable: t.Optional[bool] = None,
21392139
include_empty_fields: t.Optional[bool] = None,
@@ -5599,7 +5599,7 @@ async def search_template(
55995599
async def terms_enum(
56005600
self,
56015601
*,
5602-
index: str,
5602+
index: t.Union[str, t.Sequence[str]],
56035603
field: t.Optional[str] = None,
56045604
case_insensitive: t.Optional[bool] = None,
56055605
error_trace: t.Optional[bool] = None,

elasticsearch/_async/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,10 +3310,20 @@ async def segments(
33103310
self,
33113311
*,
33123312
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3313+
allow_closed: t.Optional[bool] = None,
3314+
allow_no_indices: t.Optional[bool] = None,
33133315
bytes: t.Optional[
33143316
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
33153317
] = None,
33163318
error_trace: t.Optional[bool] = None,
3319+
expand_wildcards: t.Optional[
3320+
t.Union[
3321+
t.Sequence[
3322+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3323+
],
3324+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3325+
]
3326+
] = None,
33173327
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
33183328
format: t.Optional[str] = None,
33193329
h: t.Optional[
@@ -3364,6 +3374,8 @@ async def segments(
33643374
] = None,
33653375
help: t.Optional[bool] = None,
33663376
human: t.Optional[bool] = None,
3377+
ignore_throttled: t.Optional[bool] = None,
3378+
ignore_unavailable: t.Optional[bool] = None,
33673379
local: t.Optional[bool] = None,
33683380
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
33693381
pretty: t.Optional[bool] = None,
@@ -3387,6 +3399,14 @@ async def segments(
33873399
:param index: A comma-separated list of data streams, indices, and aliases used
33883400
to limit the request. Supports wildcards (`*`). To target all data streams
33893401
and indices, omit this parameter or use `*` or `_all`.
3402+
:param allow_closed: If true, allow closed indices to be returned in the response
3403+
otherwise if false, keep the legacy behaviour of throwing an exception if
3404+
index pattern matches closed indices
3405+
:param allow_no_indices: If false, the request returns an error if any wildcard
3406+
expression, index alias, or _all value targets only missing or closed indices.
3407+
This behavior applies even if the request targets other open indices. For
3408+
example, a request targeting foo*,bar* returns an error if an index starts
3409+
with foo but no index starts with bar.
33903410
:param bytes: Sets the units for columns that contain a byte-size value. Note
33913411
that byte-size value units work in terms of powers of 1024. For instance
33923412
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
@@ -3395,12 +3415,20 @@ async def segments(
33953415
least `1.0`. If given, byte-size values are rendered as an integer with no
33963416
suffix, representing the value of the column in the chosen unit. Values that
33973417
are not an exact multiple of the chosen unit are rounded down.
3418+
:param expand_wildcards: Type of index that wildcard expressions can match. If
3419+
the request can target data streams, this argument determines whether wildcard
3420+
expressions match hidden data streams. Supports comma-separated values, such
3421+
as open,hidden.
33983422
:param format: Specifies the format to return the columnar data in, can be set
33993423
to `text`, `json`, `cbor`, `yaml`, or `smile`.
34003424
:param h: A comma-separated list of columns names to display. It supports simple
34013425
wildcards.
34023426
:param help: When set to `true` will output available columns. This option can't
34033427
be combined with any other query string option.
3428+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3429+
when frozen.
3430+
:param ignore_unavailable: If true, missing or closed indices are not included
3431+
in the response.
34043432
:param local: If `true`, the request computes the list of selected nodes from
34053433
the local cluster state. If `false` the list of selected nodes are computed
34063434
from the cluster state of the master node. In both cases the coordinating
@@ -3425,10 +3453,16 @@ async def segments(
34253453
__path_parts = {}
34263454
__path = "/_cat/segments"
34273455
__query: t.Dict[str, t.Any] = {}
3456+
if allow_closed is not None:
3457+
__query["allow_closed"] = allow_closed
3458+
if allow_no_indices is not None:
3459+
__query["allow_no_indices"] = allow_no_indices
34283460
if bytes is not None:
34293461
__query["bytes"] = bytes
34303462
if error_trace is not None:
34313463
__query["error_trace"] = error_trace
3464+
if expand_wildcards is not None:
3465+
__query["expand_wildcards"] = expand_wildcards
34323466
if filter_path is not None:
34333467
__query["filter_path"] = filter_path
34343468
if format is not None:
@@ -3439,6 +3473,10 @@ async def segments(
34393473
__query["help"] = help
34403474
if human is not None:
34413475
__query["human"] = human
3476+
if ignore_throttled is not None:
3477+
__query["ignore_throttled"] = ignore_throttled
3478+
if ignore_unavailable is not None:
3479+
__query["ignore_unavailable"] = ignore_unavailable
34423480
if local is not None:
34433481
__query["local"] = local
34443482
if master_timeout is not None:

elasticsearch/_async/client/cluster.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,40 @@ async def reroute(
10681068
async def state(
10691069
self,
10701070
*,
1071-
metric: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1071+
metric: t.Optional[
1072+
t.Union[
1073+
t.Sequence[
1074+
t.Union[
1075+
str,
1076+
t.Literal[
1077+
"_all",
1078+
"blocks",
1079+
"customs",
1080+
"master_node",
1081+
"metadata",
1082+
"nodes",
1083+
"routing_nodes",
1084+
"routing_table",
1085+
"version",
1086+
],
1087+
]
1088+
],
1089+
t.Union[
1090+
str,
1091+
t.Literal[
1092+
"_all",
1093+
"blocks",
1094+
"customs",
1095+
"master_node",
1096+
"metadata",
1097+
"nodes",
1098+
"routing_nodes",
1099+
"routing_table",
1100+
"version",
1101+
],
1102+
],
1103+
]
1104+
] = None,
10721105
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
10731106
allow_no_indices: t.Optional[bool] = None,
10741107
error_trace: t.Optional[bool] = None,

0 commit comments

Comments
 (0)