Skip to content

Commit bc21810

Browse files
Auto-generated API code
1 parent 99155fe commit bc21810

File tree

10 files changed

+134
-32
lines changed

10 files changed

+134
-32
lines changed

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/indices.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,12 +1467,17 @@ async def downsample(
14671467
.. raw:: html
14681468
14691469
<p>Downsample an index.
1470-
Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>) for each metric field grouped by a configured time interval.
1471-
For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
1470+
Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:</p>
1471+
<ul>
1472+
<li>When running in <code>aggregate</code> mode, it pre-calculates and stores statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>)
1473+
for each metric field grouped by a configured time interval and their dimensions.</li>
1474+
<li>When running in <code>last_value</code> mode, it keeps the last value for each metric in the configured interval and their dimensions.</li>
1475+
</ul>
1476+
<p>For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
14721477
All documents within an hour interval are summarized and stored as a single document in the downsample index.</p>
14731478
<p>NOTE: Only indices in a time series data stream are supported.
14741479
Neither field nor document level security can be defined on the source index.
1475-
The source index must be read only (<code>index.blocks.write: true</code>).</p>
1480+
The source index must be read-only (<code>index.blocks.write: true</code>).</p>
14761481
14771482
14781483
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample>`_
@@ -3701,7 +3706,7 @@ async def put_data_lifecycle(
37013706
*,
37023707
name: t.Union[str, t.Sequence[str]],
37033708
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3704-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3709+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
37053710
enabled: t.Optional[bool] = None,
37063711
error_trace: t.Optional[bool] = None,
37073712
expand_wildcards: t.Optional[

elasticsearch/_async/client/inference.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ async def completion(
5555
5656
:param inference_id: The inference Id
5757
:param input: Inference input. Either a string or an array of strings.
58-
:param task_settings: Optional task settings
58+
:param task_settings: Task settings for the individual inference request. These
59+
settings are specific to the <task_type> you specified and override the task
60+
settings specified when initializing the service.
5961
:param timeout: Specifies the amount of time to wait for the inference request
6062
to complete.
6163
"""
@@ -127,8 +129,9 @@ async def delete(
127129
128130
:param inference_id: The inference identifier.
129131
:param task_type: The task type
130-
:param dry_run: When true, the endpoint is not deleted and a list of ingest processors
131-
which reference this endpoint is returned.
132+
:param dry_run: When true, checks the semantic_text fields and inference processors
133+
that reference the endpoint and returns them in a list, but does not delete
134+
the endpoint.
132135
:param force: When true, the inference endpoint is forcefully deleted even if
133136
it is still being used by ingest processors or semantic text fields.
134137
"""
@@ -867,7 +870,7 @@ async def put_anthropic(
867870
:param service: The type of service supported for the specified task type. In
868871
this case, `anthropic`.
869872
:param service_settings: Settings used to install the inference model. These
870-
settings are specific to the `watsonxai` service.
873+
settings are specific to the `anthropic` service.
871874
:param chunking_settings: The chunking configuration object.
872875
:param task_settings: Settings to configure the inference task. These settings
873876
are specific to the task type you specified.
@@ -959,7 +962,7 @@ async def put_azureaistudio(
959962
:param service: The type of service supported for the specified task type. In
960963
this case, `azureaistudio`.
961964
:param service_settings: Settings used to install the inference model. These
962-
settings are specific to the `openai` service.
965+
settings are specific to the `azureaistudio` service.
963966
:param chunking_settings: The chunking configuration object.
964967
:param task_settings: Settings to configure the inference task. These settings
965968
are specific to the task type you specified.
@@ -2638,7 +2641,9 @@ async def sparse_embedding(
26382641
26392642
:param inference_id: The inference Id
26402643
:param input: Inference input. Either a string or an array of strings.
2641-
:param task_settings: Optional task settings
2644+
:param task_settings: Task settings for the individual inference request. These
2645+
settings are specific to the <task_type> you specified and override the task
2646+
settings specified when initializing the service.
26422647
:param timeout: Specifies the amount of time to wait for the inference request
26432648
to complete.
26442649
"""
@@ -2710,7 +2715,9 @@ async def text_embedding(
27102715
to the relevant service-specific documentation for more info. > info > The
27112716
`input_type` parameter specified on the root level of the request body will
27122717
take precedence over the `input_type` parameter specified in `task_settings`.
2713-
:param task_settings: Optional task settings
2718+
:param task_settings: Task settings for the individual inference request. These
2719+
settings are specific to the <task_type> you specified and override the task
2720+
settings specified when initializing the service.
27142721
:param timeout: Specifies the amount of time to wait for the inference request
27152722
to complete.
27162723
"""

elasticsearch/_async/client/security.py

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

elasticsearch/_sync/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,10 +3310,20 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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/_sync/client/indices.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,12 +1467,17 @@ def downsample(
14671467
.. raw:: html
14681468
14691469
<p>Downsample an index.
1470-
Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>) for each metric field grouped by a configured time interval.
1471-
For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
1470+
Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:</p>
1471+
<ul>
1472+
<li>When running in <code>aggregate</code> mode, it pre-calculates and stores statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>)
1473+
for each metric field grouped by a configured time interval and their dimensions.</li>
1474+
<li>When running in <code>last_value</code> mode, it keeps the last value for each metric in the configured interval and their dimensions.</li>
1475+
</ul>
1476+
<p>For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
14721477
All documents within an hour interval are summarized and stored as a single document in the downsample index.</p>
14731478
<p>NOTE: Only indices in a time series data stream are supported.
14741479
Neither field nor document level security can be defined on the source index.
1475-
The source index must be read only (<code>index.blocks.write: true</code>).</p>
1480+
The source index must be read-only (<code>index.blocks.write: true</code>).</p>
14761481
14771482
14781483
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample>`_
@@ -3701,7 +3706,7 @@ def put_data_lifecycle(
37013706
*,
37023707
name: t.Union[str, t.Sequence[str]],
37033708
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3704-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3709+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
37053710
enabled: t.Optional[bool] = None,
37063711
error_trace: t.Optional[bool] = None,
37073712
expand_wildcards: t.Optional[

0 commit comments

Comments
 (0)