Skip to content

Commit 8b61a5a

Browse files
authored
docs(block): revamp and quickstart improvements (#321)
1 parent 2263fbf commit 8b61a5a

File tree

4 files changed

+176
-178
lines changed

4 files changed

+176
-178
lines changed

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

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949

5050
class BlockV1Alpha1API(API):
5151
"""
52-
Scaleway Block Storage (SBS) API.
52+
Scaleway Block Storage API.
5353
5454
This API allows you to use and manage your Block Storage volumes.
55-
Scaleway Block Storage (SBS) API.
55+
Scaleway Block Storage API.
5656
"""
5757

5858
async def list_volume_types(
@@ -66,8 +66,8 @@ async def list_volume_types(
6666
List volume types.
6767
List all available volume types in a specified zone. The volume types listed are ordered by name in ascending order.
6868
:param zone: Zone to target. If none is passed will use default zone from the config.
69-
:param page: Positive integer to choose the page to return.
70-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
69+
:param page: Page number.
70+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
7171
:return: :class:`ListVolumeTypesResponse <ListVolumeTypesResponse>`
7272
7373
Usage:
@@ -101,8 +101,8 @@ async def list_volume_types_all(
101101
List volume types.
102102
List all available volume types in a specified zone. The volume types listed are ordered by name in ascending order.
103103
:param zone: Zone to target. If none is passed will use default zone from the config.
104-
:param page: Positive integer to choose the page to return.
105-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
104+
:param page: Page number.
105+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
106106
:return: :class:`List[ListVolumeTypesResponse] <List[ListVolumeTypesResponse]>`
107107
108108
Usage:
@@ -135,14 +135,14 @@ async def list_volumes(
135135
) -> ListVolumesResponse:
136136
"""
137137
List volumes.
138-
List all existing volumes in a specified zone. By default, the volume listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
138+
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.
139139
:param zone: Zone to target. If none is passed will use default zone from the config.
140-
:param order_by: Sort order of the returned volumes.
141-
:param project_id: Only list volumes of this project ID.
142-
:param page: Positive integer to choose the page to return.
143-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
140+
:param order_by: Criteria to use when ordering the list.
141+
:param project_id: Filter by Project ID.
142+
:param page: Page number.
143+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
144144
:param name: Filter the return volumes by their names.
145-
:param product_resource_id: Filter by a Product Resource Id linked to this volume (such as an Instance Server Id).
145+
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
146146
:return: :class:`ListVolumesResponse <ListVolumesResponse>`
147147
148148
Usage:
@@ -182,14 +182,14 @@ async def list_volumes_all(
182182
) -> List[Volume]:
183183
"""
184184
List volumes.
185-
List all existing volumes in a specified zone. By default, the volume listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
185+
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.
186186
:param zone: Zone to target. If none is passed will use default zone from the config.
187-
:param order_by: Sort order of the returned volumes.
188-
:param project_id: Only list volumes of this project ID.
189-
:param page: Positive integer to choose the page to return.
190-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
187+
:param order_by: Criteria to use when ordering the list.
188+
:param project_id: Filter by Project ID.
189+
:param page: Page number.
190+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
191191
:param name: Filter the return volumes by their names.
192-
:param product_resource_id: Filter by a Product Resource Id linked to this volume (such as an Instance Server Id).
192+
:param product_resource_id: Filter by a product resource ID linked to this volume (such as an Instance ID).
193193
:return: :class:`List[ListVolumesResponse] <List[ListVolumesResponse]>`
194194
195195
Usage:
@@ -225,20 +225,19 @@ async def create_volume(
225225
tags: Optional[List[str]] = None,
226226
) -> Volume:
227227
"""
228-
Create a new empty volume by specifying the `size`.
229-
To create a volume from an existing snapshot, specify the `snapshot_id` in the request payload instead, size is optional and can be specified if you need to extend the original size.
230-
In that case the created volume will have the same volume class (and underlying IOPS limitations) as the originating snapshot.
231-
You can specify the desired performance of the volume by setting `requirements` accordingly.
228+
Create a volume.
229+
To create a new volume from scratch, you must specify `from_empty` and the `size`.
230+
To create a volume from an existing snapshot, specify `from_snapshot` and the `snapshot_id` in the request payload instead, size is optional and can be specified if you need to extend the original size. The volume will take on the same volume class and underlying IOPS limitations as the original snapshot.
232231
:param zone: Zone to target. If none is passed will use default zone from the config.
233-
:param name: Name of the volume you want to create.
232+
:param name: Name of the volume.
234233
:param perf_iops: The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
235234
236235
One-of ('requirements'): at most one of 'perf_iops' could be set.
237236
:param project_id: UUID of the project the volume belongs to.
238-
:param from_empty: Create a new and empty volume.
237+
:param from_empty: Specify the size of the new volume if creating a new one from scratch.
239238
240239
One-of ('from_'): at most one of 'from_empty', 'from_snapshot' could be set.
241-
:param from_snapshot: Create a volume from an existing snapshot.
240+
:param from_snapshot: Specify the snapshot ID of the original snapshot.
242241
243242
One-of ('from_'): at most one of 'from_empty', 'from_snapshot' could be set.
244243
:param tags: List of tags assigned to the volume.
@@ -282,7 +281,7 @@ async def get_volume(
282281
Get a volume.
283282
Retrieve technical information about a specific volume. Details such as size, type, and status are returned in the response.
284283
:param zone: Zone to target. If none is passed will use default zone from the config.
285-
:param volume_id: UUID of the volume you want to get.
284+
:param volume_id: UUID of the volume.
286285
:return: :class:`Volume <Volume>`
287286
288287
Usage:
@@ -312,7 +311,7 @@ async def wait_for_volume(
312311
"""
313312
Waits for :class:`Volume <Volume>` to be in a final state.
314313
:param zone: Zone to target. If none is passed will use default zone from the config.
315-
:param volume_id: UUID of the volume you want to get.
314+
:param volume_id: UUID of the volume.
316315
:param options: The options for the waiter
317316
:return: :class:`Volume <Volume>`
318317
@@ -378,17 +377,17 @@ async def update_volume(
378377
) -> Volume:
379378
"""
380379
Update a volume.
381-
Update technical details about a volume, such as its name, tags, or its new size and `volume_type` (within the same Block Storage class).
382-
You can only resize a volume to a larger size. It is not possible for now to change your Block Storage Class.
380+
Update the technical details of a volume, such as its name, tags, or its new size and `volume_type` (within the same Block Storage class).
381+
You can only resize a volume to a larger size. It is currently not possible to change your Block Storage Class.
383382
:param zone: Zone to target. If none is passed will use default zone from the config.
384383
:param volume_id: UUID of the volume.
385384
:param name: When defined, is the new name of the volume.
386-
:param size: Optional field for growing a volume (size must be equal or larger than the current one).
385+
:param size: Optional field for increasing the size of a volume (size must be equal or larger than the current one).
387386
Size in bytes of the volume, with a granularity of 1 GB (10^9 bytes).
388-
Must be compliant with the minimum and maximum allowed size.
387+
Must be compliant with the minimum (1GB) and maximum (10TB) allowed size.
389388
:param tags: List of tags assigned to the volume.
390389
:param perf_iops: The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
391-
The selected value must be available on the Storage Class where is currently located the volume.
390+
The selected value must be available for the volume's current storage class.
392391
:return: :class:`Volume <Volume>`
393392
394393
Usage:
@@ -434,12 +433,12 @@ async def list_snapshots(
434433
List all snapshots.
435434
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.
436435
:param zone: Zone to target. If none is passed will use default zone from the config.
437-
:param order_by: Sort order of the returned snapshots.
438-
:param project_id: Only list snapshots of this project ID.
439-
:param page: Positive integer to choose the page to return.
440-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
441-
:param volume_id: Filter the return snapshots by the volume it belongs to.
442-
:param name: Filter the return snapshots by their names.
436+
:param order_by: Criteria to use when ordering the list.
437+
:param project_id: Filter by Project ID.
438+
:param page: Page number.
439+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
440+
:param volume_id: Filter snapshots by the ID of the original volume.
441+
:param name: Filter snapshots by their names.
443442
:return: :class:`ListSnapshotsResponse <ListSnapshotsResponse>`
444443
445444
Usage:
@@ -481,12 +480,12 @@ async def list_snapshots_all(
481480
List all snapshots.
482481
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.
483482
:param zone: Zone to target. If none is passed will use default zone from the config.
484-
:param order_by: Sort order of the returned snapshots.
485-
:param project_id: Only list snapshots of this project ID.
486-
:param page: Positive integer to choose the page to return.
487-
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
488-
:param volume_id: Filter the return snapshots by the volume it belongs to.
489-
:param name: Filter the return snapshots by their names.
483+
:param order_by: Criteria to use when ordering the list.
484+
:param project_id: Filter by Project ID.
485+
:param page: Page number.
486+
:param page_size: Page size, defines how many entries are returned in one page, must be lower or equal to 100.
487+
:param volume_id: Filter snapshots by the ID of the original volume.
488+
:param name: Filter snapshots by their names.
490489
:return: :class:`List[ListSnapshotsResponse] <List[ListSnapshotsResponse]>`
491490
492491
Usage:
@@ -591,9 +590,9 @@ async def create_snapshot(
591590
To create a snapshot, the volume must be in the `in_use` or the `available` status.
592591
If your volume is in a transient state, you need to wait until the end of the current operation.
593592
:param zone: Zone to target. If none is passed will use default zone from the config.
594-
:param volume_id: UUID of the volume from which creates a snpashot.
593+
:param volume_id: UUID of the volume to snapshot.
595594
:param name: Name of the snapshot.
596-
:param project_id: UUID of the project the volume and the snapshot belong to.
595+
:param project_id: UUID of the project to which the volume and the snapshot belong.
597596
:param tags: List of tags assigned to the snapshot.
598597
:return: :class:`Snapshot <Snapshot>`
599598
@@ -665,7 +664,7 @@ async def update_snapshot(
665664
) -> Snapshot:
666665
"""
667666
Update a snapshot.
668-
Update name or tags of the snapshot.
667+
Update the name or tags of the snapshot.
669668
:param zone: Zone to target. If none is passed will use default zone from the config.
670669
:param snapshot_id: UUID of the snapshot.
671670
:param name: When defined, is the name of the snapshot.

0 commit comments

Comments
 (0)