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
18 changes: 11 additions & 7 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,16 +2456,16 @@ async def get_quotum(
async def list_jw_ts(
self,
*,
audience_id: str,
order_by: Optional[ListJWTsRequestOrderBy] = None,
audience_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
expired: Optional[bool] = None,
) -> ListJWTsResponse:
"""
List JWTs.
:param order_by: Criteria for sorting results.
:param audience_id: ID of the user to search.
:param order_by: Criteria for sorting results.
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater to 1.
:param expired: Filter out expired JWTs or not.
Expand All @@ -2474,7 +2474,9 @@ async def list_jw_ts(
Usage:
::

result = await api.list_jw_ts()
result = await api.list_jw_ts(
audience_id="example",
)
"""

res = self._request(
Expand All @@ -2495,16 +2497,16 @@ async def list_jw_ts(
async def list_jw_ts_all(
self,
*,
audience_id: str,
order_by: Optional[ListJWTsRequestOrderBy] = None,
audience_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
expired: Optional[bool] = None,
) -> List[JWT]:
"""
List JWTs.
:param order_by: Criteria for sorting results.
:param audience_id: ID of the user to search.
:param order_by: Criteria for sorting results.
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater to 1.
:param expired: Filter out expired JWTs or not.
Expand All @@ -2513,16 +2515,18 @@ async def list_jw_ts_all(
Usage:
::

result = await api.list_jw_ts_all()
result = await api.list_jw_ts_all(
audience_id="example",
)
"""

return await fetch_all_pages_async(
type=ListJWTsResponse,
key="jwts",
fetcher=self.list_jw_ts,
args={
"order_by": order_by,
"audience_id": audience_id,
"order_by": order_by,
"page_size": page_size,
"page": page,
"expired": expired,
Expand Down
8 changes: 4 additions & 4 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,14 +1508,14 @@ class ListGroupsResponse:

@dataclass
class ListJWTsRequest:
order_by: Optional[ListJWTsRequestOrderBy]
audience_id: str
"""
Criteria for sorting results.
ID of the user to search.
"""

audience_id: Optional[str]
order_by: Optional[ListJWTsRequestOrderBy]
"""
ID of the user to search.
Criteria for sorting results.
"""

page_size: Optional[int]
Expand Down
18 changes: 11 additions & 7 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,16 +2456,16 @@ def get_quotum(
def list_jw_ts(
self,
*,
audience_id: str,
order_by: Optional[ListJWTsRequestOrderBy] = None,
audience_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
expired: Optional[bool] = None,
) -> ListJWTsResponse:
"""
List JWTs.
:param order_by: Criteria for sorting results.
:param audience_id: ID of the user to search.
:param order_by: Criteria for sorting results.
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater to 1.
:param expired: Filter out expired JWTs or not.
Expand All @@ -2474,7 +2474,9 @@ def list_jw_ts(
Usage:
::

result = api.list_jw_ts()
result = api.list_jw_ts(
audience_id="example",
)
"""

res = self._request(
Expand All @@ -2495,16 +2497,16 @@ def list_jw_ts(
def list_jw_ts_all(
self,
*,
audience_id: str,
order_by: Optional[ListJWTsRequestOrderBy] = None,
audience_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
expired: Optional[bool] = None,
) -> List[JWT]:
"""
List JWTs.
:param order_by: Criteria for sorting results.
:param audience_id: ID of the user to search.
:param order_by: Criteria for sorting results.
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater to 1.
:param expired: Filter out expired JWTs or not.
Expand All @@ -2513,16 +2515,18 @@ def list_jw_ts_all(
Usage:
::

result = api.list_jw_ts_all()
result = api.list_jw_ts_all(
audience_id="example",
)
"""

return fetch_all_pages(
type=ListJWTsResponse,
key="jwts",
fetcher=self.list_jw_ts,
args={
"order_by": order_by,
"audience_id": audience_id,
"order_by": order_by,
"page_size": page_size,
"page": page,
"expired": expired,
Expand Down
8 changes: 4 additions & 4 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,14 +1508,14 @@ class ListGroupsResponse:

@dataclass
class ListJWTsRequest:
order_by: Optional[ListJWTsRequestOrderBy]
audience_id: str
"""
Criteria for sorting results.
ID of the user to search.
"""

audience_id: Optional[str]
order_by: Optional[ListJWTsRequestOrderBy]
"""
ID of the user to search.
Criteria for sorting results.
"""

page_size: Optional[int]
Expand Down