Skip to content

Commit

Permalink
Auto-generated code for main
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Jan 21, 2025
1 parent 3599f01 commit 6604257
Show file tree
Hide file tree
Showing 9 changed files with 2,204 additions and 994 deletions.
843 changes: 663 additions & 180 deletions elasticsearch/_async/client/__init__.py

Large diffs are not rendered by default.

86 changes: 46 additions & 40 deletions elasticsearch/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async def aliases(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get aliases. Retrieves the clusters index aliases, including filter and routing
information. The API does not return data stream aliases. CAT APIs are only intended
Get aliases. Get the cluster's index aliases, including filter and routing information.
This API does not return data stream aliases. IMPORTANT: CAT APIs are only intended
for human consumption using the command line or the Kibana console. They are
not intended for use by applications. For application consumption, use the aliases
API.
Expand All @@ -66,14 +66,19 @@ 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 expand_wildcards: Whether to expand wildcard expression to concrete indices
that are open, closed or both.
: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
values, such as `open,hidden`.
: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.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param master_timeout: The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request
fails and returns an error. To indicated that the request should never timeout,
you can set it to `-1`.
: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.
Expand Down Expand Up @@ -141,13 +146,13 @@ async def allocation(
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get shard allocation information. Get a snapshot of the number of shards allocated
to each data node and their disk space. IMPORTANT: cat APIs are only intended
to each data node and their disk space. IMPORTANT: CAT APIs are only intended
for human consumption using the command line or Kibana console. They are not
intended for use by applications.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html>`_
:param node_id: Comma-separated list of node identifiers or names used to limit
: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 format: Specifies the format to return the columnar data in, can be set
Expand Down Expand Up @@ -225,17 +230,17 @@ async def component_templates(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get component templates. Returns information about component templates in a cluster.
Get component templates. Get information about component templates in a cluster.
Component templates are building blocks for constructing index templates that
specify index mappings, settings, and aliases. CAT APIs are only intended for
human consumption using the command line or Kibana console. They are not intended
for use by applications. For application consumption, use the get component template
API.
specify index mappings, settings, and aliases. IMPORTANT: CAT APIs are only intended
for human consumption using the command line or Kibana console. They are not
intended for use by applications. For application consumption, use the get component
template API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html>`_
:param name: The name of the component template. Accepts wildcard expressions.
If omitted, all component templates are returned.
:param name: The name of the component template. It accepts wildcard expressions.
If it is omitted, all component templates are returned.
: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.
Expand All @@ -245,7 +250,7 @@ async def component_templates(
the local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
:param master_timeout: Period to wait for a connection to the master node.
:param master_timeout: The period to wait for a connection to the master node.
: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.
Expand Down Expand Up @@ -307,17 +312,17 @@ async def count(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get a document count. Provides quick access to a document count for a data stream,
Get a document count. Get quick access to a document count for a data stream,
an index, or an entire cluster. The document count only includes live documents,
not deleted documents which have not yet been removed by the merge process. CAT
APIs are only intended for human consumption using the command line or Kibana
not deleted documents which have not yet been removed by the merge process. IMPORTANT:
CAT APIs are only intended for human consumption using the command line or Kibana
console. They are not intended for use by applications. For application consumption,
use the count API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html>`_
:param index: Comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
: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 format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
Expand Down Expand Up @@ -462,7 +467,7 @@ async def health(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get the cluster health status. IMPORTANT: cat APIs are only intended for human
Get the cluster health status. IMPORTANT: CAT APIs are only intended for human
consumption using the command line or Kibana console. They are not intended for
use by applications. For application consumption, use the cluster health API.
This API is often used to check malfunctioning clusters. To help you track cluster
Expand Down Expand Up @@ -526,7 +531,7 @@ async def health(
@_rewrite_parameters()
async def help(self) -> TextApiResponse:
"""
Get CAT help. Returns help for the CAT APIs.
Get CAT help. Get help for the CAT APIs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_
"""
Expand Down Expand Up @@ -577,7 +582,7 @@ async def indices(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get index information. Returns high-level information about indices in a cluster,
Get index information. Get high-level information about indices in a cluster,
including backing indices for data streams. Use this request to get the following
information for each index in a cluster: - shard count - document count - deleted
document count - primary store size - total store size of all shards, including
Expand Down Expand Up @@ -853,9 +858,9 @@ async def ml_data_frame_analytics(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get data frame analytics jobs. Returns configuration and usage information about
data frame analytics jobs. CAT APIs are only intended for human consumption using
the Kibana console or command line. They are not intended for use by applications.
Get data frame analytics jobs. Get configuration and usage information about
data frame analytics jobs. IMPORTANT: CAT APIs are only intended for human consumption
using the Kibana console or command line. They are not intended for use by applications.
For application consumption, use the get data frame analytics jobs statistics
API.
Expand Down Expand Up @@ -1015,12 +1020,13 @@ async def ml_datafeeds(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get datafeeds. Returns configuration and usage information about datafeeds. This
Get datafeeds. Get configuration and usage information about datafeeds. This
API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
cluster privileges to use this API. CAT APIs are only intended for human consumption
using the Kibana console or command line. They are not intended for use by applications.
For application consumption, use the get datafeed statistics API.
cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for
human consumption using the Kibana console or command line. They are not intended
for use by applications. For application consumption, use the get datafeed statistics
API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-datafeeds.html>`_
Expand Down Expand Up @@ -1376,13 +1382,13 @@ async def ml_jobs(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get anomaly detection jobs. Returns configuration and usage information for anomaly
Get anomaly detection jobs. Get configuration and usage information for anomaly
detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch
security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`,
or `manage` cluster privileges to use this API. CAT APIs are only intended for
human consumption using the Kibana console or command line. They are not intended
for use by applications. For application consumption, use the get anomaly detection
job statistics API.
or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only
intended for human consumption using the Kibana console or command line. They
are not intended for use by applications. For application consumption, use the
get anomaly detection job statistics API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-anomaly-detectors.html>`_
Expand Down Expand Up @@ -1560,10 +1566,10 @@ async def ml_trained_models(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get trained models. Returns configuration and usage information about inference
trained models. CAT APIs are only intended for human consumption using the Kibana
console or command line. They are not intended for use by applications. For application
consumption, use the get trained models statistics API.
Get trained models. Get configuration and usage information about inference trained
models. IMPORTANT: CAT APIs are only intended for human consumption using the
Kibana console or command line. They are not intended for use by applications.
For application consumption, use the get trained models statistics API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-trained-model.html>`_
Expand Down Expand Up @@ -2325,7 +2331,7 @@ async def snapshots(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Get snapshot information Get information about the snapshots stored in one or
Get snapshot information. Get information about the snapshots stored in one or
more repositories. A snapshot is a backup of an index or running Elasticsearch
cluster. IMPORTANT: cat APIs are only intended for human consumption using the
command line or Kibana console. They are not intended for use by applications.
Expand Down
83 changes: 0 additions & 83 deletions elasticsearch/_async/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -4943,89 +4943,6 @@ async def stats(
path_parts=__path_parts,
)

@_rewrite_parameters()
async def unfreeze(
self,
*,
index: str,
allow_no_indices: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
expand_wildcards: t.Optional[
t.Union[
t.Sequence[
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
],
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
]
] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
ignore_unavailable: 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,
wait_for_active_shards: t.Optional[str] = None,
) -> ObjectApiResponse[t.Any]:
"""
Unfreeze an index. When a frozen index is unfrozen, the index goes through the
normal recovery process and becomes writeable again.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/unfreeze-index-api.html>`_
:param index: Identifier for the index.
:param allow_no_indices: If `false`, the request returns an error if any wildcard
expression, index alias, or `_all` value targets only missing or closed indices.
This behavior applies even if the request targets other open indices.
:param expand_wildcards: 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. Supports comma-separated values, such
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
:param ignore_unavailable: If `false`, the request returns an error if it targets
a missing or closed index.
: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.
: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 wait_for_active_shards: The number of shard copies that must be active
before proceeding with the operation. Set to `all` or any positive integer
up to the total number of shards in the index (`number_of_replicas+1`).
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_unfreeze'
__query: t.Dict[str, t.Any] = {}
if allow_no_indices is not None:
__query["allow_no_indices"] = allow_no_indices
if error_trace is not None:
__query["error_trace"] = error_trace
if expand_wildcards is not None:
__query["expand_wildcards"] = expand_wildcards
if filter_path is not None:
__query["filter_path"] = filter_path
if human is not None:
__query["human"] = human
if ignore_unavailable is not None:
__query["ignore_unavailable"] = ignore_unavailable
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
if wait_for_active_shards is not None:
__query["wait_for_active_shards"] = wait_for_active_shards
__headers = {"accept": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"POST",
__path,
params=__query,
headers=__headers,
endpoint_id="indices.unfreeze",
path_parts=__path_parts,
)

@_rewrite_parameters(
body_fields=("actions",),
)
Expand Down
Loading

0 comments on commit 6604257

Please sign in to comment.