Skip to content
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
3 changes: 3 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2405,13 +2405,15 @@ async def update_api_key(
access_key: str,
default_project_id: Optional[str] = None,
description: Optional[str] = None,
expires_at: Optional[datetime] = None,
) -> APIKey:
"""
Update an API key.
Update the parameters of an API key, including `default_project_id` and `description`.
:param access_key: Access key to update.
:param default_project_id: New default Project ID to set.
:param description: New description to update.
:param expires_at: New expiration date of the API key.
:return: :class:`APIKey <APIKey>`

Usage:
Expand All @@ -2432,6 +2434,7 @@ async def update_api_key(
access_key=access_key,
default_project_id=default_project_id,
description=description,
expires_at=expires_at,
),
self.client,
),
Expand Down
3 changes: 3 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,9 @@ def marshal_UpdateAPIKeyRequest(
if request.description is not None:
output["description"] = request.description

if request.expires_at is not None:
output["expires_at"] = request.expires_at.isoformat()

return output


Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,11 @@ class UpdateAPIKeyRequest:
New description to update.
"""

expires_at: Optional[datetime] = None
"""
New expiration date of the API key.
"""


@dataclass
class UpdateApplicationRequest:
Expand Down
3 changes: 3 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2405,13 +2405,15 @@ def update_api_key(
access_key: str,
default_project_id: Optional[str] = None,
description: Optional[str] = None,
expires_at: Optional[datetime] = None,
) -> APIKey:
"""
Update an API key.
Update the parameters of an API key, including `default_project_id` and `description`.
:param access_key: Access key to update.
:param default_project_id: New default Project ID to set.
:param description: New description to update.
:param expires_at: New expiration date of the API key.
:return: :class:`APIKey <APIKey>`

Usage:
Expand All @@ -2432,6 +2434,7 @@ def update_api_key(
access_key=access_key,
default_project_id=default_project_id,
description=description,
expires_at=expires_at,
),
self.client,
),
Expand Down
3 changes: 3 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,9 @@ def marshal_UpdateAPIKeyRequest(
if request.description is not None:
output["description"] = request.description

if request.expires_at is not None:
output["expires_at"] = request.expires_at.isoformat()

return output


Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,11 @@ class UpdateAPIKeyRequest:
New description to update.
"""

expires_at: Optional[datetime] = None
"""
New expiration date of the API key.
"""


@dataclass
class UpdateApplicationRequest:
Expand Down