Skip to content

feat(ipam): add support for resource_ids filtering in ListIPsRequest #776

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
Dec 3, 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/ipam/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ async def list_i_ps(
vpc_id: Optional[str] = None,
attached: Optional[bool] = None,
resource_id: Optional[str] = None,
resource_ids: Optional[List[str]] = None,
resource_type: Optional[ResourceType] = None,
mac_address: Optional[str] = None,
tags: Optional[List[str]] = None,
Expand All @@ -288,6 +289,7 @@ async def list_i_ps(
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
:param attached: Defines whether to filter only for IPs which are attached to a resource.
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
Expand Down Expand Up @@ -321,6 +323,7 @@ async def list_i_ps(
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
"resource_id": resource_id,
"resource_ids": resource_ids,
"resource_name": resource_name,
"resource_type": resource_type,
"resource_types": resource_types,
Expand Down Expand Up @@ -353,6 +356,7 @@ async def list_i_ps_all(
vpc_id: Optional[str] = None,
attached: Optional[bool] = None,
resource_id: Optional[str] = None,
resource_ids: Optional[List[str]] = None,
resource_type: Optional[ResourceType] = None,
mac_address: Optional[str] = None,
tags: Optional[List[str]] = None,
Expand All @@ -378,6 +382,7 @@ async def list_i_ps_all(
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
:param attached: Defines whether to filter only for IPs which are attached to a resource.
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
Expand Down Expand Up @@ -406,6 +411,7 @@ async def list_i_ps_all(
"vpc_id": vpc_id,
"attached": attached,
"resource_id": resource_id,
"resource_ids": resource_ids,
"resource_type": resource_type,
"mac_address": mac_address,
"tags": tags,
Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/ipam/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ class ListIPsRequest:
Resource ID to filter for. Only IPs attached to this resource will be returned.
"""

resource_ids: Optional[List[str]]
"""
Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
"""

resource_type: Optional[ResourceType]
"""
Resource type to filter for. Only IPs attached to this type of resource will be returned.
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/ipam/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def list_i_ps(
vpc_id: Optional[str] = None,
attached: Optional[bool] = None,
resource_id: Optional[str] = None,
resource_ids: Optional[List[str]] = None,
resource_type: Optional[ResourceType] = None,
mac_address: Optional[str] = None,
tags: Optional[List[str]] = None,
Expand All @@ -288,6 +289,7 @@ def list_i_ps(
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
:param attached: Defines whether to filter only for IPs which are attached to a resource.
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
Expand Down Expand Up @@ -321,6 +323,7 @@ def list_i_ps(
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
"resource_id": resource_id,
"resource_ids": resource_ids,
"resource_name": resource_name,
"resource_type": resource_type,
"resource_types": resource_types,
Expand Down Expand Up @@ -353,6 +356,7 @@ def list_i_ps_all(
vpc_id: Optional[str] = None,
attached: Optional[bool] = None,
resource_id: Optional[str] = None,
resource_ids: Optional[List[str]] = None,
resource_type: Optional[ResourceType] = None,
mac_address: Optional[str] = None,
tags: Optional[List[str]] = None,
Expand All @@ -378,6 +382,7 @@ def list_i_ps_all(
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
:param attached: Defines whether to filter only for IPs which are attached to a resource.
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
Expand Down Expand Up @@ -406,6 +411,7 @@ def list_i_ps_all(
"vpc_id": vpc_id,
"attached": attached,
"resource_id": resource_id,
"resource_ids": resource_ids,
"resource_type": resource_type,
"mac_address": mac_address,
"tags": tags,
Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/ipam/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ class ListIPsRequest:
Resource ID to filter for. Only IPs attached to this resource will be returned.
"""

resource_ids: Optional[List[str]]
"""
Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
"""

resource_type: Optional[ResourceType]
"""
Resource type to filter for. Only IPs attached to this type of resource will be returned.
Expand Down
Loading