Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Oct 14, 2024
1 parent 14e6265 commit 2ba5997
Show file tree
Hide file tree
Showing 18 changed files with 254 additions and 38 deletions.
8 changes: 4 additions & 4 deletions elasticsearch/_async/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,8 @@ async def stats(
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
flat_settings: t.Optional[bool] = None,
human: t.Optional[bool] = None,
include_remotes: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -1067,7 +1067,7 @@ async def stats(
:param node_id: Comma-separated list of node filters used to limit returned information.
Defaults to all nodes in the cluster.
:param flat_settings: If `true`, returns settings in flat format.
:param include_remotes: Include remote cluster data into the response
:param timeout: Period to wait for each node to respond. If a node does not respond
before its timeout expires, the response does not include its stats. However,
timed out nodes are included in the response’s `_nodes.failed` property.
Expand All @@ -1085,10 +1085,10 @@ async def stats(
__query["error_trace"] = error_trace
if filter_path is not None:
__query["filter_path"] = filter_path
if flat_settings is not None:
__query["flat_settings"] = flat_settings
if human is not None:
__query["human"] = human
if include_remotes is not None:
__query["include_remotes"] = include_remotes
if pretty is not None:
__query["pretty"] = pretty
if timeout is not None:
Expand Down
9 changes: 8 additions & 1 deletion elasticsearch/_async/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ async def query(
error_trace: t.Optional[bool] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
format: t.Optional[
t.Union[
str,
t.Literal[
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
],
]
] = None,
human: t.Optional[bool] = None,
locale: t.Optional[str] = None,
params: t.Optional[
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_async/client/ilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ async def move_to_step(
*,
index: str,
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -322,6 +322,10 @@ async def move_to_step(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
if current_step is None and body is None:
raise ValueError("Empty value passed for parameter 'current_step'")
if next_step is None and body is None:
raise ValueError("Empty value passed for parameter 'next_step'")
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/_ilm/move/{__path_parts["index"]}'
__query: t.Dict[str, t.Any] = {}
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch/_async/client/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def delete_geoip_database(
"""
Deletes a geoip database configuration.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-geoip-database-api.html>`_
:param id: A comma-separated list of geoip database configurations to delete
:param master_timeout: Period to wait for a connection to the master node. If
Expand Down Expand Up @@ -177,7 +177,7 @@ async def get_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-geoip-database-api.html>`_
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
(`*`) expressions are supported. To get all database configurations, omit
Expand Down Expand Up @@ -327,7 +327,7 @@ async def put_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-geoip-database-api.html>`_
:param id: ID of the database configuration to create or update.
:param maxmind: The configuration necessary to identify which IP geolocation
Expand Down
19 changes: 12 additions & 7 deletions elasticsearch/_async/client/search_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def delete(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes a search application.
Delete a search application. Remove a search application and its associated alias.
Indices attached to the search application are not removed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html>`_
Expand Down Expand Up @@ -76,7 +77,8 @@ async def delete_behavioral_analytics(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Delete a behavioral analytics collection.
Delete a behavioral analytics collection. The associated data stream is also
deleted.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html>`_
Expand Down Expand Up @@ -116,7 +118,7 @@ async def get(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns the details about a search application
Get search application details.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html>`_
Expand Down Expand Up @@ -156,7 +158,7 @@ async def get_behavioral_analytics(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns the existing behavioral analytics collections.
Get behavioral analytics collections.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html>`_
Expand Down Expand Up @@ -254,7 +256,7 @@ async def put(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates or updates a search application.
Create or update a search application.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html>`_
Expand Down Expand Up @@ -307,7 +309,7 @@ async def put_behavioral_analytics(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates a behavioral analytics collection.
Create a behavioral analytics collection.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html>`_
Expand Down Expand Up @@ -353,7 +355,10 @@ async def search(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Perform a search against a search application.
Run a search application search. Generate and run an Elasticsearch query that
uses the specified query parameteter and the search template associated with
the search application or default template. Unspecified template parameters are
assigned their default values if applicable.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html>`_
Expand Down
10 changes: 9 additions & 1 deletion elasticsearch/_async/client/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,7 @@ async def put_privileges(
"global_",
"indices",
"metadata",
"remote_indices",
"run_as",
"transient_metadata",
),
Expand Down Expand Up @@ -2373,6 +2374,7 @@ async def put_role(
refresh: t.Optional[
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
] = None,
remote_indices: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
run_as: t.Optional[t.Sequence[str]] = None,
transient_metadata: t.Optional[t.Mapping[str, t.Any]] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
Expand All @@ -2384,7 +2386,10 @@ async def put_role(
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-put-role.html>`_
:param name: The name of the role.
:param name: The name of the role that is being created or updated. On Elasticsearch
Serverless, the role name must begin with a letter or digit and can only
contain letters, digits and the characters '_', '-', and '.'. Each role must
have a unique name, as this will serve as the identifier for that role.
:param applications: A list of application privilege entries.
:param cluster: A list of cluster privileges. These privileges define the cluster-level
actions for users with this role.
Expand All @@ -2398,6 +2403,7 @@ async def put_role(
:param refresh: If `true` (the default) then refresh the affected shards to make
this operation visible to search, if `wait_for` then wait for a refresh to
make this operation visible to search, if `false` then do nothing with refreshes.
:param remote_indices: A list of remote indices permissions entries.
:param run_as: A list of users that the owners of this role can impersonate.
*Note*: in Serverless, the run-as feature is disabled. For API compatibility,
you can still specify an empty `run_as` field, but a non-empty list will
Expand Down Expand Up @@ -2438,6 +2444,8 @@ async def put_role(
__body["indices"] = indices
if metadata is not None:
__body["metadata"] = metadata
if remote_indices is not None:
__body["remote_indices"] = remote_indices
if run_as is not None:
__body["run_as"] = run_as
if transient_metadata is not None:
Expand Down
78 changes: 78 additions & 0 deletions elasticsearch/_async/client/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,84 @@ async def get_repository(
path_parts=__path_parts,
)

@_rewrite_parameters()
async def repository_verify_integrity(
self,
*,
name: t.Union[str, t.Sequence[str]],
blob_thread_pool_concurrency: t.Optional[int] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
index_snapshot_verification_concurrency: t.Optional[int] = None,
index_verification_concurrency: t.Optional[int] = None,
max_bytes_per_sec: t.Optional[str] = None,
max_failed_shard_snapshots: t.Optional[int] = None,
meta_thread_pool_concurrency: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
snapshot_verification_concurrency: t.Optional[int] = None,
verify_blob_contents: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Verifies the integrity of the contents of a snapshot repository
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html>`_
:param name: A repository name
:param blob_thread_pool_concurrency: Number of threads to use for reading blob
contents
:param index_snapshot_verification_concurrency: Number of snapshots to verify
concurrently within each index
:param index_verification_concurrency: Number of indices to verify concurrently
:param max_bytes_per_sec: Rate limit for individual blob verification
:param max_failed_shard_snapshots: Maximum permitted number of failed shard snapshots
:param meta_thread_pool_concurrency: Number of threads to use for reading metadata
:param snapshot_verification_concurrency: Number of snapshots to verify concurrently
:param verify_blob_contents: Whether to verify the contents of individual blobs
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
__path_parts: t.Dict[str, str] = {"repository": _quote(name)}
__path = f'/_snapshot/{__path_parts["repository"]}/_verify_integrity'
__query: t.Dict[str, t.Any] = {}
if blob_thread_pool_concurrency is not None:
__query["blob_thread_pool_concurrency"] = blob_thread_pool_concurrency
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
__query["filter_path"] = filter_path
if human is not None:
__query["human"] = human
if index_snapshot_verification_concurrency is not None:
__query["index_snapshot_verification_concurrency"] = (
index_snapshot_verification_concurrency
)
if index_verification_concurrency is not None:
__query["index_verification_concurrency"] = index_verification_concurrency
if max_bytes_per_sec is not None:
__query["max_bytes_per_sec"] = max_bytes_per_sec
if max_failed_shard_snapshots is not None:
__query["max_failed_shard_snapshots"] = max_failed_shard_snapshots
if meta_thread_pool_concurrency is not None:
__query["meta_thread_pool_concurrency"] = meta_thread_pool_concurrency
if pretty is not None:
__query["pretty"] = pretty
if snapshot_verification_concurrency is not None:
__query["snapshot_verification_concurrency"] = (
snapshot_verification_concurrency
)
if verify_blob_contents is not None:
__query["verify_blob_contents"] = verify_blob_contents
__headers = {"accept": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"POST",
__path,
params=__query,
headers=__headers,
endpoint_id="snapshot.repository_verify_integrity",
path_parts=__path_parts,
)

@_rewrite_parameters(
body_fields=(
"feature_states",
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_async/client/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ async def query(
field_multi_value_leniency: t.Optional[bool] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
format: t.Optional[
t.Union[
str, t.Literal["cbor", "csv", "json", "smile", "tsv", "txt", "yaml"]
]
] = None,
human: t.Optional[bool] = None,
index_using_frozen: t.Optional[bool] = None,
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
Expand Down
4 changes: 3 additions & 1 deletion elasticsearch/_async/client/xpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ async def info(
self,
*,
accept_enterprise: t.Optional[bool] = None,
categories: t.Optional[t.Sequence[str]] = None,
categories: t.Optional[
t.Sequence[t.Union[str, t.Literal["build", "features", "license"]]]
] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
Expand Down
8 changes: 4 additions & 4 deletions elasticsearch/_sync/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,8 @@ def stats(
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
flat_settings: t.Optional[bool] = None,
human: t.Optional[bool] = None,
include_remotes: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -1067,7 +1067,7 @@ def stats(
:param node_id: Comma-separated list of node filters used to limit returned information.
Defaults to all nodes in the cluster.
:param flat_settings: If `true`, returns settings in flat format.
:param include_remotes: Include remote cluster data into the response
:param timeout: Period to wait for each node to respond. If a node does not respond
before its timeout expires, the response does not include its stats. However,
timed out nodes are included in the response’s `_nodes.failed` property.
Expand All @@ -1085,10 +1085,10 @@ def stats(
__query["error_trace"] = error_trace
if filter_path is not None:
__query["filter_path"] = filter_path
if flat_settings is not None:
__query["flat_settings"] = flat_settings
if human is not None:
__query["human"] = human
if include_remotes is not None:
__query["include_remotes"] = include_remotes
if pretty is not None:
__query["pretty"] = pretty
if timeout is not None:
Expand Down
9 changes: 8 additions & 1 deletion elasticsearch/_sync/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ def query(
error_trace: t.Optional[bool] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
format: t.Optional[
t.Union[
str,
t.Literal[
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
],
]
] = None,
human: t.Optional[bool] = None,
locale: t.Optional[str] = None,
params: t.Optional[
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_sync/client/ilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def move_to_step(
*,
index: str,
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -322,6 +322,10 @@ def move_to_step(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
if current_step is None and body is None:
raise ValueError("Empty value passed for parameter 'current_step'")
if next_step is None and body is None:
raise ValueError("Empty value passed for parameter 'next_step'")
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/_ilm/move/{__path_parts["index"]}'
__query: t.Dict[str, t.Any] = {}
Expand Down
Loading

0 comments on commit 2ba5997

Please sign in to comment.