Skip to content

feat(iam): allow filtering by name in ListQuotas #474

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
Apr 2, 2024
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
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,7 @@ async def list_quota(
page_size: Optional[int] = None,
page: Optional[int] = None,
organization_id: Optional[str] = None,
quotum_names: Optional[List[str]] = None,
) -> ListQuotaResponse:
"""
List all quotas in the Organization.
Expand All @@ -2026,6 +2027,7 @@ async def list_quota(
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater than 1.
:param organization_id: Filter by Organization ID.
:param quotum_names: List of quotum names to filter from.
:return: :class:`ListQuotaResponse <ListQuotaResponse>`

Usage:
Expand All @@ -2043,6 +2045,7 @@ async def list_quota(
or self.client.default_organization_id,
"page": page,
"page_size": page_size or self.client.default_page_size,
"quotum_names": quotum_names,
},
)

Expand All @@ -2056,6 +2059,7 @@ async def list_quota_all(
page_size: Optional[int] = None,
page: Optional[int] = None,
organization_id: Optional[str] = None,
quotum_names: Optional[List[str]] = None,
) -> List[Quotum]:
"""
List all quotas in the Organization.
Expand All @@ -2064,6 +2068,7 @@ async def list_quota_all(
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater than 1.
:param organization_id: Filter by Organization ID.
:param quotum_names: List of quotum names to filter from.
:return: :class:`List[Quotum] <List[Quotum]>`

Usage:
Expand All @@ -2081,6 +2086,7 @@ async def list_quota_all(
"page_size": page_size,
"page": page,
"organization_id": organization_id,
"quotum_names": quotum_names,
},
)

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 @@ -1436,6 +1436,11 @@ class ListQuotaRequest:
Filter by Organization ID.
"""

quotum_names: Optional[List[str]]
"""
List of quotum names to filter from.
"""


@dataclass
class ListQuotaResponse:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,7 @@ def list_quota(
page_size: Optional[int] = None,
page: Optional[int] = None,
organization_id: Optional[str] = None,
quotum_names: Optional[List[str]] = None,
) -> ListQuotaResponse:
"""
List all quotas in the Organization.
Expand All @@ -2026,6 +2027,7 @@ def list_quota(
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater than 1.
:param organization_id: Filter by Organization ID.
:param quotum_names: List of quotum names to filter from.
:return: :class:`ListQuotaResponse <ListQuotaResponse>`

Usage:
Expand All @@ -2043,6 +2045,7 @@ def list_quota(
or self.client.default_organization_id,
"page": page,
"page_size": page_size or self.client.default_page_size,
"quotum_names": quotum_names,
},
)

Expand All @@ -2056,6 +2059,7 @@ def list_quota_all(
page_size: Optional[int] = None,
page: Optional[int] = None,
organization_id: Optional[str] = None,
quotum_names: Optional[List[str]] = None,
) -> List[Quotum]:
"""
List all quotas in the Organization.
Expand All @@ -2064,6 +2068,7 @@ def list_quota_all(
:param page_size: Number of results per page. Value must be between 1 and 100.
:param page: Page number. Value must be greater than 1.
:param organization_id: Filter by Organization ID.
:param quotum_names: List of quotum names to filter from.
:return: :class:`List[Quotum] <List[Quotum]>`

Usage:
Expand All @@ -2081,6 +2086,7 @@ def list_quota_all(
"page_size": page_size,
"page": page,
"organization_id": organization_id,
"quotum_names": quotum_names,
},
)

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 @@ -1436,6 +1436,11 @@ class ListQuotaRequest:
Filter by Organization ID.
"""

quotum_names: Optional[List[str]]
"""
List of quotum names to filter from.
"""


@dataclass
class ListQuotaResponse:
Expand Down