Skip to content

Commit ecf0bc1

Browse files
authored
docs(block): revamp (#909)
1 parent 58d4945 commit ecf0bc1

File tree

2 files changed

+63
-63
lines changed

2 files changed

+63
-63
lines changed

packages/clients/src/api/block/v1alpha1/api.gen.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const jsonContentHeaders = {
4747
}
4848

4949
/**
50-
* Scaleway Block Storage (SBS) API.
50+
* Scaleway Block Storage API.
5151
*
5252
* This API allows you to use and manage your Block Storage volumes. Scaleway
53-
* Block Storage (SBS) API.
53+
* Block Storage API.
5454
*/
5555
export class API extends ParentAPI {
5656
/** Lists the available zones of the API. */
@@ -112,8 +112,8 @@ export class API extends ParentAPI {
112112

113113
/**
114114
* List volumes. List all existing volumes in a specified zone. By default,
115-
* the volume listed are ordered by creation date in ascending order. This can
116-
* be modified via the `order_by` field.
115+
* the volumes listed are ordered by creation date in ascending order. This
116+
* can be modified via the `order_by` field.
117117
*
118118
* @param request - The request {@link ListVolumesRequest}
119119
* @returns A Promise of ListVolumesResponse
@@ -122,13 +122,12 @@ export class API extends ParentAPI {
122122
enrichForPagination('volumes', this.pageOfListVolumes, request)
123123

124124
/**
125-
* Create a new empty volume by specifying the `size`. To create a volume from
126-
* an existing snapshot, specify the `snapshot_id` in the request payload
125+
* Create a volume. To create a new volume from scratch, you must specify
126+
* `from_empty` and the `size`. To create a volume from an existing snapshot,
127+
* specify `from_snapshot` and the `snapshot_id` in the request payload
127128
* instead, size is optional and can be specified if you need to extend the
128-
* original size. In that case the created volume will have the same volume
129-
* class (and underlying IOPS limitations) as the originating snapshot. You
130-
* can specify the desired performance of the volume by setting `requirements`
131-
* accordingly.
129+
* original size. The volume will take on the same volume class and underlying
130+
* IOPS limitations as the original snapshot.
132131
*
133132
* @param request - The request {@link CreateVolumeRequest}
134133
* @returns A Promise of Volume
@@ -204,10 +203,10 @@ export class API extends ParentAPI {
204203
})
205204

206205
/**
207-
* Update a volume. Update technical details about a volume, such as its name,
208-
* tags, or its new size and `volume_type` (within the same Block Storage
209-
* class). You can only resize a volume to a larger size. It is not possible
210-
* for now to change your Block Storage Class.
206+
* Update a volume. Update the technical details of a volume, such as its
207+
* name, tags, or its new size and `volume_type` (within the same Block
208+
* Storage class). You can only resize a volume to a larger size. It is
209+
* currently not possible to change your Block Storage Class.
211210
*
212211
* @param request - The request {@link UpdateVolumeRequest}
213212
* @returns A Promise of Volume
@@ -344,7 +343,7 @@ export class API extends ParentAPI {
344343
})
345344

346345
/**
347-
* Update a snapshot. Update name or tags of the snapshot.
346+
* Update a snapshot. Update the name or tags of the snapshot.
348347
*
349348
* @param request - The request {@link UpdateSnapshotRequest}
350349
* @returns A Promise of Snapshot

packages/clients/src/api/block/v1alpha1/types.gen.ts

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export type VolumeStatus =
5757
export interface CreateVolumeRequestFromEmpty {
5858
/**
5959
* Volume size in bytes, with a granularity of 1 GB (10^9 bytes). Must be
60-
* compliant with the minimum and maximum allowed size.
60+
* compliant with the minimum (1 GB) and maximum (10 TB) allowed size.
6161
*/
6262
size: number
6363
}
@@ -66,12 +66,12 @@ export interface CreateVolumeRequestFromEmpty {
6666
export interface CreateVolumeRequestFromSnapshot {
6767
/**
6868
* Volume size in bytes, with a granularity of 1 GB (10^9 bytes). Must be
69-
* compliant with the allowed minimum and maximum allowed size. Size is
69+
* compliant with the minimum (1 GB) and maximum (10 TB) allowed size. Size is
7070
* optional and is used only if a resize of the volume is requested, otherwise
7171
* original snapshot size will be used.
7272
*/
7373
size?: number
74-
/** Source snapshot from which create a volume. */
74+
/** Source snapshot from which volume will be created. */
7575
snapshotId: string
7676
}
7777

@@ -85,7 +85,7 @@ export interface ListSnapshotsResponse {
8585

8686
/** List volume types response. */
8787
export interface ListVolumeTypesResponse {
88-
/** Paginated returned list of volume-types. */
88+
/** Returns paginated list of volume-types. */
8989
volumeTypes: VolumeType[]
9090
/** Total number of volume-types currently available in stock. */
9191
totalCount: number
@@ -103,7 +103,7 @@ export interface ListVolumesResponse {
103103
export interface Reference {
104104
/** UUID of the reference. */
105105
id: string
106-
/** Type of the resoruce the reference is associated (else snapshot or volume). */
106+
/** Type of resoruce to which the reference is associated (snapshot or volume). */
107107
productResourceType: string
108108
/**
109109
* UUID of the volume or the snapshot it refers to (according to the
@@ -112,9 +112,9 @@ export interface Reference {
112112
productResourceId: string
113113
/** Creation date of the reference. */
114114
createdAt?: Date
115-
/** Type of the reference (link, exclusive, read_only). */
115+
/** Type of reference (link, exclusive, read_only). */
116116
type: ReferenceType
117-
/** Status of the reference (attaching, attached, detaching). */
117+
/** Status of reference (attaching, attached, detaching). */
118118
status: ReferenceStatus
119119
}
120120

@@ -125,8 +125,8 @@ export interface Snapshot {
125125
/** Name of the snapshot. */
126126
name: string
127127
/**
128-
* Informations about the parent volume. If the parent volume has been
129-
* deleted, value is null.
128+
* Information about the parent volume. If the parent volume was deleted,
129+
* value is null.
130130
*/
131131
parentVolume?: SnapshotParentVolume
132132
/** Size in bytes of the snapshot. */
@@ -151,13 +151,13 @@ export interface Snapshot {
151151

152152
/** Snapshot. parent volume. */
153153
export interface SnapshotParentVolume {
154-
/** Volume ID on which the snapshot is based. */
154+
/** Parent volume UUID (volume from which the snapshot originates). */
155155
id: string
156-
/** Name of the parent volume from which the snapshot has been taken. */
156+
/** Name of the parent volume. */
157157
name: string
158-
/** Volume type of the parent volume from which the snapshot has been taken. */
158+
/** Volume type of the parent volume. */
159159
type: string
160-
/** Current status the parent volume from which the snapshot has been taken. */
160+
/** Current status the parent volume. */
161161
status: VolumeStatus
162162
}
163163

@@ -172,7 +172,7 @@ export interface SnapshotSummary {
172172
* value is null.
173173
*/
174174
parentVolume?: SnapshotParentVolume
175-
/** Size in bytes of the snapshot. */
175+
/** Size of the snapshot in bytes. */
176176
size: number
177177
/** UUID of the project the snapshot belongs to. */
178178
projectId: string
@@ -184,7 +184,7 @@ export interface SnapshotSummary {
184184
status: SnapshotStatus
185185
/** List of tags assigned to the volume. */
186186
tags: string[]
187-
/** Snapshot zone. */
187+
/** Snapshot Availability Zone. */
188188
zone: Zone
189189
/** Storage class of the snapshot. */
190190
class: StorageClass
@@ -196,15 +196,15 @@ export interface Volume {
196196
id: string
197197
/** Name of the volume. */
198198
name: string
199-
/** Type of the volume. */
199+
/** Volume type. */
200200
type: string
201201
/** Volume size in bytes. */
202202
size: number
203-
/** UUID of the project the volume belongs to. */
203+
/** UUID of the project to which the volume belongs. */
204204
projectId: string
205205
/** Creation date of the volume. */
206206
createdAt?: Date
207-
/** Last modification date of the properties of a volume. */
207+
/** Last update of the properties of a volume. */
208208
updatedAt?: Date
209209
/** List of the references to the volume. */
210210
references: Reference[]
@@ -219,7 +219,7 @@ export interface Volume {
219219
tags: string[]
220220
/** Volume zone. */
221221
zone: Zone
222-
/** Volume specifications of the volume. */
222+
/** Specifications of the volume. */
223223
specs?: VolumeSpecifications
224224
}
225225

@@ -236,7 +236,7 @@ export interface VolumeSpecifications {
236236

237237
/** Volume type. */
238238
export interface VolumeType {
239-
/** Internal type of the volume. */
239+
/** Volume type. */
240240
type: string
241241
/** Price of the volume billed in GB/hour. */
242242
pricing?: Money
@@ -249,42 +249,42 @@ export interface VolumeType {
249249
export type ListVolumeTypesRequest = {
250250
/** Zone to target. If none is passed will use default zone from the config. */
251251
zone?: Zone
252-
/** Positive integer to choose the page to return. */
252+
/** Page number. */
253253
page?: number
254254
/**
255-
* Positive integer lower or equal to 100 to select the number of items to
256-
* return.
255+
* Page size, defines how many entries are returned in one page, must be lower
256+
* or equal to 100.
257257
*/
258258
pageSize?: number
259259
}
260260

261261
export type ListVolumesRequest = {
262262
/** Zone to target. If none is passed will use default zone from the config. */
263263
zone?: Zone
264-
/** Sort order of the returned volumes. */
264+
/** Criteria to use when ordering the list. */
265265
orderBy?: ListVolumesRequestOrderBy
266-
/** Only list volumes of this project ID. */
266+
/** Filter by Project ID. */
267267
projectId?: string
268-
/** Positive integer to choose the page to return. */
268+
/** Page number. */
269269
page?: number
270270
/**
271-
* Positive integer lower or equal to 100 to select the number of items to
272-
* return.
271+
* Page size, defines how many entries are returned in one page, must be lower
272+
* or equal to 100.
273273
*/
274274
pageSize?: number
275275
/** Filter the return volumes by their names. */
276276
name?: string
277277
/**
278-
* Filter by a Product Resource Id linked to this volume (such as an Instance
279-
* Server Id).
278+
* Filter by a product resource ID linked to this volume (such as an Instance
279+
* ID).
280280
*/
281281
productResourceId?: string
282282
}
283283

284284
export type CreateVolumeRequest = {
285285
/** Zone to target. If none is passed will use default zone from the config. */
286286
zone?: Zone
287-
/** Name of the volume you want to create. */
287+
/** Name of the volume. */
288288
name: string
289289
/**
290290
* The maximum IO/s expected, according to the different options available in
@@ -296,13 +296,13 @@ export type CreateVolumeRequest = {
296296
/** UUID of the project the volume belongs to. */
297297
projectId?: string
298298
/**
299-
* Create a new and empty volume.
299+
* Specify the size of the new volume if creating a new one from scratch.
300300
*
301301
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
302302
*/
303303
fromEmpty?: CreateVolumeRequestFromEmpty
304304
/**
305-
* Create a volume from an existing snapshot.
305+
* Specify the snapshot ID of the original snapshot.
306306
*
307307
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
308308
*/
@@ -314,7 +314,7 @@ export type CreateVolumeRequest = {
314314
export type GetVolumeRequest = {
315315
/** Zone to target. If none is passed will use default zone from the config. */
316316
zone?: Zone
317-
/** UUID of the volume you want to get. */
317+
/** UUID of the volume. */
318318
volumeId: string
319319
}
320320

@@ -333,38 +333,39 @@ export type UpdateVolumeRequest = {
333333
/** When defined, is the new name of the volume. */
334334
name?: string
335335
/**
336-
* Optional field for growing a volume (size must be equal or larger than the
337-
* current one). Size in bytes of the volume, with a granularity of 1 GB (10^9
338-
* bytes). Must be compliant with the minimum and maximum allowed size.
336+
* Optional field for increasing the size of a volume (size must be equal or
337+
* larger than the current one). Size in bytes of the volume, with a
338+
* granularity of 1 GB (10^9 bytes). Must be compliant with the minimum (1GB)
339+
* and maximum (10TB) allowed size.
339340
*/
340341
size?: number
341342
/** List of tags assigned to the volume. */
342343
tags?: string[]
343344
/**
344345
* The maximum IO/s expected, according to the different options available in
345-
* stock (`5000 | 15000`). The selected value must be available on the Storage
346-
* Class where is currently located the volume.
346+
* stock (`5000 | 15000`). The selected value must be available for the
347+
* volume's current storage class.
347348
*/
348349
perfIops?: number
349350
}
350351

351352
export type ListSnapshotsRequest = {
352353
/** Zone to target. If none is passed will use default zone from the config. */
353354
zone?: Zone
354-
/** Sort order of the returned snapshots. */
355+
/** Criteria to use when ordering the list. */
355356
orderBy?: ListSnapshotsRequestOrderBy
356-
/** Only list snapshots of this project ID. */
357+
/** Filter by Project ID. */
357358
projectId?: string
358-
/** Positive integer to choose the page to return. */
359+
/** Page number. */
359360
page?: number
360361
/**
361-
* Positive integer lower or equal to 100 to select the number of items to
362-
* return.
362+
* Page size, defines how many entries are returned in one page, must be lower
363+
* or equal to 100.
363364
*/
364365
pageSize?: number
365-
/** Filter the return snapshots by the volume it belongs to. */
366+
/** Filter snapshots by the ID of the original volume. */
366367
volumeId?: string
367-
/** Filter the return snapshots by their names. */
368+
/** Filter snapshots by their names. */
368369
name?: string
369370
}
370371

@@ -378,11 +379,11 @@ export type GetSnapshotRequest = {
378379
export type CreateSnapshotRequest = {
379380
/** Zone to target. If none is passed will use default zone from the config. */
380381
zone?: Zone
381-
/** UUID of the volume from which creates a snpashot. */
382+
/** UUID of the volume to snapshot. */
382383
volumeId: string
383384
/** Name of the snapshot. */
384385
name: string
385-
/** UUID of the project the volume and the snapshot belong to. */
386+
/** UUID of the project to which the volume and the snapshot belong. */
386387
projectId?: string
387388
/** List of tags assigned to the snapshot. */
388389
tags?: string[]

0 commit comments

Comments
 (0)