Skip to content

Auto-generated code for 8.12 #2411

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
Jan 13, 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
6 changes: 5 additions & 1 deletion elasticsearch/_async/client/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -2513,13 +2513,14 @@ async def suggest_user_profiles(
)

@_rewrite_parameters(
body_fields=("metadata", "role_descriptors"),
body_fields=("expiration", "metadata", "role_descriptors"),
)
async def update_api_key(
self,
*,
id: str,
error_trace: t.Optional[bool] = None,
expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
metadata: t.Optional[t.Mapping[str, t.Any]] = None,
Expand All @@ -2533,6 +2534,7 @@ async def update_api_key(
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/security-api-update-api-key.html>`_

:param id: The ID of the API key to update.
:param expiration: Expiration time for the API key.
:param metadata: Arbitrary metadata that you want to associate with the API key.
It supports nested data structure. Within the metadata object, keys beginning
with _ are reserved for system usage.
Expand All @@ -2559,6 +2561,8 @@ async def update_api_key(
if pretty is not None:
__query["pretty"] = pretty
if not __body:
if expiration is not None:
__body["expiration"] = expiration
if metadata is not None:
__body["metadata"] = metadata
if role_descriptors is not None:
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_sync/client/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -2513,13 +2513,14 @@ def suggest_user_profiles(
)

@_rewrite_parameters(
body_fields=("metadata", "role_descriptors"),
body_fields=("expiration", "metadata", "role_descriptors"),
)
def update_api_key(
self,
*,
id: str,
error_trace: t.Optional[bool] = None,
expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
metadata: t.Optional[t.Mapping[str, t.Any]] = None,
Expand All @@ -2533,6 +2534,7 @@ def update_api_key(
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/security-api-update-api-key.html>`_

:param id: The ID of the API key to update.
:param expiration: Expiration time for the API key.
:param metadata: Arbitrary metadata that you want to associate with the API key.
It supports nested data structure. Within the metadata object, keys beginning
with _ are reserved for system usage.
Expand All @@ -2559,6 +2561,8 @@ def update_api_key(
if pretty is not None:
__query["pretty"] = pretty
if not __body:
if expiration is not None:
__body["expiration"] = expiration
if metadata is not None:
__body["metadata"] = metadata
if role_descriptors is not None:
Expand Down