Skip to content

Auto-generated code for main #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions elasticsearch_serverless/_async/client/enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,39 +213,3 @@ async def put_policy(
endpoint_id="enrich.put_policy",
path_parts=__path_parts,
)

@_rewrite_parameters()
async def stats(
self,
*,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get enrich stats. Returns enrich coordinator statistics and information about
enrich policies that are currently executing.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-stats-api.html>`_
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_enrich/_stats"
__query: t.Dict[str, t.Any] = {}
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 pretty is not None:
__query["pretty"] = pretty
__headers = {"accept": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"GET",
__path,
params=__query,
headers=__headers,
endpoint_id="enrich.stats",
path_parts=__path_parts,
)
160 changes: 0 additions & 160 deletions elasticsearch_serverless/_async/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,68 +487,6 @@ async def delete_alias(
path_parts=__path_parts,
)

@_rewrite_parameters()
async def delete_data_lifecycle(
self,
*,
name: t.Union[str, t.Sequence[str]],
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,
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,
) -> ObjectApiResponse[t.Any]:
"""
Delete data stream lifecycles. Removes the data stream lifecycle from a data
stream, rendering it not managed by the data stream lifecycle.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html>`_

:param name: A comma-separated list of data streams of which the data stream
lifecycle will be deleted; use `*` to get all data streams
:param expand_wildcards: Whether wildcard expressions should get expanded to
open or closed indices (default: open)
:param master_timeout: Specify timeout for connection to master
:param timeout: Explicit timestamp for the document
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_data_stream/{__path_parts["name"]}/_lifecycle'
__query: t.Dict[str, t.Any] = {}
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 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
__headers = {"accept": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"DELETE",
__path,
params=__query,
headers=__headers,
endpoint_id="indices.delete_data_lifecycle",
path_parts=__path_parts,
)

@_rewrite_parameters()
async def delete_data_stream(
self,
Expand Down Expand Up @@ -2196,104 +2134,6 @@ async def put_settings(
path_parts=__path_parts,
)

@_rewrite_parameters(
body_fields=(
"aliases",
"index_patterns",
"mappings",
"order",
"settings",
"version",
),
)
async def put_template(
self,
*,
name: str,
aliases: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
cause: t.Optional[str] = None,
create: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
order: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
settings: t.Optional[t.Mapping[str, t.Any]] = None,
version: t.Optional[int] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Create or update an index template. Index templates define settings, mappings,
and aliases that can be applied automatically to new indices.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html>`_

:param name: The name of the template
:param aliases: Aliases for the index.
:param cause:
:param create: If true, this request cannot replace or update existing index
templates.
:param index_patterns: Array of wildcard expressions used to match the names
of indices during creation.
:param mappings: Mapping for fields in the 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 order: Order in which Elasticsearch applies this template if index matches
multiple templates. Templates with lower 'order' values are merged first.
Templates with higher 'order' values are merged later, overriding templates
with lower values.
:param settings: Configuration options for the index.
:param version: Version number used to manage index templates externally. This
number is not automatically generated by Elasticsearch.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_template/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
if cause is not None:
__query["cause"] = cause
if create is not None:
__query["create"] = create
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 master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if not __body:
if aliases is not None:
__body["aliases"] = aliases
if index_patterns is not None:
__body["index_patterns"] = index_patterns
if mappings is not None:
__body["mappings"] = mappings
if order is not None:
__body["order"] = order
if settings is not None:
__body["settings"] = settings
if version is not None:
__body["version"] = version
__headers = {"accept": "application/json", "content-type": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"PUT",
__path,
params=__query,
headers=__headers,
body=__body,
endpoint_id="indices.put_template",
path_parts=__path_parts,
)

@_rewrite_parameters()
async def refresh(
self,
Expand Down
Loading
Loading