Skip to content

feat(block): add tags in ListVolumesRequest #743

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
Nov 7, 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/block/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ async def list_volumes(
page_size: Optional[int] = None,
name: Optional[str] = None,
product_resource_id: Optional[str] = None,
tags: Optional[List[str]] = None,
) -> ListVolumesResponse:
"""
List volumes.
Expand All @@ -147,6 +148,7 @@ async def list_volumes(
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
:param name: Filter the return volumes by their names.
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
:param tags: Filter by tags. Only volumes with one or more matching tags will be returned.
:return: :class:`ListVolumesResponse <ListVolumesResponse>`

Usage:
Expand All @@ -169,6 +171,7 @@ async def list_volumes(
"page_size": page_size or self.client.default_page_size,
"product_resource_id": product_resource_id,
"project_id": project_id or self.client.default_project_id,
"tags": tags,
},
)

Expand All @@ -186,6 +189,7 @@ async def list_volumes_all(
page_size: Optional[int] = None,
name: Optional[str] = None,
product_resource_id: Optional[str] = None,
tags: Optional[List[str]] = None,
) -> List[Volume]:
"""
List volumes.
Expand All @@ -198,6 +202,7 @@ async def list_volumes_all(
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
:param name: Filter the return volumes by their names.
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
:param tags: Filter by tags. Only volumes with one or more matching tags will be returned.
:return: :class:`List[Volume] <List[Volume]>`

Usage:
Expand All @@ -219,6 +224,7 @@ async def list_volumes_all(
"page_size": page_size,
"name": name,
"product_resource_id": product_resource_id,
"tags": tags,
},
)

Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/block/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,11 @@ class ListVolumesRequest:
Filter by a product resource ID linked to this volume (such as an Instance ID).
"""

tags: Optional[List[str]]
"""
Filter by tags. Only volumes with one or more matching tags will be returned.
"""


@dataclass
class ListVolumesResponse:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/block/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def list_volumes(
page_size: Optional[int] = None,
name: Optional[str] = None,
product_resource_id: Optional[str] = None,
tags: Optional[List[str]] = None,
) -> ListVolumesResponse:
"""
List volumes.
Expand All @@ -147,6 +148,7 @@ def list_volumes(
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
:param name: Filter the return volumes by their names.
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
:param tags: Filter by tags. Only volumes with one or more matching tags will be returned.
:return: :class:`ListVolumesResponse <ListVolumesResponse>`

Usage:
Expand All @@ -169,6 +171,7 @@ def list_volumes(
"page_size": page_size or self.client.default_page_size,
"product_resource_id": product_resource_id,
"project_id": project_id or self.client.default_project_id,
"tags": tags,
},
)

Expand All @@ -186,6 +189,7 @@ def list_volumes_all(
page_size: Optional[int] = None,
name: Optional[str] = None,
product_resource_id: Optional[str] = None,
tags: Optional[List[str]] = None,
) -> List[Volume]:
"""
List volumes.
Expand All @@ -198,6 +202,7 @@ def list_volumes_all(
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
:param name: Filter the return volumes by their names.
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
:param tags: Filter by tags. Only volumes with one or more matching tags will be returned.
:return: :class:`List[Volume] <List[Volume]>`

Usage:
Expand All @@ -219,6 +224,7 @@ def list_volumes_all(
"page_size": page_size,
"name": name,
"product_resource_id": product_resource_id,
"tags": tags,
},
)

Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/block/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,11 @@ class ListVolumesRequest:
Filter by a product resource ID linked to this volume (such as an Instance ID).
"""

tags: Optional[List[str]]
"""
Filter by tags. Only volumes with one or more matching tags will be returned.
"""


@dataclass
class ListVolumesResponse:
Expand Down