Skip to content

Commit 41a912d

Browse files
authored
feat(ipam): add support for resource_ids filtering in ListIPsRequest (#776)
1 parent 387c057 commit 41a912d

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

scaleway-async/scaleway_async/ipam/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ async def list_i_ps(
263263
vpc_id: Optional[str] = None,
264264
attached: Optional[bool] = None,
265265
resource_id: Optional[str] = None,
266+
resource_ids: Optional[List[str]] = None,
266267
resource_type: Optional[ResourceType] = None,
267268
mac_address: Optional[str] = None,
268269
tags: Optional[List[str]] = None,
@@ -288,6 +289,7 @@ async def list_i_ps(
288289
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
289290
:param attached: Defines whether to filter only for IPs which are attached to a resource.
290291
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
292+
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
291293
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
292294
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
293295
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
@@ -321,6 +323,7 @@ async def list_i_ps(
321323
"page_size": page_size or self.client.default_page_size,
322324
"project_id": project_id or self.client.default_project_id,
323325
"resource_id": resource_id,
326+
"resource_ids": resource_ids,
324327
"resource_name": resource_name,
325328
"resource_type": resource_type,
326329
"resource_types": resource_types,
@@ -353,6 +356,7 @@ async def list_i_ps_all(
353356
vpc_id: Optional[str] = None,
354357
attached: Optional[bool] = None,
355358
resource_id: Optional[str] = None,
359+
resource_ids: Optional[List[str]] = None,
356360
resource_type: Optional[ResourceType] = None,
357361
mac_address: Optional[str] = None,
358362
tags: Optional[List[str]] = None,
@@ -378,6 +382,7 @@ async def list_i_ps_all(
378382
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
379383
:param attached: Defines whether to filter only for IPs which are attached to a resource.
380384
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
385+
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
381386
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
382387
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
383388
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
@@ -406,6 +411,7 @@ async def list_i_ps_all(
406411
"vpc_id": vpc_id,
407412
"attached": attached,
408413
"resource_id": resource_id,
414+
"resource_ids": resource_ids,
409415
"resource_type": resource_type,
410416
"mac_address": mac_address,
411417
"tags": tags,

scaleway-async/scaleway_async/ipam/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ class ListIPsRequest:
303303
Resource ID to filter for. Only IPs attached to this resource will be returned.
304304
"""
305305

306+
resource_ids: Optional[List[str]]
307+
"""
308+
Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
309+
"""
310+
306311
resource_type: Optional[ResourceType]
307312
"""
308313
Resource type to filter for. Only IPs attached to this type of resource will be returned.

scaleway/scaleway/ipam/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def list_i_ps(
263263
vpc_id: Optional[str] = None,
264264
attached: Optional[bool] = None,
265265
resource_id: Optional[str] = None,
266+
resource_ids: Optional[List[str]] = None,
266267
resource_type: Optional[ResourceType] = None,
267268
mac_address: Optional[str] = None,
268269
tags: Optional[List[str]] = None,
@@ -288,6 +289,7 @@ def list_i_ps(
288289
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
289290
:param attached: Defines whether to filter only for IPs which are attached to a resource.
290291
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
292+
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
291293
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
292294
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
293295
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
@@ -321,6 +323,7 @@ def list_i_ps(
321323
"page_size": page_size or self.client.default_page_size,
322324
"project_id": project_id or self.client.default_project_id,
323325
"resource_id": resource_id,
326+
"resource_ids": resource_ids,
324327
"resource_name": resource_name,
325328
"resource_type": resource_type,
326329
"resource_types": resource_types,
@@ -353,6 +356,7 @@ def list_i_ps_all(
353356
vpc_id: Optional[str] = None,
354357
attached: Optional[bool] = None,
355358
resource_id: Optional[str] = None,
359+
resource_ids: Optional[List[str]] = None,
356360
resource_type: Optional[ResourceType] = None,
357361
mac_address: Optional[str] = None,
358362
tags: Optional[List[str]] = None,
@@ -378,6 +382,7 @@ def list_i_ps_all(
378382
:param vpc_id: Only IPs owned by resources in this VPC will be returned.
379383
:param attached: Defines whether to filter only for IPs which are attached to a resource.
380384
:param resource_id: Resource ID to filter for. Only IPs attached to this resource will be returned.
385+
:param resource_ids: Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
381386
:param resource_type: Resource type to filter for. Only IPs attached to this type of resource will be returned.
382387
:param mac_address: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned.
383388
:param tags: Tags to filter for, only IPs with one or more matching tags will be returned.
@@ -406,6 +411,7 @@ def list_i_ps_all(
406411
"vpc_id": vpc_id,
407412
"attached": attached,
408413
"resource_id": resource_id,
414+
"resource_ids": resource_ids,
409415
"resource_type": resource_type,
410416
"mac_address": mac_address,
411417
"tags": tags,

scaleway/scaleway/ipam/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ class ListIPsRequest:
303303
Resource ID to filter for. Only IPs attached to this resource will be returned.
304304
"""
305305

306+
resource_ids: Optional[List[str]]
307+
"""
308+
Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned.
309+
"""
310+
306311
resource_type: Optional[ResourceType]
307312
"""
308313
Resource type to filter for. Only IPs attached to this type of resource will be returned.

0 commit comments

Comments
 (0)