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 @@ -2910,13 +2910,15 @@ async def update_organization_security_settings(
enforce_password_renewal: Optional[bool] = None,
grace_period_duration: Optional[str] = None,
login_attempts_before_locked: Optional[int] = None,
max_login_session_duration: Optional[str] = None,
) -> OrganizationSecuritySettings:
"""
Update the security settings of an Organization.
:param organization_id: ID of the Organization.
:param enforce_password_renewal: Defines whether password renewal is enforced during first login.
:param grace_period_duration: Duration of the grace period to renew password or enable MFA.
:param login_attempts_before_locked: Number of login attempts before the account is locked.
:param max_login_session_duration: Maximum duration a login session will stay active before needing to relogin.
:return: :class:`OrganizationSecuritySettings <OrganizationSecuritySettings>`

Usage:
Expand All @@ -2938,6 +2940,7 @@ async def update_organization_security_settings(
enforce_password_renewal=enforce_password_renewal,
grace_period_duration=grace_period_duration,
login_attempts_before_locked=login_attempts_before_locked,
max_login_session_duration=max_login_session_duration,
),
self.client,
),
Expand Down
9 changes: 9 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,12 @@ def unmarshal_OrganizationSecuritySettings(data: Any) -> OrganizationSecuritySet
else:
args["grace_period_duration"] = None

field = data.get("max_login_session_duration", None)
if field is not None:
args["max_login_session_duration"] = field
else:
args["max_login_session_duration"] = None

return OrganizationSecuritySettings(**args)


Expand Down Expand Up @@ -2132,6 +2138,9 @@ def marshal_UpdateOrganizationSecuritySettingsRequest(
if request.login_attempts_before_locked is not None:
output["login_attempts_before_locked"] = request.login_attempts_before_locked

if request.max_login_session_duration is not None:
output["max_login_session_duration"] = request.max_login_session_duration

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,11 @@ class OrganizationSecuritySettings:
Duration of the grace period to renew password or enable MFA.
"""

max_login_session_duration: Optional[str] = None
"""
Maximum duration a login session will stay active before needing to relogin.
"""


@dataclass
class RemoveGroupMemberRequest:
Expand Down Expand Up @@ -2311,6 +2316,11 @@ class UpdateOrganizationSecuritySettingsRequest:
Number of login attempts before the account is locked.
"""

max_login_session_duration: Optional[str] = None
"""
Maximum duration a login session will stay active before needing to relogin.
"""


@dataclass
class UpdatePolicyRequest:
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 @@ -2910,13 +2910,15 @@ def update_organization_security_settings(
enforce_password_renewal: Optional[bool] = None,
grace_period_duration: Optional[str] = None,
login_attempts_before_locked: Optional[int] = None,
max_login_session_duration: Optional[str] = None,
) -> OrganizationSecuritySettings:
"""
Update the security settings of an Organization.
:param organization_id: ID of the Organization.
:param enforce_password_renewal: Defines whether password renewal is enforced during first login.
:param grace_period_duration: Duration of the grace period to renew password or enable MFA.
:param login_attempts_before_locked: Number of login attempts before the account is locked.
:param max_login_session_duration: Maximum duration a login session will stay active before needing to relogin.
:return: :class:`OrganizationSecuritySettings <OrganizationSecuritySettings>`

Usage:
Expand All @@ -2938,6 +2940,7 @@ def update_organization_security_settings(
enforce_password_renewal=enforce_password_renewal,
grace_period_duration=grace_period_duration,
login_attempts_before_locked=login_attempts_before_locked,
max_login_session_duration=max_login_session_duration,
),
self.client,
),
Expand Down
9 changes: 9 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,12 @@ def unmarshal_OrganizationSecuritySettings(data: Any) -> OrganizationSecuritySet
else:
args["grace_period_duration"] = None

field = data.get("max_login_session_duration", None)
if field is not None:
args["max_login_session_duration"] = field
else:
args["max_login_session_duration"] = None

return OrganizationSecuritySettings(**args)


Expand Down Expand Up @@ -2132,6 +2138,9 @@ def marshal_UpdateOrganizationSecuritySettingsRequest(
if request.login_attempts_before_locked is not None:
output["login_attempts_before_locked"] = request.login_attempts_before_locked

if request.max_login_session_duration is not None:
output["max_login_session_duration"] = request.max_login_session_duration

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,11 @@ class OrganizationSecuritySettings:
Duration of the grace period to renew password or enable MFA.
"""

max_login_session_duration: Optional[str] = None
"""
Maximum duration a login session will stay active before needing to relogin.
"""


@dataclass
class RemoveGroupMemberRequest:
Expand Down Expand Up @@ -2311,6 +2316,11 @@ class UpdateOrganizationSecuritySettingsRequest:
Number of login attempts before the account is locked.
"""

max_login_session_duration: Optional[str] = None
"""
Maximum duration a login session will stay active before needing to relogin.
"""


@dataclass
class UpdatePolicyRequest:
Expand Down