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
7 changes: 7 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ListUsersRequestOrderBy,
LogAction,
LogResourceType,
UserStatus,
APIKey,
AddGroupMemberRequest,
AddGroupMembersRequest,
Expand Down Expand Up @@ -375,6 +376,7 @@ async def list_users(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
) -> ListUsersResponse:
"""
List users of an Organization.
Expand All @@ -386,6 +388,7 @@ async def list_users(
:param user_ids: Filter by list of IDs.
:param mfa: Filter by MFA status.
:param tag: Filter by tags containing a given string.
:param status: Filter by user status.
:return: :class:`ListUsersResponse <ListUsersResponse>`

Usage:
Expand All @@ -404,6 +407,7 @@ async def list_users(
or self.client.default_organization_id,
"page": page,
"page_size": page_size or self.client.default_page_size,
"status": status,
"tag": tag,
"user_ids": user_ids,
},
Expand All @@ -422,6 +426,7 @@ async def list_users_all(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
) -> List[User]:
"""
List users of an Organization.
Expand All @@ -433,6 +438,7 @@ async def list_users_all(
:param user_ids: Filter by list of IDs.
:param mfa: Filter by MFA status.
:param tag: Filter by tags containing a given string.
:param status: Filter by user status.
:return: :class:`List[User] <List[User]>`

Usage:
Expand All @@ -453,6 +459,7 @@ async def list_users_all(
"user_ids": user_ids,
"mfa": mfa,
"tag": tag,
"status": status,
},
)

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 @@ -1834,6 +1834,11 @@ class ListUsersRequest:
Filter by tags containing a given string.
"""

status: Optional[UserStatus]
"""
Filter by user status.
"""


@dataclass
class ListUsersResponse:
Expand Down
7 changes: 7 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ListUsersRequestOrderBy,
LogAction,
LogResourceType,
UserStatus,
APIKey,
AddGroupMemberRequest,
AddGroupMembersRequest,
Expand Down Expand Up @@ -375,6 +376,7 @@ def list_users(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
) -> ListUsersResponse:
"""
List users of an Organization.
Expand All @@ -386,6 +388,7 @@ def list_users(
:param user_ids: Filter by list of IDs.
:param mfa: Filter by MFA status.
:param tag: Filter by tags containing a given string.
:param status: Filter by user status.
:return: :class:`ListUsersResponse <ListUsersResponse>`

Usage:
Expand All @@ -404,6 +407,7 @@ def list_users(
or self.client.default_organization_id,
"page": page,
"page_size": page_size or self.client.default_page_size,
"status": status,
"tag": tag,
"user_ids": user_ids,
},
Expand All @@ -422,6 +426,7 @@ def list_users_all(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
) -> List[User]:
"""
List users of an Organization.
Expand All @@ -433,6 +438,7 @@ def list_users_all(
:param user_ids: Filter by list of IDs.
:param mfa: Filter by MFA status.
:param tag: Filter by tags containing a given string.
:param status: Filter by user status.
:return: :class:`List[User] <List[User]>`

Usage:
Expand All @@ -453,6 +459,7 @@ def list_users_all(
"user_ids": user_ids,
"mfa": mfa,
"tag": tag,
"status": status,
},
)

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 @@ -1834,6 +1834,11 @@ class ListUsersRequest:
Filter by tags containing a given string.
"""

status: Optional[UserStatus]
"""
Filter by user status.
"""


@dataclass
class ListUsersResponse:
Expand Down