Skip to content

Commit 68ea8ae

Browse files
authored
feat(iam): make sure audience_id is required (#948)
1 parent 87a34b1 commit 68ea8ae

File tree

4 files changed

+30
-22
lines changed

4 files changed

+30
-22
lines changed

scaleway-async/scaleway_async/iam/v1alpha1/api.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,16 +2456,16 @@ async def get_quotum(
24562456
async def list_jw_ts(
24572457
self,
24582458
*,
2459+
audience_id: str,
24592460
order_by: Optional[ListJWTsRequestOrderBy] = None,
2460-
audience_id: Optional[str] = None,
24612461
page_size: Optional[int] = None,
24622462
page: Optional[int] = None,
24632463
expired: Optional[bool] = None,
24642464
) -> ListJWTsResponse:
24652465
"""
24662466
List JWTs.
2467-
:param order_by: Criteria for sorting results.
24682467
:param audience_id: ID of the user to search.
2468+
:param order_by: Criteria for sorting results.
24692469
:param page_size: Number of results per page. Value must be between 1 and 100.
24702470
:param page: Page number. Value must be greater to 1.
24712471
:param expired: Filter out expired JWTs or not.
@@ -2474,7 +2474,9 @@ async def list_jw_ts(
24742474
Usage:
24752475
::
24762476
2477-
result = await api.list_jw_ts()
2477+
result = await api.list_jw_ts(
2478+
audience_id="example",
2479+
)
24782480
"""
24792481

24802482
res = self._request(
@@ -2495,16 +2497,16 @@ async def list_jw_ts(
24952497
async def list_jw_ts_all(
24962498
self,
24972499
*,
2500+
audience_id: str,
24982501
order_by: Optional[ListJWTsRequestOrderBy] = None,
2499-
audience_id: Optional[str] = None,
25002502
page_size: Optional[int] = None,
25012503
page: Optional[int] = None,
25022504
expired: Optional[bool] = None,
25032505
) -> List[JWT]:
25042506
"""
25052507
List JWTs.
2506-
:param order_by: Criteria for sorting results.
25072508
:param audience_id: ID of the user to search.
2509+
:param order_by: Criteria for sorting results.
25082510
:param page_size: Number of results per page. Value must be between 1 and 100.
25092511
:param page: Page number. Value must be greater to 1.
25102512
:param expired: Filter out expired JWTs or not.
@@ -2513,16 +2515,18 @@ async def list_jw_ts_all(
25132515
Usage:
25142516
::
25152517
2516-
result = await api.list_jw_ts_all()
2518+
result = await api.list_jw_ts_all(
2519+
audience_id="example",
2520+
)
25172521
"""
25182522

25192523
return await fetch_all_pages_async(
25202524
type=ListJWTsResponse,
25212525
key="jwts",
25222526
fetcher=self.list_jw_ts,
25232527
args={
2524-
"order_by": order_by,
25252528
"audience_id": audience_id,
2529+
"order_by": order_by,
25262530
"page_size": page_size,
25272531
"page": page,
25282532
"expired": expired,

scaleway-async/scaleway_async/iam/v1alpha1/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,14 +1508,14 @@ class ListGroupsResponse:
15081508

15091509
@dataclass
15101510
class ListJWTsRequest:
1511-
order_by: Optional[ListJWTsRequestOrderBy]
1511+
audience_id: str
15121512
"""
1513-
Criteria for sorting results.
1513+
ID of the user to search.
15141514
"""
15151515

1516-
audience_id: Optional[str]
1516+
order_by: Optional[ListJWTsRequestOrderBy]
15171517
"""
1518-
ID of the user to search.
1518+
Criteria for sorting results.
15191519
"""
15201520

15211521
page_size: Optional[int]

scaleway/scaleway/iam/v1alpha1/api.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,16 +2456,16 @@ def get_quotum(
24562456
def list_jw_ts(
24572457
self,
24582458
*,
2459+
audience_id: str,
24592460
order_by: Optional[ListJWTsRequestOrderBy] = None,
2460-
audience_id: Optional[str] = None,
24612461
page_size: Optional[int] = None,
24622462
page: Optional[int] = None,
24632463
expired: Optional[bool] = None,
24642464
) -> ListJWTsResponse:
24652465
"""
24662466
List JWTs.
2467-
:param order_by: Criteria for sorting results.
24682467
:param audience_id: ID of the user to search.
2468+
:param order_by: Criteria for sorting results.
24692469
:param page_size: Number of results per page. Value must be between 1 and 100.
24702470
:param page: Page number. Value must be greater to 1.
24712471
:param expired: Filter out expired JWTs or not.
@@ -2474,7 +2474,9 @@ def list_jw_ts(
24742474
Usage:
24752475
::
24762476
2477-
result = api.list_jw_ts()
2477+
result = api.list_jw_ts(
2478+
audience_id="example",
2479+
)
24782480
"""
24792481

24802482
res = self._request(
@@ -2495,16 +2497,16 @@ def list_jw_ts(
24952497
def list_jw_ts_all(
24962498
self,
24972499
*,
2500+
audience_id: str,
24982501
order_by: Optional[ListJWTsRequestOrderBy] = None,
2499-
audience_id: Optional[str] = None,
25002502
page_size: Optional[int] = None,
25012503
page: Optional[int] = None,
25022504
expired: Optional[bool] = None,
25032505
) -> List[JWT]:
25042506
"""
25052507
List JWTs.
2506-
:param order_by: Criteria for sorting results.
25072508
:param audience_id: ID of the user to search.
2509+
:param order_by: Criteria for sorting results.
25082510
:param page_size: Number of results per page. Value must be between 1 and 100.
25092511
:param page: Page number. Value must be greater to 1.
25102512
:param expired: Filter out expired JWTs or not.
@@ -2513,16 +2515,18 @@ def list_jw_ts_all(
25132515
Usage:
25142516
::
25152517
2516-
result = api.list_jw_ts_all()
2518+
result = api.list_jw_ts_all(
2519+
audience_id="example",
2520+
)
25172521
"""
25182522

25192523
return fetch_all_pages(
25202524
type=ListJWTsResponse,
25212525
key="jwts",
25222526
fetcher=self.list_jw_ts,
25232527
args={
2524-
"order_by": order_by,
25252528
"audience_id": audience_id,
2529+
"order_by": order_by,
25262530
"page_size": page_size,
25272531
"page": page,
25282532
"expired": expired,

scaleway/scaleway/iam/v1alpha1/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,14 +1508,14 @@ class ListGroupsResponse:
15081508

15091509
@dataclass
15101510
class ListJWTsRequest:
1511-
order_by: Optional[ListJWTsRequestOrderBy]
1511+
audience_id: str
15121512
"""
1513-
Criteria for sorting results.
1513+
ID of the user to search.
15141514
"""
15151515

1516-
audience_id: Optional[str]
1516+
order_by: Optional[ListJWTsRequestOrderBy]
15171517
"""
1518-
ID of the user to search.
1518+
Criteria for sorting results.
15191519
"""
15201520

15211521
page_size: Optional[int]

0 commit comments

Comments
 (0)