Skip to content

Commit 172d253

Browse files
committed
feat: update generated APIs
1 parent ecfee66 commit 172d253

File tree

4 files changed

+68
-8
lines changed

4 files changed

+68
-8
lines changed

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ async def list_volume_types_all(
126126
async def list_volumes(
127127
self,
128128
*,
129+
include_deleted: bool,
129130
zone: Optional[ScwZone] = None,
130131
order_by: Optional[ListVolumesRequestOrderBy] = None,
131132
project_id: Optional[str] = None,
@@ -139,6 +140,7 @@ async def list_volumes(
139140
"""
140141
List volumes.
141142
List all existing volumes in a specified zone. By default, the volumes listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
143+
:param include_deleted: Display deleted volumes not erased yet.
142144
:param zone: Zone to target. If none is passed will use default zone from the config.
143145
:param order_by: Criteria to use when ordering the list.
144146
:param project_id: Filter by Project ID.
@@ -153,7 +155,9 @@ async def list_volumes(
153155
Usage:
154156
::
155157
156-
result = await api.list_volumes()
158+
result = await api.list_volumes(
159+
include_deleted=False,
160+
)
157161
"""
158162

159163
param_zone = validate_path_param("zone", zone or self.client.default_zone)
@@ -162,6 +166,7 @@ async def list_volumes(
162166
"GET",
163167
f"/block/v1/zones/{param_zone}/volumes",
164168
params={
169+
"include_deleted": include_deleted,
165170
"name": name,
166171
"order_by": order_by,
167172
"organization_id": organization_id
@@ -180,6 +185,7 @@ async def list_volumes(
180185
async def list_volumes_all(
181186
self,
182187
*,
188+
include_deleted: bool,
183189
zone: Optional[ScwZone] = None,
184190
order_by: Optional[ListVolumesRequestOrderBy] = None,
185191
project_id: Optional[str] = None,
@@ -193,6 +199,7 @@ async def list_volumes_all(
193199
"""
194200
List volumes.
195201
List all existing volumes in a specified zone. By default, the volumes listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
202+
:param include_deleted: Display deleted volumes not erased yet.
196203
:param zone: Zone to target. If none is passed will use default zone from the config.
197204
:param order_by: Criteria to use when ordering the list.
198205
:param project_id: Filter by Project ID.
@@ -207,14 +214,17 @@ async def list_volumes_all(
207214
Usage:
208215
::
209216
210-
result = await api.list_volumes_all()
217+
result = await api.list_volumes_all(
218+
include_deleted=False,
219+
)
211220
"""
212221

213222
return await fetch_all_pages_async(
214223
type=ListVolumesResponse,
215224
key="volumes",
216225
fetcher=self.list_volumes,
217226
args={
227+
"include_deleted": include_deleted,
218228
"zone": zone,
219229
"order_by": order_by,
220230
"project_id": project_id,
@@ -437,6 +447,7 @@ async def update_volume(
437447
async def list_snapshots(
438448
self,
439449
*,
450+
include_deleted: bool,
440451
zone: Optional[ScwZone] = None,
441452
order_by: Optional[ListSnapshotsRequestOrderBy] = None,
442453
project_id: Optional[str] = None,
@@ -450,6 +461,7 @@ async def list_snapshots(
450461
"""
451462
List all snapshots.
452463
List all available snapshots in a specified zone. By default, the snapshots listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
464+
:param include_deleted: Display deleted snapshots not erased yet.
453465
:param zone: Zone to target. If none is passed will use default zone from the config.
454466
:param order_by: Criteria to use when ordering the list.
455467
:param project_id: Filter by Project ID.
@@ -464,7 +476,9 @@ async def list_snapshots(
464476
Usage:
465477
::
466478
467-
result = await api.list_snapshots()
479+
result = await api.list_snapshots(
480+
include_deleted=False,
481+
)
468482
"""
469483

470484
param_zone = validate_path_param("zone", zone or self.client.default_zone)
@@ -473,6 +487,7 @@ async def list_snapshots(
473487
"GET",
474488
f"/block/v1/zones/{param_zone}/snapshots",
475489
params={
490+
"include_deleted": include_deleted,
476491
"name": name,
477492
"order_by": order_by,
478493
"organization_id": organization_id
@@ -491,6 +506,7 @@ async def list_snapshots(
491506
async def list_snapshots_all(
492507
self,
493508
*,
509+
include_deleted: bool,
494510
zone: Optional[ScwZone] = None,
495511
order_by: Optional[ListSnapshotsRequestOrderBy] = None,
496512
project_id: Optional[str] = None,
@@ -504,6 +520,7 @@ async def list_snapshots_all(
504520
"""
505521
List all snapshots.
506522
List all available snapshots in a specified zone. By default, the snapshots listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
523+
:param include_deleted: Display deleted snapshots not erased yet.
507524
:param zone: Zone to target. If none is passed will use default zone from the config.
508525
:param order_by: Criteria to use when ordering the list.
509526
:param project_id: Filter by Project ID.
@@ -518,14 +535,17 @@ async def list_snapshots_all(
518535
Usage:
519536
::
520537
521-
result = await api.list_snapshots_all()
538+
result = await api.list_snapshots_all(
539+
include_deleted=False,
540+
)
522541
"""
523542

524543
return await fetch_all_pages_async(
525544
type=ListSnapshotsResponse,
526545
key="snapshots",
527546
fetcher=self.list_snapshots,
528547
args={
548+
"include_deleted": include_deleted,
529549
"zone": zone,
530550
"order_by": order_by,
531551
"project_id": project_id,

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ class ImportSnapshotFromObjectStorageRequest:
523523

524524
@dataclass
525525
class ListSnapshotsRequest:
526+
include_deleted: bool
527+
"""
528+
Display deleted snapshots not erased yet.
529+
"""
530+
526531
zone: Optional[ScwZone]
527532
"""
528533
Zone to target. If none is passed will use default zone from the config.
@@ -615,6 +620,11 @@ class ListVolumeTypesResponse:
615620

616621
@dataclass
617622
class ListVolumesRequest:
623+
include_deleted: bool
624+
"""
625+
Display deleted volumes not erased yet.
626+
"""
627+
618628
zone: Optional[ScwZone]
619629
"""
620630
Zone to target. If none is passed will use default zone from the config.

scaleway/scaleway/block/v1/api.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def list_volume_types_all(
126126
def list_volumes(
127127
self,
128128
*,
129+
include_deleted: bool,
129130
zone: Optional[ScwZone] = None,
130131
order_by: Optional[ListVolumesRequestOrderBy] = None,
131132
project_id: Optional[str] = None,
@@ -139,6 +140,7 @@ def list_volumes(
139140
"""
140141
List volumes.
141142
List all existing volumes in a specified zone. By default, the volumes listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
143+
:param include_deleted: Display deleted volumes not erased yet.
142144
:param zone: Zone to target. If none is passed will use default zone from the config.
143145
:param order_by: Criteria to use when ordering the list.
144146
:param project_id: Filter by Project ID.
@@ -153,7 +155,9 @@ def list_volumes(
153155
Usage:
154156
::
155157
156-
result = api.list_volumes()
158+
result = api.list_volumes(
159+
include_deleted=False,
160+
)
157161
"""
158162

159163
param_zone = validate_path_param("zone", zone or self.client.default_zone)
@@ -162,6 +166,7 @@ def list_volumes(
162166
"GET",
163167
f"/block/v1/zones/{param_zone}/volumes",
164168
params={
169+
"include_deleted": include_deleted,
165170
"name": name,
166171
"order_by": order_by,
167172
"organization_id": organization_id
@@ -180,6 +185,7 @@ def list_volumes(
180185
def list_volumes_all(
181186
self,
182187
*,
188+
include_deleted: bool,
183189
zone: Optional[ScwZone] = None,
184190
order_by: Optional[ListVolumesRequestOrderBy] = None,
185191
project_id: Optional[str] = None,
@@ -193,6 +199,7 @@ def list_volumes_all(
193199
"""
194200
List volumes.
195201
List all existing volumes in a specified zone. By default, the volumes listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
202+
:param include_deleted: Display deleted volumes not erased yet.
196203
:param zone: Zone to target. If none is passed will use default zone from the config.
197204
:param order_by: Criteria to use when ordering the list.
198205
:param project_id: Filter by Project ID.
@@ -207,14 +214,17 @@ def list_volumes_all(
207214
Usage:
208215
::
209216
210-
result = api.list_volumes_all()
217+
result = api.list_volumes_all(
218+
include_deleted=False,
219+
)
211220
"""
212221

213222
return fetch_all_pages(
214223
type=ListVolumesResponse,
215224
key="volumes",
216225
fetcher=self.list_volumes,
217226
args={
227+
"include_deleted": include_deleted,
218228
"zone": zone,
219229
"order_by": order_by,
220230
"project_id": project_id,
@@ -437,6 +447,7 @@ def update_volume(
437447
def list_snapshots(
438448
self,
439449
*,
450+
include_deleted: bool,
440451
zone: Optional[ScwZone] = None,
441452
order_by: Optional[ListSnapshotsRequestOrderBy] = None,
442453
project_id: Optional[str] = None,
@@ -450,6 +461,7 @@ def list_snapshots(
450461
"""
451462
List all snapshots.
452463
List all available snapshots in a specified zone. By default, the snapshots listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
464+
:param include_deleted: Display deleted snapshots not erased yet.
453465
:param zone: Zone to target. If none is passed will use default zone from the config.
454466
:param order_by: Criteria to use when ordering the list.
455467
:param project_id: Filter by Project ID.
@@ -464,7 +476,9 @@ def list_snapshots(
464476
Usage:
465477
::
466478
467-
result = api.list_snapshots()
479+
result = api.list_snapshots(
480+
include_deleted=False,
481+
)
468482
"""
469483

470484
param_zone = validate_path_param("zone", zone or self.client.default_zone)
@@ -473,6 +487,7 @@ def list_snapshots(
473487
"GET",
474488
f"/block/v1/zones/{param_zone}/snapshots",
475489
params={
490+
"include_deleted": include_deleted,
476491
"name": name,
477492
"order_by": order_by,
478493
"organization_id": organization_id
@@ -491,6 +506,7 @@ def list_snapshots(
491506
def list_snapshots_all(
492507
self,
493508
*,
509+
include_deleted: bool,
494510
zone: Optional[ScwZone] = None,
495511
order_by: Optional[ListSnapshotsRequestOrderBy] = None,
496512
project_id: Optional[str] = None,
@@ -504,6 +520,7 @@ def list_snapshots_all(
504520
"""
505521
List all snapshots.
506522
List all available snapshots in a specified zone. By default, the snapshots listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
523+
:param include_deleted: Display deleted snapshots not erased yet.
507524
:param zone: Zone to target. If none is passed will use default zone from the config.
508525
:param order_by: Criteria to use when ordering the list.
509526
:param project_id: Filter by Project ID.
@@ -518,14 +535,17 @@ def list_snapshots_all(
518535
Usage:
519536
::
520537
521-
result = api.list_snapshots_all()
538+
result = api.list_snapshots_all(
539+
include_deleted=False,
540+
)
522541
"""
523542

524543
return fetch_all_pages(
525544
type=ListSnapshotsResponse,
526545
key="snapshots",
527546
fetcher=self.list_snapshots,
528547
args={
548+
"include_deleted": include_deleted,
529549
"zone": zone,
530550
"order_by": order_by,
531551
"project_id": project_id,

scaleway/scaleway/block/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ class ImportSnapshotFromObjectStorageRequest:
523523

524524
@dataclass
525525
class ListSnapshotsRequest:
526+
include_deleted: bool
527+
"""
528+
Display deleted snapshots not erased yet.
529+
"""
530+
526531
zone: Optional[ScwZone]
527532
"""
528533
Zone to target. If none is passed will use default zone from the config.
@@ -615,6 +620,11 @@ class ListVolumeTypesResponse:
615620

616621
@dataclass
617622
class ListVolumesRequest:
623+
include_deleted: bool
624+
"""
625+
Display deleted volumes not erased yet.
626+
"""
627+
618628
zone: Optional[ScwZone]
619629
"""
620630
Zone to target. If none is passed will use default zone from the config.

0 commit comments

Comments
 (0)