@scaleway/sdk-block 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/marshalling.gen.js +17 -17
- package/dist/v1/types.gen.d.ts +69 -69
- package/dist/v1alpha1/marshalling.gen.js +15 -15
- package/dist/v1alpha1/types.gen.d.ts +67 -67
- package/package.json +4 -4
|
@@ -5,7 +5,7 @@ import randomName from "@scaleway/random-name";
|
|
|
5
5
|
const unmarshalReference = (data) => {
|
|
6
6
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Reference' failed as data isn't a dictionary.`);
|
|
7
7
|
return {
|
|
8
|
-
createdAt: unmarshalDate(data.created_at),
|
|
8
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
9
9
|
id: data.id,
|
|
10
10
|
productResourceId: data.product_resource_id,
|
|
11
11
|
productResourceType: data.product_resource_type,
|
|
@@ -26,11 +26,11 @@ const unmarshalSnapshot = (data) => {
|
|
|
26
26
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
27
27
|
return {
|
|
28
28
|
class: data.class,
|
|
29
|
-
createdAt: unmarshalDate(data.created_at),
|
|
29
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
30
30
|
id: data.id,
|
|
31
|
-
kmsKeyId: data.kms_key_id,
|
|
31
|
+
kmsKeyId: data.kms_key_id ?? null,
|
|
32
32
|
name: data.name,
|
|
33
|
-
parentVolume: data.parent_volume ? unmarshalSnapshotParentVolume(data.parent_volume) :
|
|
33
|
+
parentVolume: data.parent_volume ? unmarshalSnapshotParentVolume(data.parent_volume) : null,
|
|
34
34
|
projectId: data.project_id,
|
|
35
35
|
public: data.public,
|
|
36
36
|
references: unmarshalArrayOfObject(data.references, unmarshalReference),
|
|
@@ -38,7 +38,7 @@ const unmarshalSnapshot = (data) => {
|
|
|
38
38
|
srn: data.srn,
|
|
39
39
|
status: data.status,
|
|
40
40
|
tags: data.tags,
|
|
41
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
41
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
42
42
|
zone: data.zone
|
|
43
43
|
};
|
|
44
44
|
};
|
|
@@ -46,27 +46,27 @@ const unmarshalVolumeSpecifications = (data) => {
|
|
|
46
46
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeSpecifications' failed as data isn't a dictionary.`);
|
|
47
47
|
return {
|
|
48
48
|
class: data.class,
|
|
49
|
-
perfIops: data.perf_iops
|
|
49
|
+
perfIops: data.perf_iops ?? null
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
const unmarshalVolume = (data) => {
|
|
53
53
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
54
54
|
return {
|
|
55
|
-
createdAt: unmarshalDate(data.created_at),
|
|
55
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
56
56
|
id: data.id,
|
|
57
|
-
kmsKeyId: data.kms_key_id,
|
|
58
|
-
lastDetachedAt: unmarshalDate(data.last_detached_at),
|
|
57
|
+
kmsKeyId: data.kms_key_id ?? null,
|
|
58
|
+
lastDetachedAt: unmarshalDate(data.last_detached_at) ?? null,
|
|
59
59
|
name: data.name,
|
|
60
|
-
parentSnapshotId: data.parent_snapshot_id,
|
|
60
|
+
parentSnapshotId: data.parent_snapshot_id ?? null,
|
|
61
61
|
projectId: data.project_id,
|
|
62
62
|
references: unmarshalArrayOfObject(data.references, unmarshalReference),
|
|
63
63
|
size: data.size,
|
|
64
|
-
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) :
|
|
64
|
+
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) : null,
|
|
65
65
|
srn: data.srn,
|
|
66
66
|
status: data.status,
|
|
67
67
|
tags: data.tags,
|
|
68
68
|
type: data.type,
|
|
69
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
69
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
70
70
|
zone: data.zone
|
|
71
71
|
};
|
|
72
72
|
};
|
|
@@ -80,9 +80,9 @@ const unmarshalListSnapshotsResponse = (data) => {
|
|
|
80
80
|
const unmarshalVolumeType = (data) => {
|
|
81
81
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeType' failed as data isn't a dictionary.`);
|
|
82
82
|
return {
|
|
83
|
-
pricing: data.pricing ? unmarshalMoney(data.pricing) :
|
|
84
|
-
snapshotPricing: data.snapshot_pricing ? unmarshalMoney(data.snapshot_pricing) :
|
|
85
|
-
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) :
|
|
83
|
+
pricing: data.pricing ? unmarshalMoney(data.pricing) : null,
|
|
84
|
+
snapshotPricing: data.snapshot_pricing ? unmarshalMoney(data.snapshot_pricing) : null,
|
|
85
|
+
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) : null,
|
|
86
86
|
srn: data.srn,
|
|
87
87
|
type: data.type,
|
|
88
88
|
zone: data.zone
|
|
@@ -121,10 +121,10 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
121
121
|
tags: request.tags,
|
|
122
122
|
...resolveOneOf([{
|
|
123
123
|
param: "from_empty",
|
|
124
|
-
value: request.fromEmpty
|
|
124
|
+
value: request.fromEmpty != null ? marshalCreateVolumeRequestFromEmpty(request.fromEmpty, defaults) : void 0
|
|
125
125
|
}, {
|
|
126
126
|
param: "from_snapshot",
|
|
127
|
-
value: request.fromSnapshot
|
|
127
|
+
value: request.fromSnapshot != null ? marshalCreateVolumeRequestFromSnapshot(request.fromSnapshot, defaults) : void 0
|
|
128
128
|
}]),
|
|
129
129
|
...resolveOneOf([{
|
|
130
130
|
param: "perf_iops",
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface Reference {
|
|
|
23
23
|
/**
|
|
24
24
|
* Creation date of the reference.
|
|
25
25
|
*/
|
|
26
|
-
createdAt?: Date;
|
|
26
|
+
createdAt?: Date | null;
|
|
27
27
|
/**
|
|
28
28
|
* Type of reference (link, exclusive, read_only).
|
|
29
29
|
*/
|
|
@@ -55,7 +55,7 @@ export interface VolumeSpecifications {
|
|
|
55
55
|
/**
|
|
56
56
|
* The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
|
|
57
57
|
*/
|
|
58
|
-
perfIops?: number;
|
|
58
|
+
perfIops?: number | null;
|
|
59
59
|
/**
|
|
60
60
|
* The storage class of the volume.
|
|
61
61
|
*/
|
|
@@ -72,7 +72,7 @@ export interface CreateVolumeRequestFromSnapshot {
|
|
|
72
72
|
* Must be compliant with the minimum (1 GB) and maximum (10 TB) allowed size.
|
|
73
73
|
Size is optional and is used only if a resize of the volume is requested, otherwise original snapshot size will be used.
|
|
74
74
|
*/
|
|
75
|
-
size?: number;
|
|
75
|
+
size?: number | null;
|
|
76
76
|
/**
|
|
77
77
|
* Source snapshot from which volume will be created.
|
|
78
78
|
*/
|
|
@@ -90,7 +90,7 @@ export interface Snapshot {
|
|
|
90
90
|
/**
|
|
91
91
|
* If the parent volume was deleted, value is null.
|
|
92
92
|
*/
|
|
93
|
-
parentVolume?: SnapshotParentVolume;
|
|
93
|
+
parentVolume?: SnapshotParentVolume | null;
|
|
94
94
|
/**
|
|
95
95
|
* Size in bytes of the snapshot.
|
|
96
96
|
*/
|
|
@@ -102,11 +102,11 @@ export interface Snapshot {
|
|
|
102
102
|
/**
|
|
103
103
|
* Creation date of the snapshot.
|
|
104
104
|
*/
|
|
105
|
-
createdAt?: Date;
|
|
105
|
+
createdAt?: Date | null;
|
|
106
106
|
/**
|
|
107
107
|
* Last modification date of the properties of a snapshot.
|
|
108
108
|
*/
|
|
109
|
-
updatedAt?: Date;
|
|
109
|
+
updatedAt?: Date | null;
|
|
110
110
|
/**
|
|
111
111
|
* List of the references to the snapshot.
|
|
112
112
|
*/
|
|
@@ -134,7 +134,7 @@ export interface Snapshot {
|
|
|
134
134
|
/**
|
|
135
135
|
* KMS Key used for securing the parent volume's encryption.
|
|
136
136
|
*/
|
|
137
|
-
kmsKeyId?: string;
|
|
137
|
+
kmsKeyId?: string | null;
|
|
138
138
|
/**
|
|
139
139
|
* The SRN of the snapshot.
|
|
140
140
|
*/
|
|
@@ -148,15 +148,15 @@ export interface VolumeType {
|
|
|
148
148
|
/**
|
|
149
149
|
* Price of the volume billed in GB/hour.
|
|
150
150
|
*/
|
|
151
|
-
pricing?: Money;
|
|
151
|
+
pricing?: Money | null;
|
|
152
152
|
/**
|
|
153
153
|
* Price of the snapshot billed in GB/hour.
|
|
154
154
|
*/
|
|
155
|
-
snapshotPricing?: Money;
|
|
155
|
+
snapshotPricing?: Money | null;
|
|
156
156
|
/**
|
|
157
157
|
* Volume specifications of the volume type.
|
|
158
158
|
*/
|
|
159
|
-
specs?: VolumeSpecifications;
|
|
159
|
+
specs?: VolumeSpecifications | null;
|
|
160
160
|
/**
|
|
161
161
|
* Zone of the volume type.
|
|
162
162
|
*/
|
|
@@ -190,11 +190,11 @@ export interface Volume {
|
|
|
190
190
|
/**
|
|
191
191
|
* Creation date of the volume.
|
|
192
192
|
*/
|
|
193
|
-
createdAt?: Date;
|
|
193
|
+
createdAt?: Date | null;
|
|
194
194
|
/**
|
|
195
195
|
* Last update of the properties of a volume.
|
|
196
196
|
*/
|
|
197
|
-
updatedAt?: Date;
|
|
197
|
+
updatedAt?: Date | null;
|
|
198
198
|
/**
|
|
199
199
|
* List of the references to the volume.
|
|
200
200
|
*/
|
|
@@ -202,7 +202,7 @@ export interface Volume {
|
|
|
202
202
|
/**
|
|
203
203
|
* When a volume is created from a snapshot, is the UUID of the snapshot from which the volume has been created.
|
|
204
204
|
*/
|
|
205
|
-
parentSnapshotId?: string;
|
|
205
|
+
parentSnapshotId?: string | null;
|
|
206
206
|
/**
|
|
207
207
|
* Current status of the volume (available, in_use, ...).
|
|
208
208
|
*/
|
|
@@ -218,15 +218,15 @@ export interface Volume {
|
|
|
218
218
|
/**
|
|
219
219
|
* Specifications of the volume.
|
|
220
220
|
*/
|
|
221
|
-
specs?: VolumeSpecifications;
|
|
221
|
+
specs?: VolumeSpecifications | null;
|
|
222
222
|
/**
|
|
223
223
|
* Last time the volume was detached.
|
|
224
224
|
*/
|
|
225
|
-
lastDetachedAt?: Date;
|
|
225
|
+
lastDetachedAt?: Date | null;
|
|
226
226
|
/**
|
|
227
227
|
* KMS Key used for securing the volume's encryption.
|
|
228
228
|
*/
|
|
229
|
-
kmsKeyId?: string;
|
|
229
|
+
kmsKeyId?: string | null;
|
|
230
230
|
/**
|
|
231
231
|
* The SRN of the volume.
|
|
232
232
|
*/
|
|
@@ -236,7 +236,7 @@ export type CreateSnapshotRequest = {
|
|
|
236
236
|
/**
|
|
237
237
|
* Zone to target. If none is passed will use default zone from the config.
|
|
238
238
|
*/
|
|
239
|
-
zone?: Zone;
|
|
239
|
+
zone?: Zone | null;
|
|
240
240
|
/**
|
|
241
241
|
* UUID of the volume to snapshot.
|
|
242
242
|
*/
|
|
@@ -244,15 +244,15 @@ export type CreateSnapshotRequest = {
|
|
|
244
244
|
/**
|
|
245
245
|
* Name of the snapshot.
|
|
246
246
|
*/
|
|
247
|
-
name?: string;
|
|
247
|
+
name?: string | null;
|
|
248
248
|
/**
|
|
249
249
|
* UUID of the project to which the volume and the snapshot belong.
|
|
250
250
|
*/
|
|
251
|
-
projectId?: string;
|
|
251
|
+
projectId?: string | null;
|
|
252
252
|
/**
|
|
253
253
|
* List of tags assigned to the snapshot.
|
|
254
254
|
*/
|
|
255
|
-
tags?: string[];
|
|
255
|
+
tags?: string[] | null;
|
|
256
256
|
/**
|
|
257
257
|
* Snapshots are private by default, public snapshots are mainly used to publish OS images.
|
|
258
258
|
*/
|
|
@@ -262,47 +262,47 @@ export type CreateVolumeRequest = {
|
|
|
262
262
|
/**
|
|
263
263
|
* Zone to target. If none is passed will use default zone from the config.
|
|
264
264
|
*/
|
|
265
|
-
zone?: Zone;
|
|
265
|
+
zone?: Zone | null;
|
|
266
266
|
/**
|
|
267
267
|
* Name of the volume.
|
|
268
268
|
*/
|
|
269
|
-
name?: string;
|
|
269
|
+
name?: string | null;
|
|
270
270
|
/**
|
|
271
271
|
* The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
|
|
272
272
|
*
|
|
273
273
|
* One-of ('requirements'): at most one of 'perfIops' could be set.
|
|
274
274
|
*/
|
|
275
|
-
perfIops?: number;
|
|
275
|
+
perfIops?: number | null;
|
|
276
276
|
/**
|
|
277
277
|
* UUID of the project the volume belongs to.
|
|
278
278
|
*/
|
|
279
|
-
projectId?: string;
|
|
279
|
+
projectId?: string | null;
|
|
280
280
|
/**
|
|
281
281
|
* Specify the size of the new volume if creating a new one from scratch.
|
|
282
282
|
*
|
|
283
283
|
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
|
|
284
284
|
*/
|
|
285
|
-
fromEmpty?: CreateVolumeRequestFromEmpty;
|
|
285
|
+
fromEmpty?: CreateVolumeRequestFromEmpty | null;
|
|
286
286
|
/**
|
|
287
287
|
* Specify the snapshot ID of the original snapshot.
|
|
288
288
|
*
|
|
289
289
|
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
|
|
290
290
|
*/
|
|
291
|
-
fromSnapshot?: CreateVolumeRequestFromSnapshot;
|
|
291
|
+
fromSnapshot?: CreateVolumeRequestFromSnapshot | null;
|
|
292
292
|
/**
|
|
293
293
|
* List of tags assigned to the volume.
|
|
294
294
|
*/
|
|
295
|
-
tags?: string[];
|
|
295
|
+
tags?: string[] | null;
|
|
296
296
|
/**
|
|
297
297
|
* UUID of the KMS key used to protect the volume's encryption.
|
|
298
298
|
*/
|
|
299
|
-
kmsKeyId?: string;
|
|
299
|
+
kmsKeyId?: string | null;
|
|
300
300
|
};
|
|
301
301
|
export type DeleteSnapshotRequest = {
|
|
302
302
|
/**
|
|
303
303
|
* Zone to target. If none is passed will use default zone from the config.
|
|
304
304
|
*/
|
|
305
|
-
zone?: Zone;
|
|
305
|
+
zone?: Zone | null;
|
|
306
306
|
/**
|
|
307
307
|
* UUID of the snapshot.
|
|
308
308
|
*/
|
|
@@ -312,7 +312,7 @@ export type DeleteVolumeRequest = {
|
|
|
312
312
|
/**
|
|
313
313
|
* Zone to target. If none is passed will use default zone from the config.
|
|
314
314
|
*/
|
|
315
|
-
zone?: Zone;
|
|
315
|
+
zone?: Zone | null;
|
|
316
316
|
/**
|
|
317
317
|
* UUID of the volume.
|
|
318
318
|
*/
|
|
@@ -322,7 +322,7 @@ export type ExportSnapshotToObjectStorageRequest = {
|
|
|
322
322
|
/**
|
|
323
323
|
* Zone to target. If none is passed will use default zone from the config.
|
|
324
324
|
*/
|
|
325
|
-
zone?: Zone;
|
|
325
|
+
zone?: Zone | null;
|
|
326
326
|
/**
|
|
327
327
|
* UUID of the snapshot.
|
|
328
328
|
*/
|
|
@@ -340,7 +340,7 @@ export type GetSnapshotRequest = {
|
|
|
340
340
|
/**
|
|
341
341
|
* Zone to target. If none is passed will use default zone from the config.
|
|
342
342
|
*/
|
|
343
|
-
zone?: Zone;
|
|
343
|
+
zone?: Zone | null;
|
|
344
344
|
/**
|
|
345
345
|
* UUID of the snapshot.
|
|
346
346
|
*/
|
|
@@ -350,7 +350,7 @@ export type GetVolumeRequest = {
|
|
|
350
350
|
/**
|
|
351
351
|
* Zone to target. If none is passed will use default zone from the config.
|
|
352
352
|
*/
|
|
353
|
-
zone?: Zone;
|
|
353
|
+
zone?: Zone | null;
|
|
354
354
|
/**
|
|
355
355
|
* UUID of the volume.
|
|
356
356
|
*/
|
|
@@ -360,7 +360,7 @@ export type ImportSnapshotFromObjectStorageRequest = {
|
|
|
360
360
|
/**
|
|
361
361
|
* Zone to target. If none is passed will use default zone from the config.
|
|
362
362
|
*/
|
|
363
|
-
zone?: Zone;
|
|
363
|
+
zone?: Zone | null;
|
|
364
364
|
/**
|
|
365
365
|
* Scaleway Object Storage bucket where the object is stored.
|
|
366
366
|
*/
|
|
@@ -376,53 +376,53 @@ export type ImportSnapshotFromObjectStorageRequest = {
|
|
|
376
376
|
/**
|
|
377
377
|
* UUID of the Project to which the volume and the snapshot belong.
|
|
378
378
|
*/
|
|
379
|
-
projectId?: string;
|
|
379
|
+
projectId?: string | null;
|
|
380
380
|
/**
|
|
381
381
|
* List of tags assigned to the snapshot.
|
|
382
382
|
*/
|
|
383
|
-
tags?: string[];
|
|
383
|
+
tags?: string[] | null;
|
|
384
384
|
/**
|
|
385
385
|
* Size of the snapshot.
|
|
386
386
|
*/
|
|
387
|
-
size?: number;
|
|
387
|
+
size?: number | null;
|
|
388
388
|
};
|
|
389
389
|
export type ListSnapshotsRequest = {
|
|
390
390
|
/**
|
|
391
391
|
* Zone to target. If none is passed will use default zone from the config.
|
|
392
392
|
*/
|
|
393
|
-
zone?: Zone;
|
|
393
|
+
zone?: Zone | null;
|
|
394
394
|
/**
|
|
395
395
|
* Criteria to use when ordering the list.
|
|
396
396
|
*/
|
|
397
|
-
orderBy?: ListSnapshotsRequestOrderBy;
|
|
397
|
+
orderBy?: ListSnapshotsRequestOrderBy | null;
|
|
398
398
|
/**
|
|
399
399
|
* Filter by Project ID.
|
|
400
400
|
*/
|
|
401
|
-
projectId?: string;
|
|
401
|
+
projectId?: string | null;
|
|
402
402
|
/**
|
|
403
403
|
* Filter by Organization ID.
|
|
404
404
|
*/
|
|
405
|
-
organizationId?: string;
|
|
405
|
+
organizationId?: string | null;
|
|
406
406
|
/**
|
|
407
407
|
* Page number.
|
|
408
408
|
*/
|
|
409
|
-
page?: number;
|
|
409
|
+
page?: number | null;
|
|
410
410
|
/**
|
|
411
411
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
412
412
|
*/
|
|
413
|
-
pageSize?: number;
|
|
413
|
+
pageSize?: number | null;
|
|
414
414
|
/**
|
|
415
415
|
* Filter snapshots by the ID of the original volume.
|
|
416
416
|
*/
|
|
417
|
-
volumeId?: string;
|
|
417
|
+
volumeId?: string | null;
|
|
418
418
|
/**
|
|
419
419
|
* Filter snapshots by their names.
|
|
420
420
|
*/
|
|
421
|
-
name?: string;
|
|
421
|
+
name?: string | null;
|
|
422
422
|
/**
|
|
423
423
|
* Filter by tags. Only snapshots with one or more matching tags will be returned.
|
|
424
424
|
*/
|
|
425
|
-
tags?: string[];
|
|
425
|
+
tags?: string[] | null;
|
|
426
426
|
/**
|
|
427
427
|
* Display deleted snapshots not erased yet.
|
|
428
428
|
*/
|
|
@@ -442,15 +442,15 @@ export type ListVolumeTypesRequest = {
|
|
|
442
442
|
/**
|
|
443
443
|
* Zone to target. If none is passed will use default zone from the config.
|
|
444
444
|
*/
|
|
445
|
-
zone?: Zone;
|
|
445
|
+
zone?: Zone | null;
|
|
446
446
|
/**
|
|
447
447
|
* Page number.
|
|
448
448
|
*/
|
|
449
|
-
page?: number;
|
|
449
|
+
page?: number | null;
|
|
450
450
|
/**
|
|
451
451
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
452
452
|
*/
|
|
453
|
-
pageSize?: number;
|
|
453
|
+
pageSize?: number | null;
|
|
454
454
|
};
|
|
455
455
|
export interface ListVolumeTypesResponse {
|
|
456
456
|
/**
|
|
@@ -466,39 +466,39 @@ export type ListVolumesRequest = {
|
|
|
466
466
|
/**
|
|
467
467
|
* Zone to target. If none is passed will use default zone from the config.
|
|
468
468
|
*/
|
|
469
|
-
zone?: Zone;
|
|
469
|
+
zone?: Zone | null;
|
|
470
470
|
/**
|
|
471
471
|
* Criteria to use when ordering the list.
|
|
472
472
|
*/
|
|
473
|
-
orderBy?: ListVolumesRequestOrderBy;
|
|
473
|
+
orderBy?: ListVolumesRequestOrderBy | null;
|
|
474
474
|
/**
|
|
475
475
|
* Filter by Project ID.
|
|
476
476
|
*/
|
|
477
|
-
projectId?: string;
|
|
477
|
+
projectId?: string | null;
|
|
478
478
|
/**
|
|
479
479
|
* Filter by Organization ID.
|
|
480
480
|
*/
|
|
481
|
-
organizationId?: string;
|
|
481
|
+
organizationId?: string | null;
|
|
482
482
|
/**
|
|
483
483
|
* Page number.
|
|
484
484
|
*/
|
|
485
|
-
page?: number;
|
|
485
|
+
page?: number | null;
|
|
486
486
|
/**
|
|
487
487
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
488
488
|
*/
|
|
489
|
-
pageSize?: number;
|
|
489
|
+
pageSize?: number | null;
|
|
490
490
|
/**
|
|
491
491
|
* Filter the return volumes by their names.
|
|
492
492
|
*/
|
|
493
|
-
name?: string;
|
|
493
|
+
name?: string | null;
|
|
494
494
|
/**
|
|
495
495
|
* Filter by a product resource ID linked to this volume (such as an Instance ID).
|
|
496
496
|
*/
|
|
497
|
-
productResourceId?: string;
|
|
497
|
+
productResourceId?: string | null;
|
|
498
498
|
/**
|
|
499
499
|
* Filter by tags. Only volumes with one or more matching tags will be returned.
|
|
500
500
|
*/
|
|
501
|
-
tags?: string[];
|
|
501
|
+
tags?: string[] | null;
|
|
502
502
|
/**
|
|
503
503
|
* Display deleted volumes not erased yet.
|
|
504
504
|
*/
|
|
@@ -506,11 +506,11 @@ export type ListVolumesRequest = {
|
|
|
506
506
|
/**
|
|
507
507
|
* Filter by volume type.
|
|
508
508
|
*/
|
|
509
|
-
volumeType?: string;
|
|
509
|
+
volumeType?: string | null;
|
|
510
510
|
/**
|
|
511
511
|
* Filter by volume IDs.
|
|
512
512
|
*/
|
|
513
|
-
volumeIds?: string[];
|
|
513
|
+
volumeIds?: string[] | null;
|
|
514
514
|
};
|
|
515
515
|
export interface ListVolumesResponse {
|
|
516
516
|
/**
|
|
@@ -526,7 +526,7 @@ export type UpdateSnapshotRequest = {
|
|
|
526
526
|
/**
|
|
527
527
|
* Zone to target. If none is passed will use default zone from the config.
|
|
528
528
|
*/
|
|
529
|
-
zone?: Zone;
|
|
529
|
+
zone?: Zone | null;
|
|
530
530
|
/**
|
|
531
531
|
* UUID of the snapshot.
|
|
532
532
|
*/
|
|
@@ -534,21 +534,21 @@ export type UpdateSnapshotRequest = {
|
|
|
534
534
|
/**
|
|
535
535
|
* When defined, is the name of the snapshot.
|
|
536
536
|
*/
|
|
537
|
-
name?: string;
|
|
537
|
+
name?: string | null;
|
|
538
538
|
/**
|
|
539
539
|
* List of tags assigned to the snapshot.
|
|
540
540
|
*/
|
|
541
|
-
tags?: string[];
|
|
541
|
+
tags?: string[] | null;
|
|
542
542
|
/**
|
|
543
543
|
* Snapshots are private by default, public snapshots are mainly used to publish OS images.
|
|
544
544
|
*/
|
|
545
|
-
public?: boolean;
|
|
545
|
+
public?: boolean | null;
|
|
546
546
|
};
|
|
547
547
|
export type UpdateVolumeRequest = {
|
|
548
548
|
/**
|
|
549
549
|
* Zone to target. If none is passed will use default zone from the config.
|
|
550
550
|
*/
|
|
551
|
-
zone?: Zone;
|
|
551
|
+
zone?: Zone | null;
|
|
552
552
|
/**
|
|
553
553
|
* UUID of the volume.
|
|
554
554
|
*/
|
|
@@ -556,18 +556,18 @@ export type UpdateVolumeRequest = {
|
|
|
556
556
|
/**
|
|
557
557
|
* When defined, is the new name of the volume.
|
|
558
558
|
*/
|
|
559
|
-
name?: string;
|
|
559
|
+
name?: string | null;
|
|
560
560
|
/**
|
|
561
561
|
* Size in bytes of the volume, with a granularity of 1 GB (10^9 bytes).
|
|
562
562
|
*/
|
|
563
|
-
size?: number;
|
|
563
|
+
size?: number | null;
|
|
564
564
|
/**
|
|
565
565
|
* List of tags assigned to the volume.
|
|
566
566
|
*/
|
|
567
|
-
tags?: string[];
|
|
567
|
+
tags?: string[] | null;
|
|
568
568
|
/**
|
|
569
569
|
* The selected value must be available for the volume's current storage class.
|
|
570
570
|
*/
|
|
571
|
-
perfIops?: number;
|
|
571
|
+
perfIops?: number | null;
|
|
572
572
|
};
|
|
573
573
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import randomName from "@scaleway/random-name";
|
|
|
5
5
|
const unmarshalReference = (data) => {
|
|
6
6
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Reference' failed as data isn't a dictionary.`);
|
|
7
7
|
return {
|
|
8
|
-
createdAt: unmarshalDate(data.created_at),
|
|
8
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
9
9
|
id: data.id,
|
|
10
10
|
productResourceId: data.product_resource_id,
|
|
11
11
|
productResourceType: data.product_resource_type,
|
|
@@ -26,16 +26,16 @@ const unmarshalSnapshot = (data) => {
|
|
|
26
26
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
27
27
|
return {
|
|
28
28
|
class: data.class,
|
|
29
|
-
createdAt: unmarshalDate(data.created_at),
|
|
29
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
30
30
|
id: data.id,
|
|
31
31
|
name: data.name,
|
|
32
|
-
parentVolume: data.parent_volume ? unmarshalSnapshotParentVolume(data.parent_volume) :
|
|
32
|
+
parentVolume: data.parent_volume ? unmarshalSnapshotParentVolume(data.parent_volume) : null,
|
|
33
33
|
projectId: data.project_id,
|
|
34
34
|
references: unmarshalArrayOfObject(data.references, unmarshalReference),
|
|
35
35
|
size: data.size,
|
|
36
36
|
status: data.status,
|
|
37
37
|
tags: data.tags,
|
|
38
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
38
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
39
39
|
zone: data.zone
|
|
40
40
|
};
|
|
41
41
|
};
|
|
@@ -43,25 +43,25 @@ const unmarshalVolumeSpecifications = (data) => {
|
|
|
43
43
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeSpecifications' failed as data isn't a dictionary.`);
|
|
44
44
|
return {
|
|
45
45
|
class: data.class,
|
|
46
|
-
perfIops: data.perf_iops
|
|
46
|
+
perfIops: data.perf_iops ?? null
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
const unmarshalVolume = (data) => {
|
|
50
50
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
51
51
|
return {
|
|
52
|
-
createdAt: unmarshalDate(data.created_at),
|
|
52
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
53
53
|
id: data.id,
|
|
54
|
-
lastDetachedAt: unmarshalDate(data.last_detached_at),
|
|
54
|
+
lastDetachedAt: unmarshalDate(data.last_detached_at) ?? null,
|
|
55
55
|
name: data.name,
|
|
56
|
-
parentSnapshotId: data.parent_snapshot_id,
|
|
56
|
+
parentSnapshotId: data.parent_snapshot_id ?? null,
|
|
57
57
|
projectId: data.project_id,
|
|
58
58
|
references: unmarshalArrayOfObject(data.references, unmarshalReference),
|
|
59
59
|
size: data.size,
|
|
60
|
-
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) :
|
|
60
|
+
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) : null,
|
|
61
61
|
status: data.status,
|
|
62
62
|
tags: data.tags,
|
|
63
63
|
type: data.type,
|
|
64
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
64
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
65
65
|
zone: data.zone
|
|
66
66
|
};
|
|
67
67
|
};
|
|
@@ -75,9 +75,9 @@ const unmarshalListSnapshotsResponse = (data) => {
|
|
|
75
75
|
const unmarshalVolumeType = (data) => {
|
|
76
76
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeType' failed as data isn't a dictionary.`);
|
|
77
77
|
return {
|
|
78
|
-
pricing: data.pricing ? unmarshalMoney(data.pricing) :
|
|
79
|
-
snapshotPricing: data.snapshot_pricing ? unmarshalMoney(data.snapshot_pricing) :
|
|
80
|
-
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) :
|
|
78
|
+
pricing: data.pricing ? unmarshalMoney(data.pricing) : null,
|
|
79
|
+
snapshotPricing: data.snapshot_pricing ? unmarshalMoney(data.snapshot_pricing) : null,
|
|
80
|
+
specs: data.specs ? unmarshalVolumeSpecifications(data.specs) : null,
|
|
81
81
|
type: data.type
|
|
82
82
|
};
|
|
83
83
|
};
|
|
@@ -112,10 +112,10 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
112
112
|
tags: request.tags,
|
|
113
113
|
...resolveOneOf([{
|
|
114
114
|
param: "from_empty",
|
|
115
|
-
value: request.fromEmpty
|
|
115
|
+
value: request.fromEmpty != null ? marshalCreateVolumeRequestFromEmpty(request.fromEmpty, defaults) : void 0
|
|
116
116
|
}, {
|
|
117
117
|
param: "from_snapshot",
|
|
118
|
-
value: request.fromSnapshot
|
|
118
|
+
value: request.fromSnapshot != null ? marshalCreateVolumeRequestFromSnapshot(request.fromSnapshot, defaults) : void 0
|
|
119
119
|
}]),
|
|
120
120
|
...resolveOneOf([{
|
|
121
121
|
param: "perf_iops",
|
|
@@ -23,7 +23,7 @@ export interface Reference {
|
|
|
23
23
|
/**
|
|
24
24
|
* Creation date of the reference.
|
|
25
25
|
*/
|
|
26
|
-
createdAt?: Date;
|
|
26
|
+
createdAt?: Date | null;
|
|
27
27
|
/**
|
|
28
28
|
* Type of reference (link, exclusive, read_only).
|
|
29
29
|
*/
|
|
@@ -55,7 +55,7 @@ export interface VolumeSpecifications {
|
|
|
55
55
|
/**
|
|
56
56
|
* The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
|
|
57
57
|
*/
|
|
58
|
-
perfIops?: number;
|
|
58
|
+
perfIops?: number | null;
|
|
59
59
|
/**
|
|
60
60
|
* The storage class of the volume.
|
|
61
61
|
*/
|
|
@@ -72,7 +72,7 @@ export interface CreateVolumeRequestFromSnapshot {
|
|
|
72
72
|
* Must be compliant with the minimum (1 GB) and maximum (10 TB) allowed size.
|
|
73
73
|
Size is optional and is used only if a resize of the volume is requested, otherwise original snapshot size will be used.
|
|
74
74
|
*/
|
|
75
|
-
size?: number;
|
|
75
|
+
size?: number | null;
|
|
76
76
|
/**
|
|
77
77
|
* Source snapshot from which volume will be created.
|
|
78
78
|
*/
|
|
@@ -90,7 +90,7 @@ export interface Snapshot {
|
|
|
90
90
|
/**
|
|
91
91
|
* If the parent volume was deleted, value is null.
|
|
92
92
|
*/
|
|
93
|
-
parentVolume?: SnapshotParentVolume;
|
|
93
|
+
parentVolume?: SnapshotParentVolume | null;
|
|
94
94
|
/**
|
|
95
95
|
* Size in bytes of the snapshot.
|
|
96
96
|
*/
|
|
@@ -102,11 +102,11 @@ export interface Snapshot {
|
|
|
102
102
|
/**
|
|
103
103
|
* Creation date of the snapshot.
|
|
104
104
|
*/
|
|
105
|
-
createdAt?: Date;
|
|
105
|
+
createdAt?: Date | null;
|
|
106
106
|
/**
|
|
107
107
|
* Last modification date of the properties of a snapshot.
|
|
108
108
|
*/
|
|
109
|
-
updatedAt?: Date;
|
|
109
|
+
updatedAt?: Date | null;
|
|
110
110
|
/**
|
|
111
111
|
* List of the references to the snapshot.
|
|
112
112
|
*/
|
|
@@ -136,15 +136,15 @@ export interface VolumeType {
|
|
|
136
136
|
/**
|
|
137
137
|
* Price of the volume billed in GB/hour.
|
|
138
138
|
*/
|
|
139
|
-
pricing?: Money;
|
|
139
|
+
pricing?: Money | null;
|
|
140
140
|
/**
|
|
141
141
|
* Price of the snapshot billed in GB/hour.
|
|
142
142
|
*/
|
|
143
|
-
snapshotPricing?: Money;
|
|
143
|
+
snapshotPricing?: Money | null;
|
|
144
144
|
/**
|
|
145
145
|
* Volume specifications of the volume type.
|
|
146
146
|
*/
|
|
147
|
-
specs?: VolumeSpecifications;
|
|
147
|
+
specs?: VolumeSpecifications | null;
|
|
148
148
|
}
|
|
149
149
|
export interface Volume {
|
|
150
150
|
/**
|
|
@@ -170,11 +170,11 @@ export interface Volume {
|
|
|
170
170
|
/**
|
|
171
171
|
* Creation date of the volume.
|
|
172
172
|
*/
|
|
173
|
-
createdAt?: Date;
|
|
173
|
+
createdAt?: Date | null;
|
|
174
174
|
/**
|
|
175
175
|
* Last update of the properties of a volume.
|
|
176
176
|
*/
|
|
177
|
-
updatedAt?: Date;
|
|
177
|
+
updatedAt?: Date | null;
|
|
178
178
|
/**
|
|
179
179
|
* List of the references to the volume.
|
|
180
180
|
*/
|
|
@@ -182,7 +182,7 @@ export interface Volume {
|
|
|
182
182
|
/**
|
|
183
183
|
* When a volume is created from a snapshot, is the UUID of the snapshot from which the volume has been created.
|
|
184
184
|
*/
|
|
185
|
-
parentSnapshotId?: string;
|
|
185
|
+
parentSnapshotId?: string | null;
|
|
186
186
|
/**
|
|
187
187
|
* Current status of the volume (available, in_use, ...).
|
|
188
188
|
*/
|
|
@@ -198,17 +198,17 @@ export interface Volume {
|
|
|
198
198
|
/**
|
|
199
199
|
* Specifications of the volume.
|
|
200
200
|
*/
|
|
201
|
-
specs?: VolumeSpecifications;
|
|
201
|
+
specs?: VolumeSpecifications | null;
|
|
202
202
|
/**
|
|
203
203
|
* Last time the volume was detached.
|
|
204
204
|
*/
|
|
205
|
-
lastDetachedAt?: Date;
|
|
205
|
+
lastDetachedAt?: Date | null;
|
|
206
206
|
}
|
|
207
207
|
export type CreateSnapshotRequest = {
|
|
208
208
|
/**
|
|
209
209
|
* Zone to target. If none is passed will use default zone from the config.
|
|
210
210
|
*/
|
|
211
|
-
zone?: Zone;
|
|
211
|
+
zone?: Zone | null;
|
|
212
212
|
/**
|
|
213
213
|
* UUID of the volume to snapshot.
|
|
214
214
|
*/
|
|
@@ -216,57 +216,57 @@ export type CreateSnapshotRequest = {
|
|
|
216
216
|
/**
|
|
217
217
|
* Name of the snapshot.
|
|
218
218
|
*/
|
|
219
|
-
name?: string;
|
|
219
|
+
name?: string | null;
|
|
220
220
|
/**
|
|
221
221
|
* UUID of the project to which the volume and the snapshot belong.
|
|
222
222
|
*/
|
|
223
|
-
projectId?: string;
|
|
223
|
+
projectId?: string | null;
|
|
224
224
|
/**
|
|
225
225
|
* List of tags assigned to the snapshot.
|
|
226
226
|
*/
|
|
227
|
-
tags?: string[];
|
|
227
|
+
tags?: string[] | null;
|
|
228
228
|
};
|
|
229
229
|
export type CreateVolumeRequest = {
|
|
230
230
|
/**
|
|
231
231
|
* Zone to target. If none is passed will use default zone from the config.
|
|
232
232
|
*/
|
|
233
|
-
zone?: Zone;
|
|
233
|
+
zone?: Zone | null;
|
|
234
234
|
/**
|
|
235
235
|
* Name of the volume.
|
|
236
236
|
*/
|
|
237
|
-
name?: string;
|
|
237
|
+
name?: string | null;
|
|
238
238
|
/**
|
|
239
239
|
* The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
|
|
240
240
|
*
|
|
241
241
|
* One-of ('requirements'): at most one of 'perfIops' could be set.
|
|
242
242
|
*/
|
|
243
|
-
perfIops?: number;
|
|
243
|
+
perfIops?: number | null;
|
|
244
244
|
/**
|
|
245
245
|
* UUID of the project the volume belongs to.
|
|
246
246
|
*/
|
|
247
|
-
projectId?: string;
|
|
247
|
+
projectId?: string | null;
|
|
248
248
|
/**
|
|
249
249
|
* Specify the size of the new volume if creating a new one from scratch.
|
|
250
250
|
*
|
|
251
251
|
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
|
|
252
252
|
*/
|
|
253
|
-
fromEmpty?: CreateVolumeRequestFromEmpty;
|
|
253
|
+
fromEmpty?: CreateVolumeRequestFromEmpty | null;
|
|
254
254
|
/**
|
|
255
255
|
* Specify the snapshot ID of the original snapshot.
|
|
256
256
|
*
|
|
257
257
|
* One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
|
|
258
258
|
*/
|
|
259
|
-
fromSnapshot?: CreateVolumeRequestFromSnapshot;
|
|
259
|
+
fromSnapshot?: CreateVolumeRequestFromSnapshot | null;
|
|
260
260
|
/**
|
|
261
261
|
* List of tags assigned to the volume.
|
|
262
262
|
*/
|
|
263
|
-
tags?: string[];
|
|
263
|
+
tags?: string[] | null;
|
|
264
264
|
};
|
|
265
265
|
export type DeleteSnapshotRequest = {
|
|
266
266
|
/**
|
|
267
267
|
* Zone to target. If none is passed will use default zone from the config.
|
|
268
268
|
*/
|
|
269
|
-
zone?: Zone;
|
|
269
|
+
zone?: Zone | null;
|
|
270
270
|
/**
|
|
271
271
|
* UUID of the snapshot.
|
|
272
272
|
*/
|
|
@@ -276,7 +276,7 @@ export type DeleteVolumeRequest = {
|
|
|
276
276
|
/**
|
|
277
277
|
* Zone to target. If none is passed will use default zone from the config.
|
|
278
278
|
*/
|
|
279
|
-
zone?: Zone;
|
|
279
|
+
zone?: Zone | null;
|
|
280
280
|
/**
|
|
281
281
|
* UUID of the volume.
|
|
282
282
|
*/
|
|
@@ -286,7 +286,7 @@ export type ExportSnapshotToObjectStorageRequest = {
|
|
|
286
286
|
/**
|
|
287
287
|
* Zone to target. If none is passed will use default zone from the config.
|
|
288
288
|
*/
|
|
289
|
-
zone?: Zone;
|
|
289
|
+
zone?: Zone | null;
|
|
290
290
|
/**
|
|
291
291
|
* UUID of the snapshot.
|
|
292
292
|
*/
|
|
@@ -304,7 +304,7 @@ export type GetSnapshotRequest = {
|
|
|
304
304
|
/**
|
|
305
305
|
* Zone to target. If none is passed will use default zone from the config.
|
|
306
306
|
*/
|
|
307
|
-
zone?: Zone;
|
|
307
|
+
zone?: Zone | null;
|
|
308
308
|
/**
|
|
309
309
|
* UUID of the snapshot.
|
|
310
310
|
*/
|
|
@@ -314,7 +314,7 @@ export type GetVolumeRequest = {
|
|
|
314
314
|
/**
|
|
315
315
|
* Zone to target. If none is passed will use default zone from the config.
|
|
316
316
|
*/
|
|
317
|
-
zone?: Zone;
|
|
317
|
+
zone?: Zone | null;
|
|
318
318
|
/**
|
|
319
319
|
* UUID of the volume.
|
|
320
320
|
*/
|
|
@@ -324,7 +324,7 @@ export type ImportSnapshotFromObjectStorageRequest = {
|
|
|
324
324
|
/**
|
|
325
325
|
* Zone to target. If none is passed will use default zone from the config.
|
|
326
326
|
*/
|
|
327
|
-
zone?: Zone;
|
|
327
|
+
zone?: Zone | null;
|
|
328
328
|
/**
|
|
329
329
|
* Scaleway Object Storage bucket where the object is stored.
|
|
330
330
|
*/
|
|
@@ -340,21 +340,21 @@ export type ImportSnapshotFromObjectStorageRequest = {
|
|
|
340
340
|
/**
|
|
341
341
|
* UUID of the Project to which the volume and the snapshot belong.
|
|
342
342
|
*/
|
|
343
|
-
projectId?: string;
|
|
343
|
+
projectId?: string | null;
|
|
344
344
|
/**
|
|
345
345
|
* List of tags assigned to the snapshot.
|
|
346
346
|
*/
|
|
347
|
-
tags?: string[];
|
|
347
|
+
tags?: string[] | null;
|
|
348
348
|
/**
|
|
349
349
|
* Size of the snapshot.
|
|
350
350
|
*/
|
|
351
|
-
size?: number;
|
|
351
|
+
size?: number | null;
|
|
352
352
|
};
|
|
353
353
|
export type ImportSnapshotFromS3Request = {
|
|
354
354
|
/**
|
|
355
355
|
* Zone to target. If none is passed will use default zone from the config.
|
|
356
356
|
*/
|
|
357
|
-
zone?: Zone;
|
|
357
|
+
zone?: Zone | null;
|
|
358
358
|
/**
|
|
359
359
|
* Scaleway Object Storage bucket where the object is stored.
|
|
360
360
|
*/
|
|
@@ -370,53 +370,53 @@ export type ImportSnapshotFromS3Request = {
|
|
|
370
370
|
/**
|
|
371
371
|
* UUID of the Project to which the volume and the snapshot belong.
|
|
372
372
|
*/
|
|
373
|
-
projectId?: string;
|
|
373
|
+
projectId?: string | null;
|
|
374
374
|
/**
|
|
375
375
|
* List of tags assigned to the snapshot.
|
|
376
376
|
*/
|
|
377
|
-
tags?: string[];
|
|
377
|
+
tags?: string[] | null;
|
|
378
378
|
/**
|
|
379
379
|
* Size of the snapshot.
|
|
380
380
|
*/
|
|
381
|
-
size?: number;
|
|
381
|
+
size?: number | null;
|
|
382
382
|
};
|
|
383
383
|
export type ListSnapshotsRequest = {
|
|
384
384
|
/**
|
|
385
385
|
* Zone to target. If none is passed will use default zone from the config.
|
|
386
386
|
*/
|
|
387
|
-
zone?: Zone;
|
|
387
|
+
zone?: Zone | null;
|
|
388
388
|
/**
|
|
389
389
|
* Criteria to use when ordering the list.
|
|
390
390
|
*/
|
|
391
|
-
orderBy?: ListSnapshotsRequestOrderBy;
|
|
391
|
+
orderBy?: ListSnapshotsRequestOrderBy | null;
|
|
392
392
|
/**
|
|
393
393
|
* Filter by Project ID.
|
|
394
394
|
*/
|
|
395
|
-
projectId?: string;
|
|
395
|
+
projectId?: string | null;
|
|
396
396
|
/**
|
|
397
397
|
* Filter by Organization ID.
|
|
398
398
|
*/
|
|
399
|
-
organizationId?: string;
|
|
399
|
+
organizationId?: string | null;
|
|
400
400
|
/**
|
|
401
401
|
* Page number.
|
|
402
402
|
*/
|
|
403
|
-
page?: number;
|
|
403
|
+
page?: number | null;
|
|
404
404
|
/**
|
|
405
405
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
406
406
|
*/
|
|
407
|
-
pageSize?: number;
|
|
407
|
+
pageSize?: number | null;
|
|
408
408
|
/**
|
|
409
409
|
* Filter snapshots by the ID of the original volume.
|
|
410
410
|
*/
|
|
411
|
-
volumeId?: string;
|
|
411
|
+
volumeId?: string | null;
|
|
412
412
|
/**
|
|
413
413
|
* Filter snapshots by their names.
|
|
414
414
|
*/
|
|
415
|
-
name?: string;
|
|
415
|
+
name?: string | null;
|
|
416
416
|
/**
|
|
417
417
|
* Filter by tags. Only snapshots with one or more matching tags will be returned.
|
|
418
418
|
*/
|
|
419
|
-
tags?: string[];
|
|
419
|
+
tags?: string[] | null;
|
|
420
420
|
};
|
|
421
421
|
export interface ListSnapshotsResponse {
|
|
422
422
|
/**
|
|
@@ -432,15 +432,15 @@ export type ListVolumeTypesRequest = {
|
|
|
432
432
|
/**
|
|
433
433
|
* Zone to target. If none is passed will use default zone from the config.
|
|
434
434
|
*/
|
|
435
|
-
zone?: Zone;
|
|
435
|
+
zone?: Zone | null;
|
|
436
436
|
/**
|
|
437
437
|
* Page number.
|
|
438
438
|
*/
|
|
439
|
-
page?: number;
|
|
439
|
+
page?: number | null;
|
|
440
440
|
/**
|
|
441
441
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
442
442
|
*/
|
|
443
|
-
pageSize?: number;
|
|
443
|
+
pageSize?: number | null;
|
|
444
444
|
};
|
|
445
445
|
export interface ListVolumeTypesResponse {
|
|
446
446
|
/**
|
|
@@ -456,39 +456,39 @@ export type ListVolumesRequest = {
|
|
|
456
456
|
/**
|
|
457
457
|
* Zone to target. If none is passed will use default zone from the config.
|
|
458
458
|
*/
|
|
459
|
-
zone?: Zone;
|
|
459
|
+
zone?: Zone | null;
|
|
460
460
|
/**
|
|
461
461
|
* Criteria to use when ordering the list.
|
|
462
462
|
*/
|
|
463
|
-
orderBy?: ListVolumesRequestOrderBy;
|
|
463
|
+
orderBy?: ListVolumesRequestOrderBy | null;
|
|
464
464
|
/**
|
|
465
465
|
* Filter by Project ID.
|
|
466
466
|
*/
|
|
467
|
-
projectId?: string;
|
|
467
|
+
projectId?: string | null;
|
|
468
468
|
/**
|
|
469
469
|
* Filter by Organization ID.
|
|
470
470
|
*/
|
|
471
|
-
organizationId?: string;
|
|
471
|
+
organizationId?: string | null;
|
|
472
472
|
/**
|
|
473
473
|
* Page number.
|
|
474
474
|
*/
|
|
475
|
-
page?: number;
|
|
475
|
+
page?: number | null;
|
|
476
476
|
/**
|
|
477
477
|
* Page size, defines how many entries are returned in one page, must be lower or equal to 100.
|
|
478
478
|
*/
|
|
479
|
-
pageSize?: number;
|
|
479
|
+
pageSize?: number | null;
|
|
480
480
|
/**
|
|
481
481
|
* Filter the return volumes by their names.
|
|
482
482
|
*/
|
|
483
|
-
name?: string;
|
|
483
|
+
name?: string | null;
|
|
484
484
|
/**
|
|
485
485
|
* Filter by a product resource ID linked to this volume (such as an Instance ID).
|
|
486
486
|
*/
|
|
487
|
-
productResourceId?: string;
|
|
487
|
+
productResourceId?: string | null;
|
|
488
488
|
/**
|
|
489
489
|
* Filter by tags. Only volumes with one or more matching tags will be returned.
|
|
490
490
|
*/
|
|
491
|
-
tags?: string[];
|
|
491
|
+
tags?: string[] | null;
|
|
492
492
|
};
|
|
493
493
|
export interface ListVolumesResponse {
|
|
494
494
|
/**
|
|
@@ -504,7 +504,7 @@ export type UpdateSnapshotRequest = {
|
|
|
504
504
|
/**
|
|
505
505
|
* Zone to target. If none is passed will use default zone from the config.
|
|
506
506
|
*/
|
|
507
|
-
zone?: Zone;
|
|
507
|
+
zone?: Zone | null;
|
|
508
508
|
/**
|
|
509
509
|
* UUID of the snapshot.
|
|
510
510
|
*/
|
|
@@ -512,17 +512,17 @@ export type UpdateSnapshotRequest = {
|
|
|
512
512
|
/**
|
|
513
513
|
* When defined, is the name of the snapshot.
|
|
514
514
|
*/
|
|
515
|
-
name?: string;
|
|
515
|
+
name?: string | null;
|
|
516
516
|
/**
|
|
517
517
|
* List of tags assigned to the snapshot.
|
|
518
518
|
*/
|
|
519
|
-
tags?: string[];
|
|
519
|
+
tags?: string[] | null;
|
|
520
520
|
};
|
|
521
521
|
export type UpdateVolumeRequest = {
|
|
522
522
|
/**
|
|
523
523
|
* Zone to target. If none is passed will use default zone from the config.
|
|
524
524
|
*/
|
|
525
|
-
zone?: Zone;
|
|
525
|
+
zone?: Zone | null;
|
|
526
526
|
/**
|
|
527
527
|
* UUID of the volume.
|
|
528
528
|
*/
|
|
@@ -530,18 +530,18 @@ export type UpdateVolumeRequest = {
|
|
|
530
530
|
/**
|
|
531
531
|
* When defined, is the new name of the volume.
|
|
532
532
|
*/
|
|
533
|
-
name?: string;
|
|
533
|
+
name?: string | null;
|
|
534
534
|
/**
|
|
535
535
|
* Size in bytes of the volume, with a granularity of 1 GB (10^9 bytes).
|
|
536
536
|
*/
|
|
537
|
-
size?: number;
|
|
537
|
+
size?: number | null;
|
|
538
538
|
/**
|
|
539
539
|
* List of tags assigned to the volume.
|
|
540
540
|
*/
|
|
541
|
-
tags?: string[];
|
|
541
|
+
tags?: string[] | null;
|
|
542
542
|
/**
|
|
543
543
|
* The selected value must be available for the volume's current storage class.
|
|
544
544
|
*/
|
|
545
|
-
perfIops?: number;
|
|
545
|
+
perfIops?: number | null;
|
|
546
546
|
};
|
|
547
547
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-block",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "Scaleway SDK block",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@scaleway/random-name": "6.0.2",
|
|
36
|
-
"@scaleway/sdk-std": "2.9.
|
|
36
|
+
"@scaleway/sdk-std": "2.9.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|