Skip to content

Commit 9fa2dfb

Browse files
authored
feat(iam): allow filtering by name in ListQuotas (#474)
1 parent a42056a commit 9fa2dfb

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,7 @@ async def list_quota(
20182018
page_size: Optional[int] = None,
20192019
page: Optional[int] = None,
20202020
organization_id: Optional[str] = None,
2021+
quotum_names: Optional[List[str]] = None,
20212022
) -> ListQuotaResponse:
20222023
"""
20232024
List all quotas in the Organization.
@@ -2026,6 +2027,7 @@ async def list_quota(
20262027
:param page_size: Number of results per page. Value must be between 1 and 100.
20272028
:param page: Page number. Value must be greater than 1.
20282029
:param organization_id: Filter by Organization ID.
2030+
:param quotum_names: List of quotum names to filter from.
20292031
:return: :class:`ListQuotaResponse <ListQuotaResponse>`
20302032
20312033
Usage:
@@ -2043,6 +2045,7 @@ async def list_quota(
20432045
or self.client.default_organization_id,
20442046
"page": page,
20452047
"page_size": page_size or self.client.default_page_size,
2048+
"quotum_names": quotum_names,
20462049
},
20472050
)
20482051

@@ -2056,6 +2059,7 @@ async def list_quota_all(
20562059
page_size: Optional[int] = None,
20572060
page: Optional[int] = None,
20582061
organization_id: Optional[str] = None,
2062+
quotum_names: Optional[List[str]] = None,
20592063
) -> List[Quotum]:
20602064
"""
20612065
List all quotas in the Organization.
@@ -2064,6 +2068,7 @@ async def list_quota_all(
20642068
:param page_size: Number of results per page. Value must be between 1 and 100.
20652069
:param page: Page number. Value must be greater than 1.
20662070
:param organization_id: Filter by Organization ID.
2071+
:param quotum_names: List of quotum names to filter from.
20672072
:return: :class:`List[Quotum] <List[Quotum]>`
20682073
20692074
Usage:
@@ -2081,6 +2086,7 @@ async def list_quota_all(
20812086
"page_size": page_size,
20822087
"page": page,
20832088
"organization_id": organization_id,
2089+
"quotum_names": quotum_names,
20842090
},
20852091
)
20862092

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,11 @@ class ListQuotaRequest:
14361436
Filter by Organization ID.
14371437
"""
14381438

1439+
quotum_names: Optional[List[str]]
1440+
"""
1441+
List of quotum names to filter from.
1442+
"""
1443+
14391444

14401445
@dataclass
14411446
class ListQuotaResponse:

scaleway/scaleway/iam/v1alpha1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,7 @@ def list_quota(
20182018
page_size: Optional[int] = None,
20192019
page: Optional[int] = None,
20202020
organization_id: Optional[str] = None,
2021+
quotum_names: Optional[List[str]] = None,
20212022
) -> ListQuotaResponse:
20222023
"""
20232024
List all quotas in the Organization.
@@ -2026,6 +2027,7 @@ def list_quota(
20262027
:param page_size: Number of results per page. Value must be between 1 and 100.
20272028
:param page: Page number. Value must be greater than 1.
20282029
:param organization_id: Filter by Organization ID.
2030+
:param quotum_names: List of quotum names to filter from.
20292031
:return: :class:`ListQuotaResponse <ListQuotaResponse>`
20302032
20312033
Usage:
@@ -2043,6 +2045,7 @@ def list_quota(
20432045
or self.client.default_organization_id,
20442046
"page": page,
20452047
"page_size": page_size or self.client.default_page_size,
2048+
"quotum_names": quotum_names,
20462049
},
20472050
)
20482051

@@ -2056,6 +2059,7 @@ def list_quota_all(
20562059
page_size: Optional[int] = None,
20572060
page: Optional[int] = None,
20582061
organization_id: Optional[str] = None,
2062+
quotum_names: Optional[List[str]] = None,
20592063
) -> List[Quotum]:
20602064
"""
20612065
List all quotas in the Organization.
@@ -2064,6 +2068,7 @@ def list_quota_all(
20642068
:param page_size: Number of results per page. Value must be between 1 and 100.
20652069
:param page: Page number. Value must be greater than 1.
20662070
:param organization_id: Filter by Organization ID.
2071+
:param quotum_names: List of quotum names to filter from.
20672072
:return: :class:`List[Quotum] <List[Quotum]>`
20682073
20692074
Usage:
@@ -2081,6 +2086,7 @@ def list_quota_all(
20812086
"page_size": page_size,
20822087
"page": page,
20832088
"organization_id": organization_id,
2089+
"quotum_names": quotum_names,
20842090
},
20852091
)
20862092

scaleway/scaleway/iam/v1alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,11 @@ class ListQuotaRequest:
14361436
Filter by Organization ID.
14371437
"""
14381438

1439+
quotum_names: Optional[List[str]]
1440+
"""
1441+
List of quotum names to filter from.
1442+
"""
1443+
14391444

14401445
@dataclass
14411446
class ListQuotaResponse:

0 commit comments

Comments
 (0)