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
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
from .types import ListUsersResponse
from .types import LockUserRequest
from .types import MFAOTP
from .types import MigrateOrganizationGuestsRequest
from .types import OrganizationSecuritySettings
from .types import RemoveGroupMemberRequest
from .types import SetGroupMembersRequest
Expand Down Expand Up @@ -208,6 +209,7 @@
"ListUsersResponse",
"LockUserRequest",
"MFAOTP",
"MigrateOrganizationGuestsRequest",
"OrganizationSecuritySettings",
"RemoveGroupMemberRequest",
"SetGroupMembersRequest",
Expand Down
26 changes: 26 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2826,3 +2826,29 @@ async def update_organization_security_settings(

self._throw_on_error(res)
return unmarshal_OrganizationSecuritySettings(res.json())

async def migrate_organization_guests(
self,
*,
organization_id: Optional[str] = None,
) -> None:
"""
Migrate the organization's guests to IAM members.
:param organization_id: ID of the Organization.

Usage:
::

result = await api.migrate_organization_guests()
"""

param_organization_id = validate_path_param(
"organization_id", organization_id or self.client.default_organization_id
)

res = self._request(
"POST",
f"/iam/v1alpha1/organizations/{param_organization_id}/migrate-guests",
)

self._throw_on_error(res)
8 changes: 8 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,14 @@ class MFAOTP:
secret: str


@dataclass
class MigrateOrganizationGuestsRequest:
organization_id: Optional[str]
"""
ID of the Organization.
"""


@dataclass
class OrganizationSecuritySettings:
enforce_password_renewal: bool
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
from .types import ListUsersResponse
from .types import LockUserRequest
from .types import MFAOTP
from .types import MigrateOrganizationGuestsRequest
from .types import OrganizationSecuritySettings
from .types import RemoveGroupMemberRequest
from .types import SetGroupMembersRequest
Expand Down Expand Up @@ -208,6 +209,7 @@
"ListUsersResponse",
"LockUserRequest",
"MFAOTP",
"MigrateOrganizationGuestsRequest",
"OrganizationSecuritySettings",
"RemoveGroupMemberRequest",
"SetGroupMembersRequest",
Expand Down
26 changes: 26 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2826,3 +2826,29 @@ def update_organization_security_settings(

self._throw_on_error(res)
return unmarshal_OrganizationSecuritySettings(res.json())

def migrate_organization_guests(
self,
*,
organization_id: Optional[str] = None,
) -> None:
"""
Migrate the organization's guests to IAM members.
:param organization_id: ID of the Organization.

Usage:
::

result = api.migrate_organization_guests()
"""

param_organization_id = validate_path_param(
"organization_id", organization_id or self.client.default_organization_id
)

res = self._request(
"POST",
f"/iam/v1alpha1/organizations/{param_organization_id}/migrate-guests",
)

self._throw_on_error(res)
8 changes: 8 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,14 @@ class MFAOTP:
secret: str


@dataclass
class MigrateOrganizationGuestsRequest:
organization_id: Optional[str]
"""
ID of the Organization.
"""


@dataclass
class OrganizationSecuritySettings:
enforce_password_renewal: bool
Expand Down