Skip to content

Commit 73d5df7

Browse files
authored
Auto-generated code for main (#2756)
1 parent 3599f01 commit 73d5df7

File tree

9 files changed

+2204
-994
lines changed

9 files changed

+2204
-994
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 663 additions & 180 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/cat.py

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ async def aliases(
5656
v: t.Optional[bool] = None,
5757
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
5858
"""
59-
Get aliases. Retrieves the clusters index aliases, including filter and routing
60-
information. The API does not return data stream aliases. CAT APIs are only intended
59+
Get aliases. Get the cluster's index aliases, including filter and routing information.
60+
This API does not return data stream aliases. IMPORTANT: CAT APIs are only intended
6161
for human consumption using the command line or the Kibana console. They are
6262
not intended for use by applications. For application consumption, use the aliases
6363
API.
@@ -66,14 +66,19 @@ async def aliases(
6666
6767
:param name: A comma-separated list of aliases to retrieve. Supports wildcards
6868
(`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
69-
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
70-
that are open, closed or both.
69+
:param expand_wildcards: The type of index that wildcard patterns can match.
70+
If the request can target data streams, this argument determines whether
71+
wildcard expressions match hidden data streams. It supports comma-separated
72+
values, such as `open,hidden`.
7173
:param format: Specifies the format to return the columnar data in, can be set
7274
to `text`, `json`, `cbor`, `yaml`, or `smile`.
7375
:param h: List of columns to appear in the response. Supports simple wildcards.
7476
:param help: When set to `true` will output available columns. This option can't
7577
be combined with any other query string option.
76-
:param master_timeout: Period to wait for a connection to the master node.
78+
:param master_timeout: The period to wait for a connection to the master node.
79+
If the master node is not available before the timeout expires, the request
80+
fails and returns an error. To indicated that the request should never timeout,
81+
you can set it to `-1`.
7782
:param s: List of columns that determine how the table should be sorted. Sorting
7883
defaults to ascending and can be changed by setting `:asc` or `:desc` as
7984
a suffix to the column name.
@@ -141,13 +146,13 @@ async def allocation(
141146
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
142147
"""
143148
Get shard allocation information. Get a snapshot of the number of shards allocated
144-
to each data node and their disk space. IMPORTANT: cat APIs are only intended
149+
to each data node and their disk space. IMPORTANT: CAT APIs are only intended
145150
for human consumption using the command line or Kibana console. They are not
146151
intended for use by applications.
147152
148153
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html>`_
149154
150-
:param node_id: Comma-separated list of node identifiers or names used to limit
155+
:param node_id: A comma-separated list of node identifiers or names used to limit
151156
the returned information.
152157
:param bytes: The unit used to display byte values.
153158
:param format: Specifies the format to return the columnar data in, can be set
@@ -225,17 +230,17 @@ async def component_templates(
225230
v: t.Optional[bool] = None,
226231
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
227232
"""
228-
Get component templates. Returns information about component templates in a cluster.
233+
Get component templates. Get information about component templates in a cluster.
229234
Component templates are building blocks for constructing index templates that
230-
specify index mappings, settings, and aliases. CAT APIs are only intended for
231-
human consumption using the command line or Kibana console. They are not intended
232-
for use by applications. For application consumption, use the get component template
233-
API.
235+
specify index mappings, settings, and aliases. IMPORTANT: CAT APIs are only intended
236+
for human consumption using the command line or Kibana console. They are not
237+
intended for use by applications. For application consumption, use the get component
238+
template API.
234239
235240
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html>`_
236241
237-
:param name: The name of the component template. Accepts wildcard expressions.
238-
If omitted, all component templates are returned.
242+
:param name: The name of the component template. It accepts wildcard expressions.
243+
If it is omitted, all component templates are returned.
239244
:param format: Specifies the format to return the columnar data in, can be set
240245
to `text`, `json`, `cbor`, `yaml`, or `smile`.
241246
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -245,7 +250,7 @@ async def component_templates(
245250
the local cluster state. If `false` the list of selected nodes are computed
246251
from the cluster state of the master node. In both cases the coordinating
247252
node will send requests for further information to each selected node.
248-
:param master_timeout: Period to wait for a connection to the master node.
253+
:param master_timeout: The period to wait for a connection to the master node.
249254
:param s: List of columns that determine how the table should be sorted. Sorting
250255
defaults to ascending and can be changed by setting `:asc` or `:desc` as
251256
a suffix to the column name.
@@ -307,17 +312,17 @@ async def count(
307312
v: t.Optional[bool] = None,
308313
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
309314
"""
310-
Get a document count. Provides quick access to a document count for a data stream,
315+
Get a document count. Get quick access to a document count for a data stream,
311316
an index, or an entire cluster. The document count only includes live documents,
312-
not deleted documents which have not yet been removed by the merge process. CAT
313-
APIs are only intended for human consumption using the command line or Kibana
317+
not deleted documents which have not yet been removed by the merge process. IMPORTANT:
318+
CAT APIs are only intended for human consumption using the command line or Kibana
314319
console. They are not intended for use by applications. For application consumption,
315320
use the count API.
316321
317322
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html>`_
318323
319-
:param index: Comma-separated list of data streams, indices, and aliases used
320-
to limit the request. Supports wildcards (`*`). To target all data streams
324+
:param index: A comma-separated list of data streams, indices, and aliases used
325+
to limit the request. It supports wildcards (`*`). To target all data streams
321326
and indices, omit this parameter or use `*` or `_all`.
322327
:param format: Specifies the format to return the columnar data in, can be set
323328
to `text`, `json`, `cbor`, `yaml`, or `smile`.
@@ -462,7 +467,7 @@ async def health(
462467
v: t.Optional[bool] = None,
463468
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
464469
"""
465-
Get the cluster health status. IMPORTANT: cat APIs are only intended for human
470+
Get the cluster health status. IMPORTANT: CAT APIs are only intended for human
466471
consumption using the command line or Kibana console. They are not intended for
467472
use by applications. For application consumption, use the cluster health API.
468473
This API is often used to check malfunctioning clusters. To help you track cluster
@@ -526,7 +531,7 @@ async def health(
526531
@_rewrite_parameters()
527532
async def help(self) -> TextApiResponse:
528533
"""
529-
Get CAT help. Returns help for the CAT APIs.
534+
Get CAT help. Get help for the CAT APIs.
530535
531536
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_
532537
"""
@@ -577,7 +582,7 @@ async def indices(
577582
v: t.Optional[bool] = None,
578583
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
579584
"""
580-
Get index information. Returns high-level information about indices in a cluster,
585+
Get index information. Get high-level information about indices in a cluster,
581586
including backing indices for data streams. Use this request to get the following
582587
information for each index in a cluster: - shard count - document count - deleted
583588
document count - primary store size - total store size of all shards, including
@@ -853,9 +858,9 @@ async def ml_data_frame_analytics(
853858
v: t.Optional[bool] = None,
854859
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
855860
"""
856-
Get data frame analytics jobs. Returns configuration and usage information about
857-
data frame analytics jobs. CAT APIs are only intended for human consumption using
858-
the Kibana console or command line. They are not intended for use by applications.
861+
Get data frame analytics jobs. Get configuration and usage information about
862+
data frame analytics jobs. IMPORTANT: CAT APIs are only intended for human consumption
863+
using the Kibana console or command line. They are not intended for use by applications.
859864
For application consumption, use the get data frame analytics jobs statistics
860865
API.
861866
@@ -1015,12 +1020,13 @@ async def ml_datafeeds(
10151020
v: t.Optional[bool] = None,
10161021
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
10171022
"""
1018-
Get datafeeds. Returns configuration and usage information about datafeeds. This
1023+
Get datafeeds. Get configuration and usage information about datafeeds. This
10191024
API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features
10201025
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
1021-
cluster privileges to use this API. CAT APIs are only intended for human consumption
1022-
using the Kibana console or command line. They are not intended for use by applications.
1023-
For application consumption, use the get datafeed statistics API.
1026+
cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for
1027+
human consumption using the Kibana console or command line. They are not intended
1028+
for use by applications. For application consumption, use the get datafeed statistics
1029+
API.
10241030
10251031
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-datafeeds.html>`_
10261032
@@ -1376,13 +1382,13 @@ async def ml_jobs(
13761382
v: t.Optional[bool] = None,
13771383
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
13781384
"""
1379-
Get anomaly detection jobs. Returns configuration and usage information for anomaly
1385+
Get anomaly detection jobs. Get configuration and usage information for anomaly
13801386
detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch
13811387
security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`,
1382-
or `manage` cluster privileges to use this API. CAT APIs are only intended for
1383-
human consumption using the Kibana console or command line. They are not intended
1384-
for use by applications. For application consumption, use the get anomaly detection
1385-
job statistics API.
1388+
or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only
1389+
intended for human consumption using the Kibana console or command line. They
1390+
are not intended for use by applications. For application consumption, use the
1391+
get anomaly detection job statistics API.
13861392
13871393
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-anomaly-detectors.html>`_
13881394
@@ -1560,10 +1566,10 @@ async def ml_trained_models(
15601566
v: t.Optional[bool] = None,
15611567
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
15621568
"""
1563-
Get trained models. Returns configuration and usage information about inference
1564-
trained models. CAT APIs are only intended for human consumption using the Kibana
1565-
console or command line. They are not intended for use by applications. For application
1566-
consumption, use the get trained models statistics API.
1569+
Get trained models. Get configuration and usage information about inference trained
1570+
models. IMPORTANT: CAT APIs are only intended for human consumption using the
1571+
Kibana console or command line. They are not intended for use by applications.
1572+
For application consumption, use the get trained models statistics API.
15671573
15681574
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-trained-model.html>`_
15691575
@@ -2325,7 +2331,7 @@ async def snapshots(
23252331
v: t.Optional[bool] = None,
23262332
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
23272333
"""
2328-
Get snapshot information Get information about the snapshots stored in one or
2334+
Get snapshot information. Get information about the snapshots stored in one or
23292335
more repositories. A snapshot is a backup of an index or running Elasticsearch
23302336
cluster. IMPORTANT: cat APIs are only intended for human consumption using the
23312337
command line or Kibana console. They are not intended for use by applications.

elasticsearch/_async/client/indices.py

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4943,89 +4943,6 @@ async def stats(
49434943
path_parts=__path_parts,
49444944
)
49454945

4946-
@_rewrite_parameters()
4947-
async def unfreeze(
4948-
self,
4949-
*,
4950-
index: str,
4951-
allow_no_indices: t.Optional[bool] = None,
4952-
error_trace: t.Optional[bool] = None,
4953-
expand_wildcards: t.Optional[
4954-
t.Union[
4955-
t.Sequence[
4956-
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4957-
],
4958-
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4959-
]
4960-
] = None,
4961-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4962-
human: t.Optional[bool] = None,
4963-
ignore_unavailable: t.Optional[bool] = None,
4964-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4965-
pretty: t.Optional[bool] = None,
4966-
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4967-
wait_for_active_shards: t.Optional[str] = None,
4968-
) -> ObjectApiResponse[t.Any]:
4969-
"""
4970-
Unfreeze an index. When a frozen index is unfrozen, the index goes through the
4971-
normal recovery process and becomes writeable again.
4972-
4973-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/unfreeze-index-api.html>`_
4974-
4975-
:param index: Identifier for the index.
4976-
:param allow_no_indices: If `false`, the request returns an error if any wildcard
4977-
expression, index alias, or `_all` value targets only missing or closed indices.
4978-
This behavior applies even if the request targets other open indices.
4979-
:param expand_wildcards: Type of index that wildcard patterns can match. If the
4980-
request can target data streams, this argument determines whether wildcard
4981-
expressions match hidden data streams. Supports comma-separated values, such
4982-
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4983-
:param ignore_unavailable: If `false`, the request returns an error if it targets
4984-
a missing or closed index.
4985-
:param master_timeout: Period to wait for a connection to the master node. If
4986-
no response is received before the timeout expires, the request fails and
4987-
returns an error.
4988-
:param timeout: Period to wait for a response. If no response is received before
4989-
the timeout expires, the request fails and returns an error.
4990-
:param wait_for_active_shards: The number of shard copies that must be active
4991-
before proceeding with the operation. Set to `all` or any positive integer
4992-
up to the total number of shards in the index (`number_of_replicas+1`).
4993-
"""
4994-
if index in SKIP_IN_PATH:
4995-
raise ValueError("Empty value passed for parameter 'index'")
4996-
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
4997-
__path = f'/{__path_parts["index"]}/_unfreeze'
4998-
__query: t.Dict[str, t.Any] = {}
4999-
if allow_no_indices is not None:
5000-
__query["allow_no_indices"] = allow_no_indices
5001-
if error_trace is not None:
5002-
__query["error_trace"] = error_trace
5003-
if expand_wildcards is not None:
5004-
__query["expand_wildcards"] = expand_wildcards
5005-
if filter_path is not None:
5006-
__query["filter_path"] = filter_path
5007-
if human is not None:
5008-
__query["human"] = human
5009-
if ignore_unavailable is not None:
5010-
__query["ignore_unavailable"] = ignore_unavailable
5011-
if master_timeout is not None:
5012-
__query["master_timeout"] = master_timeout
5013-
if pretty is not None:
5014-
__query["pretty"] = pretty
5015-
if timeout is not None:
5016-
__query["timeout"] = timeout
5017-
if wait_for_active_shards is not None:
5018-
__query["wait_for_active_shards"] = wait_for_active_shards
5019-
__headers = {"accept": "application/json"}
5020-
return await self.perform_request( # type: ignore[return-value]
5021-
"POST",
5022-
__path,
5023-
params=__query,
5024-
headers=__headers,
5025-
endpoint_id="indices.unfreeze",
5026-
path_parts=__path_parts,
5027-
)
5028-
50294946
@_rewrite_parameters(
50304947
body_fields=("actions",),
50314948
)

0 commit comments

Comments
 (0)