Skip to content

feat(iam): add type filter to ListUsersRequest #905

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
Mar 12, 2025
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
14 changes: 7 additions & 7 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ListUsersRequestOrderBy,
LogAction,
LogResourceType,
UserStatus,
UserType,
APIKey,
AddGroupMemberRequest,
AddGroupMembersRequest,
Expand Down Expand Up @@ -376,7 +376,7 @@ async def list_users(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
type_: Optional[UserType] = None,
) -> ListUsersResponse:
"""
List users of an Organization.
Expand All @@ -388,7 +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.
:param type_: Filter by user type.
:return: :class:`ListUsersResponse <ListUsersResponse>`

Usage:
Expand All @@ -407,8 +407,8 @@ 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,
"type": type_,
"user_ids": user_ids,
},
)
Expand All @@ -426,7 +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,
type_: Optional[UserType] = None,
) -> List[User]:
"""
List users of an Organization.
Expand All @@ -438,7 +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.
:param type_: Filter by user type.
:return: :class:`List[User] <List[User]>`

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

Expand Down
4 changes: 2 additions & 2 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1834,9 +1834,9 @@ class ListUsersRequest:
Filter by tags containing a given string.
"""

status: Optional[UserStatus]
type_: Optional[UserType]
"""
Filter by user status.
Filter by user type.
"""


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

Usage:
Expand All @@ -407,8 +407,8 @@ 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,
"type": type_,
"user_ids": user_ids,
},
)
Expand All @@ -426,7 +426,7 @@ def list_users_all(
user_ids: Optional[List[str]] = None,
mfa: Optional[bool] = None,
tag: Optional[str] = None,
status: Optional[UserStatus] = None,
type_: Optional[UserType] = None,
) -> List[User]:
"""
List users of an Organization.
Expand All @@ -438,7 +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.
:param type_: Filter by user type.
:return: :class:`List[User] <List[User]>`

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

Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1834,9 +1834,9 @@ class ListUsersRequest:
Filter by tags containing a given string.
"""

status: Optional[UserStatus]
type_: Optional[UserType]
"""
Filter by user status.
Filter by user type.
"""


Expand Down