@scaleway/sdk 2.30.0 → 2.32.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.
Files changed (58) hide show
  1. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +23 -0
  3. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +23 -0
  4. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +11 -0
  5. package/dist/api/baremetal/v1/api.gen.cjs +1 -0
  6. package/dist/api/baremetal/v1/api.gen.js +1 -0
  7. package/dist/api/baremetal/v1/types.gen.d.ts +2 -0
  8. package/dist/api/block/v1alpha1/api.gen.cjs +44 -0
  9. package/dist/api/block/v1alpha1/api.gen.d.ts +19 -1
  10. package/dist/api/block/v1alpha1/api.gen.js +45 -1
  11. package/dist/api/block/v1alpha1/content.gen.cjs +4 -2
  12. package/dist/api/block/v1alpha1/content.gen.js +4 -2
  13. package/dist/api/block/v1alpha1/index.gen.d.ts +1 -1
  14. package/dist/api/block/v1alpha1/marshalling.gen.cjs +14 -0
  15. package/dist/api/block/v1alpha1/marshalling.gen.d.ts +3 -1
  16. package/dist/api/block/v1alpha1/marshalling.gen.js +14 -0
  17. package/dist/api/block/v1alpha1/types.gen.d.ts +28 -2
  18. package/dist/api/block/v1alpha1/validation-rules.gen.cjs +6 -0
  19. package/dist/api/block/v1alpha1/validation-rules.gen.d.ts +5 -0
  20. package/dist/api/block/v1alpha1/validation-rules.gen.js +6 -0
  21. package/dist/api/instance/v1/marshalling.gen.cjs +5 -0
  22. package/dist/api/instance/v1/marshalling.gen.js +5 -0
  23. package/dist/api/instance/v1/types.gen.d.ts +21 -0
  24. package/dist/api/instance/v1/types.private.gen.d.ts +7 -0
  25. package/dist/api/k8s/v1/api.gen.cjs +0 -22
  26. package/dist/api/k8s/v1/api.gen.d.ts +1 -10
  27. package/dist/api/k8s/v1/api.gen.js +1 -23
  28. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  29. package/dist/api/k8s/v1/marshalling.gen.cjs +0 -4
  30. package/dist/api/k8s/v1/marshalling.gen.d.ts +1 -2
  31. package/dist/api/k8s/v1/marshalling.gen.js +0 -4
  32. package/dist/api/k8s/v1/types.gen.d.ts +0 -11
  33. package/dist/api/secret/v1beta1/types.gen.d.ts +4 -4
  34. package/dist/api/tem/v1alpha1/api.gen.cjs +49 -0
  35. package/dist/api/tem/v1alpha1/api.gen.d.ts +13 -1
  36. package/dist/api/tem/v1alpha1/api.gen.js +50 -1
  37. package/dist/api/tem/v1alpha1/index.gen.cjs +2 -0
  38. package/dist/api/tem/v1alpha1/index.gen.d.ts +2 -1
  39. package/dist/api/tem/v1alpha1/index.gen.js +3 -1
  40. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +71 -0
  41. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +5 -1
  42. package/dist/api/tem/v1alpha1/marshalling.gen.js +72 -1
  43. package/dist/api/tem/v1alpha1/types.gen.d.ts +115 -0
  44. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +33 -0
  45. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +28 -0
  46. package/dist/api/tem/v1alpha1/validation-rules.gen.js +33 -0
  47. package/dist/api/vpc/v2/api.gen.cjs +28 -1
  48. package/dist/api/vpc/v2/api.gen.d.ts +14 -2
  49. package/dist/api/vpc/v2/api.gen.js +29 -2
  50. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  51. package/dist/api/vpc/v2/marshalling.gen.cjs +16 -1
  52. package/dist/api/vpc/v2/marshalling.gen.d.ts +2 -1
  53. package/dist/api/vpc/v2/marshalling.gen.js +16 -1
  54. package/dist/api/vpc/v2/types.gen.d.ts +41 -0
  55. package/dist/scw/constants.cjs +1 -1
  56. package/dist/scw/constants.d.ts +2 -2
  57. package/dist/scw/constants.js +1 -1
  58. package/package.json +2 -2
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CreateServerRequest, DeleteServerRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeMemory, ServerTypeStock, UpdateServerRequest, } from './types.gen';
3
+ export type { CreateServerRequest, DeleteServerRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeGPU, ServerTypeMemory, ServerTypeNetwork, ServerTypeStock, UpdateServerRequest, } from './types.gen';
@@ -29,6 +29,7 @@ const unmarshalServerTypeCPU = (data) => {
29
29
  }
30
30
  return {
31
31
  coreCount: data.core_count,
32
+ frequency: data.frequency,
32
33
  name: data.name
33
34
  };
34
35
  };
@@ -43,6 +44,16 @@ const unmarshalServerTypeDisk = (data) => {
43
44
  type: data.type
44
45
  };
45
46
  };
47
+ const unmarshalServerTypeGPU = (data) => {
48
+ if (!json.isJSONObject(data)) {
49
+ throw new TypeError(
50
+ `Unmarshalling the type 'ServerTypeGPU' failed as data isn't a dictionary.`
51
+ );
52
+ }
53
+ return {
54
+ count: data.count
55
+ };
56
+ };
46
57
  const unmarshalServerTypeMemory = (data) => {
47
58
  if (!json.isJSONObject(data)) {
48
59
  throw new TypeError(
@@ -54,6 +65,16 @@ const unmarshalServerTypeMemory = (data) => {
54
65
  type: data.type
55
66
  };
56
67
  };
68
+ const unmarshalServerTypeNetwork = (data) => {
69
+ if (!json.isJSONObject(data)) {
70
+ throw new TypeError(
71
+ `Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
72
+ );
73
+ }
74
+ return {
75
+ publicBandwidthBps: data.public_bandwidth_bps
76
+ };
77
+ };
57
78
  const unmarshalServerType = (data) => {
58
79
  if (!json.isJSONObject(data)) {
59
80
  throw new TypeError(
@@ -64,9 +85,11 @@ const unmarshalServerType = (data) => {
64
85
  cpu: data.cpu ? unmarshalServerTypeCPU(data.cpu) : void 0,
65
86
  defaultOs: data.default_os ? unmarshalOS(data.default_os) : void 0,
66
87
  disk: data.disk ? unmarshalServerTypeDisk(data.disk) : void 0,
88
+ gpu: data.gpu ? unmarshalServerTypeGPU(data.gpu) : void 0,
67
89
  memory: data.memory ? unmarshalServerTypeMemory(data.memory) : void 0,
68
90
  minimumLeaseDuration: data.minimum_lease_duration,
69
91
  name: data.name,
92
+ network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
70
93
  stock: data.stock
71
94
  };
72
95
  };
@@ -27,6 +27,7 @@ const unmarshalServerTypeCPU = (data) => {
27
27
  }
28
28
  return {
29
29
  coreCount: data.core_count,
30
+ frequency: data.frequency,
30
31
  name: data.name
31
32
  };
32
33
  };
@@ -41,6 +42,16 @@ const unmarshalServerTypeDisk = (data) => {
41
42
  type: data.type
42
43
  };
43
44
  };
45
+ const unmarshalServerTypeGPU = (data) => {
46
+ if (!isJSONObject(data)) {
47
+ throw new TypeError(
48
+ `Unmarshalling the type 'ServerTypeGPU' failed as data isn't a dictionary.`
49
+ );
50
+ }
51
+ return {
52
+ count: data.count
53
+ };
54
+ };
44
55
  const unmarshalServerTypeMemory = (data) => {
45
56
  if (!isJSONObject(data)) {
46
57
  throw new TypeError(
@@ -52,6 +63,16 @@ const unmarshalServerTypeMemory = (data) => {
52
63
  type: data.type
53
64
  };
54
65
  };
66
+ const unmarshalServerTypeNetwork = (data) => {
67
+ if (!isJSONObject(data)) {
68
+ throw new TypeError(
69
+ `Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
70
+ );
71
+ }
72
+ return {
73
+ publicBandwidthBps: data.public_bandwidth_bps
74
+ };
75
+ };
55
76
  const unmarshalServerType = (data) => {
56
77
  if (!isJSONObject(data)) {
57
78
  throw new TypeError(
@@ -62,9 +83,11 @@ const unmarshalServerType = (data) => {
62
83
  cpu: data.cpu ? unmarshalServerTypeCPU(data.cpu) : void 0,
63
84
  defaultOs: data.default_os ? unmarshalOS(data.default_os) : void 0,
64
85
  disk: data.disk ? unmarshalServerTypeDisk(data.disk) : void 0,
86
+ gpu: data.gpu ? unmarshalServerTypeGPU(data.gpu) : void 0,
65
87
  memory: data.memory ? unmarshalServerTypeMemory(data.memory) : void 0,
66
88
  minimumLeaseDuration: data.minimum_lease_duration,
67
89
  name: data.name,
90
+ network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
68
91
  stock: data.stock
69
92
  };
70
93
  };
@@ -25,15 +25,22 @@ export interface OS {
25
25
  export interface ServerTypeCPU {
26
26
  name: string;
27
27
  coreCount: number;
28
+ frequency: number;
28
29
  }
29
30
  export interface ServerTypeDisk {
30
31
  capacity: number;
31
32
  type: string;
32
33
  }
34
+ export interface ServerTypeGPU {
35
+ count: number;
36
+ }
33
37
  export interface ServerTypeMemory {
34
38
  capacity: number;
35
39
  type: string;
36
40
  }
41
+ export interface ServerTypeNetwork {
42
+ publicBandwidthBps: number;
43
+ }
37
44
  export interface ServerType {
38
45
  /** CPU description. */
39
46
  cpu?: ServerTypeCPU;
@@ -47,6 +54,10 @@ export interface ServerType {
47
54
  stock: ServerTypeStock;
48
55
  /** Minimum duration of the lease in seconds (example. 3.4s). */
49
56
  minimumLeaseDuration?: string;
57
+ /** GPU description. */
58
+ gpu?: ServerTypeGPU;
59
+ /** Network description. */
60
+ network?: ServerTypeNetwork;
50
61
  /** The default OS for this server type. */
51
62
  defaultOs?: OS;
52
63
  }
@@ -338,6 +338,7 @@ class API extends api.API {
338
338
  method: "GET",
339
339
  path: `/baremetal/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers`,
340
340
  urlParams: marshalling.urlParams(
341
+ ["name", request.name],
341
342
  ["page", request.page],
342
343
  [
343
344
  "page_size",
@@ -336,6 +336,7 @@ class API extends API$1 {
336
336
  method: "GET",
337
337
  path: `/baremetal/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers`,
338
338
  urlParams: urlParams(
339
+ ["name", request.name],
339
340
  ["page", request.page],
340
341
  [
341
342
  "page_size",
@@ -478,6 +478,8 @@ export type ListOffersRequest = {
478
478
  pageSize?: number;
479
479
  /** Subscription period type to filter offers by. */
480
480
  subscriptionPeriod?: OfferSubscriptionPeriod;
481
+ /** Offer name to filter offers by. */
482
+ name?: string;
481
483
  };
482
484
  export interface ListOffersResponse {
483
485
  /** Total count of matching offers. */
@@ -227,6 +227,7 @@ class API extends api.API {
227
227
  * contain a QCOW2 image. The bucket can be imported into any Availability
228
228
  * Zone as long as it is in the same region as the bucket.
229
229
  *
230
+ * @deprecated
230
231
  * @param request - The request {@link ImportSnapshotFromS3Request}
231
232
  * @returns A Promise of Snapshot
232
233
  */
@@ -241,6 +242,49 @@ class API extends api.API {
241
242
  },
242
243
  marshalling_gen.unmarshalSnapshot
243
244
  );
245
+ /**
246
+ * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
247
+ * contain a QCOW2 image. The bucket can be imported into any Availability
248
+ * Zone as long as it is in the same region as the bucket.
249
+ *
250
+ * @param request - The request {@link ImportSnapshotFromObjectStorageRequest}
251
+ * @returns A Promise of Snapshot
252
+ */
253
+ importSnapshotFromObjectStorage = (request) => this.client.fetch(
254
+ {
255
+ body: JSON.stringify(
256
+ marshalling_gen.marshalImportSnapshotFromObjectStorageRequest(
257
+ request,
258
+ this.client.settings
259
+ )
260
+ ),
261
+ headers: jsonContentHeaders,
262
+ method: "POST",
263
+ path: `/block/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/import-from-object-storage`
264
+ },
265
+ marshalling_gen.unmarshalSnapshot
266
+ );
267
+ /**
268
+ * Export a snapshot to a Scaleway Object Storage bucket. The snapshot is
269
+ * exported in QCOW2 format. The snapshot must not be in transient state.
270
+ *
271
+ * @param request - The request {@link ExportSnapshotToObjectStorageRequest}
272
+ * @returns A Promise of Snapshot
273
+ */
274
+ exportSnapshotToObjectStorage = (request) => this.client.fetch(
275
+ {
276
+ body: JSON.stringify(
277
+ marshalling_gen.marshalExportSnapshotToObjectStorageRequest(
278
+ request,
279
+ this.client.settings
280
+ )
281
+ ),
282
+ headers: jsonContentHeaders,
283
+ method: "POST",
284
+ path: `/block/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${marshalling.validatePathParam("snapshotId", request.snapshotId)}/export-to-object-storage`
285
+ },
286
+ marshalling_gen.unmarshalSnapshot
287
+ );
244
288
  /**
245
289
  * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
246
290
  * want to delete. The snapshot must not be in use.
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { WaitForOptions, Zone } from '../../../bridge';
3
- import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
3
+ import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
4
4
  /**
5
5
  * Scaleway Block Storage API.
6
6
  *
@@ -123,10 +123,28 @@ export declare class API extends ParentAPI {
123
123
  * contain a QCOW2 image. The bucket can be imported into any Availability
124
124
  * Zone as long as it is in the same region as the bucket.
125
125
  *
126
+ * @deprecated
126
127
  * @param request - The request {@link ImportSnapshotFromS3Request}
127
128
  * @returns A Promise of Snapshot
128
129
  */
129
130
  importSnapshotFromS3: (request: Readonly<ImportSnapshotFromS3Request>) => Promise<Snapshot>;
131
+ /**
132
+ * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
133
+ * contain a QCOW2 image. The bucket can be imported into any Availability
134
+ * Zone as long as it is in the same region as the bucket.
135
+ *
136
+ * @param request - The request {@link ImportSnapshotFromObjectStorageRequest}
137
+ * @returns A Promise of Snapshot
138
+ */
139
+ importSnapshotFromObjectStorage: (request: Readonly<ImportSnapshotFromObjectStorageRequest>) => Promise<Snapshot>;
140
+ /**
141
+ * Export a snapshot to a Scaleway Object Storage bucket. The snapshot is
142
+ * exported in QCOW2 format. The snapshot must not be in transient state.
143
+ *
144
+ * @param request - The request {@link ExportSnapshotToObjectStorageRequest}
145
+ * @returns A Promise of Snapshot
146
+ */
147
+ exportSnapshotToObjectStorage: (request: Readonly<ExportSnapshotToObjectStorageRequest>) => Promise<Snapshot>;
130
148
  /**
131
149
  * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
132
150
  * want to delete. The snapshot must not be in use.
@@ -3,7 +3,7 @@ import { API as API$1 } from "../../../scw/api.js";
3
3
  import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
4
4
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
5
5
  import { VOLUME_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
6
- import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest } from "./marshalling.gen.js";
6
+ import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromS3Request, marshalImportSnapshotFromObjectStorageRequest, marshalExportSnapshotToObjectStorageRequest, marshalUpdateSnapshotRequest } from "./marshalling.gen.js";
7
7
  const jsonContentHeaders = {
8
8
  "Content-Type": "application/json; charset=utf-8"
9
9
  };
@@ -225,6 +225,7 @@ class API extends API$1 {
225
225
  * contain a QCOW2 image. The bucket can be imported into any Availability
226
226
  * Zone as long as it is in the same region as the bucket.
227
227
  *
228
+ * @deprecated
228
229
  * @param request - The request {@link ImportSnapshotFromS3Request}
229
230
  * @returns A Promise of Snapshot
230
231
  */
@@ -239,6 +240,49 @@ class API extends API$1 {
239
240
  },
240
241
  unmarshalSnapshot
241
242
  );
243
+ /**
244
+ * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
245
+ * contain a QCOW2 image. The bucket can be imported into any Availability
246
+ * Zone as long as it is in the same region as the bucket.
247
+ *
248
+ * @param request - The request {@link ImportSnapshotFromObjectStorageRequest}
249
+ * @returns A Promise of Snapshot
250
+ */
251
+ importSnapshotFromObjectStorage = (request) => this.client.fetch(
252
+ {
253
+ body: JSON.stringify(
254
+ marshalImportSnapshotFromObjectStorageRequest(
255
+ request,
256
+ this.client.settings
257
+ )
258
+ ),
259
+ headers: jsonContentHeaders,
260
+ method: "POST",
261
+ path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/import-from-object-storage`
262
+ },
263
+ unmarshalSnapshot
264
+ );
265
+ /**
266
+ * Export a snapshot to a Scaleway Object Storage bucket. The snapshot is
267
+ * exported in QCOW2 format. The snapshot must not be in transient state.
268
+ *
269
+ * @param request - The request {@link ExportSnapshotToObjectStorageRequest}
270
+ * @returns A Promise of Snapshot
271
+ */
272
+ exportSnapshotToObjectStorage = (request) => this.client.fetch(
273
+ {
274
+ body: JSON.stringify(
275
+ marshalExportSnapshotToObjectStorageRequest(
276
+ request,
277
+ this.client.settings
278
+ )
279
+ ),
280
+ headers: jsonContentHeaders,
281
+ method: "POST",
282
+ path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}/export-to-object-storage`
283
+ },
284
+ unmarshalSnapshot
285
+ );
242
286
  /**
243
287
  * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
244
288
  * want to delete. The snapshot must not be in use.
@@ -7,13 +7,15 @@ const REFERENCE_TRANSIENT_STATUSES = [
7
7
  ];
8
8
  const SNAPSHOT_TRANSIENT_STATUSES = [
9
9
  "creating",
10
- "deleting"
10
+ "deleting",
11
+ "exporting"
11
12
  ];
12
13
  const VOLUME_TRANSIENT_STATUSES = [
13
14
  "creating",
14
15
  "deleting",
15
16
  "resizing",
16
- "snapshotting"
17
+ "snapshotting",
18
+ "updating"
17
19
  ];
18
20
  exports.REFERENCE_TRANSIENT_STATUSES = REFERENCE_TRANSIENT_STATUSES;
19
21
  exports.SNAPSHOT_TRANSIENT_STATUSES = SNAPSHOT_TRANSIENT_STATUSES;
@@ -5,13 +5,15 @@ const REFERENCE_TRANSIENT_STATUSES = [
5
5
  ];
6
6
  const SNAPSHOT_TRANSIENT_STATUSES = [
7
7
  "creating",
8
- "deleting"
8
+ "deleting",
9
+ "exporting"
9
10
  ];
10
11
  const VOLUME_TRANSIENT_STATUSES = [
11
12
  "creating",
12
13
  "deleting",
13
14
  "resizing",
14
- "snapshotting"
15
+ "snapshotting",
16
+ "updating"
15
17
  ];
16
18
  export {
17
19
  REFERENCE_TRANSIENT_STATUSES,
@@ -1,4 +1,4 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen';
3
+ export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -163,6 +163,18 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
163
163
  ]),
164
164
  ...marshalling.resolveOneOf([{ param: "perf_iops", value: request.perfIops }])
165
165
  });
166
+ const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
167
+ bucket: request.bucket,
168
+ key: request.key
169
+ });
170
+ const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
171
+ bucket: request.bucket,
172
+ key: request.key,
173
+ name: request.name,
174
+ project_id: request.projectId ?? defaults.defaultProjectId,
175
+ size: request.size,
176
+ tags: request.tags
177
+ });
166
178
  const marshalImportSnapshotFromS3Request = (request, defaults) => ({
167
179
  bucket: request.bucket,
168
180
  key: request.key,
@@ -183,6 +195,8 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
183
195
  });
184
196
  exports.marshalCreateSnapshotRequest = marshalCreateSnapshotRequest;
185
197
  exports.marshalCreateVolumeRequest = marshalCreateVolumeRequest;
198
+ exports.marshalExportSnapshotToObjectStorageRequest = marshalExportSnapshotToObjectStorageRequest;
199
+ exports.marshalImportSnapshotFromObjectStorageRequest = marshalImportSnapshotFromObjectStorageRequest;
186
200
  exports.marshalImportSnapshotFromS3Request = marshalImportSnapshotFromS3Request;
187
201
  exports.marshalUpdateSnapshotRequest = marshalUpdateSnapshotRequest;
188
202
  exports.marshalUpdateVolumeRequest = marshalUpdateVolumeRequest;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromS3Request, ListSnapshotsResponse, ListVolumeTypesResponse, ListVolumesResponse, Reference, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
2
+ import type { CreateSnapshotRequest, CreateVolumeRequest, ExportSnapshotToObjectStorageRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsResponse, ListVolumeTypesResponse, ListVolumesResponse, Reference, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
3
3
  export declare const unmarshalReference: (data: unknown) => Reference;
4
4
  export declare const unmarshalSnapshot: (data: unknown) => Snapshot;
5
5
  export declare const unmarshalVolume: (data: unknown) => Volume;
@@ -8,6 +8,8 @@ export declare const unmarshalListVolumeTypesResponse: (data: unknown) => ListVo
8
8
  export declare const unmarshalListVolumesResponse: (data: unknown) => ListVolumesResponse;
9
9
  export declare const marshalCreateSnapshotRequest: (request: CreateSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
10
10
  export declare const marshalCreateVolumeRequest: (request: CreateVolumeRequest, defaults: DefaultValues) => Record<string, unknown>;
11
+ export declare const marshalExportSnapshotToObjectStorageRequest: (request: ExportSnapshotToObjectStorageRequest, defaults: DefaultValues) => Record<string, unknown>;
12
+ export declare const marshalImportSnapshotFromObjectStorageRequest: (request: ImportSnapshotFromObjectStorageRequest, defaults: DefaultValues) => Record<string, unknown>;
11
13
  export declare const marshalImportSnapshotFromS3Request: (request: ImportSnapshotFromS3Request, defaults: DefaultValues) => Record<string, unknown>;
12
14
  export declare const marshalUpdateSnapshotRequest: (request: UpdateSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
13
15
  export declare const marshalUpdateVolumeRequest: (request: UpdateVolumeRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -161,6 +161,18 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
161
161
  ]),
162
162
  ...resolveOneOf([{ param: "perf_iops", value: request.perfIops }])
163
163
  });
164
+ const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
165
+ bucket: request.bucket,
166
+ key: request.key
167
+ });
168
+ const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
169
+ bucket: request.bucket,
170
+ key: request.key,
171
+ name: request.name,
172
+ project_id: request.projectId ?? defaults.defaultProjectId,
173
+ size: request.size,
174
+ tags: request.tags
175
+ });
164
176
  const marshalImportSnapshotFromS3Request = (request, defaults) => ({
165
177
  bucket: request.bucket,
166
178
  key: request.key,
@@ -182,6 +194,8 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
182
194
  export {
183
195
  marshalCreateSnapshotRequest,
184
196
  marshalCreateVolumeRequest,
197
+ marshalExportSnapshotToObjectStorageRequest,
198
+ marshalImportSnapshotFromObjectStorageRequest,
185
199
  marshalImportSnapshotFromS3Request,
186
200
  marshalUpdateSnapshotRequest,
187
201
  marshalUpdateVolumeRequest,
@@ -3,9 +3,9 @@ export type ListSnapshotsRequestOrderBy = 'created_at_asc' | 'created_at_desc' |
3
3
  export type ListVolumesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
4
4
  export type ReferenceStatus = 'unknown_status' | 'attaching' | 'attached' | 'detaching' | 'detached' | 'creating' | 'error';
5
5
  export type ReferenceType = 'unknown_type' | 'link' | 'exclusive' | 'read_only';
6
- export type SnapshotStatus = 'unknown_status' | 'creating' | 'available' | 'error' | 'deleting' | 'deleted' | 'in_use' | 'locked';
6
+ export type SnapshotStatus = 'unknown_status' | 'creating' | 'available' | 'error' | 'deleting' | 'deleted' | 'in_use' | 'locked' | 'exporting';
7
7
  export type StorageClass = 'unknown_storage_class' | 'unspecified' | 'bssd' | 'sbs';
8
- export type VolumeStatus = 'unknown_status' | 'creating' | 'available' | 'in_use' | 'deleting' | 'deleted' | 'resizing' | 'error' | 'snapshotting' | 'locked';
8
+ export type VolumeStatus = 'unknown_status' | 'creating' | 'available' | 'in_use' | 'deleting' | 'deleted' | 'resizing' | 'error' | 'snapshotting' | 'locked' | 'updating';
9
9
  export interface Reference {
10
10
  /** UUID of the reference. */
11
11
  id: string;
@@ -181,6 +181,16 @@ export type DeleteVolumeRequest = {
181
181
  /** UUID of the volume. */
182
182
  volumeId: string;
183
183
  };
184
+ export type ExportSnapshotToObjectStorageRequest = {
185
+ /** Zone to target. If none is passed will use default zone from the config. */
186
+ zone?: Zone;
187
+ /** UUID of the snapshot. */
188
+ snapshotId: string;
189
+ /** Scaleway Object Storage bucket where the object is stored. */
190
+ bucket: string;
191
+ /** The object key inside the given bucket. */
192
+ key: string;
193
+ };
184
194
  export type GetSnapshotRequest = {
185
195
  /** Zone to target. If none is passed will use default zone from the config. */
186
196
  zone?: Zone;
@@ -193,6 +203,22 @@ export type GetVolumeRequest = {
193
203
  /** UUID of the volume. */
194
204
  volumeId: string;
195
205
  };
206
+ export type ImportSnapshotFromObjectStorageRequest = {
207
+ /** Zone to target. If none is passed will use default zone from the config. */
208
+ zone?: Zone;
209
+ /** Scaleway Object Storage bucket where the object is stored. */
210
+ bucket: string;
211
+ /** The object key inside the given bucket. */
212
+ key: string;
213
+ /** Name of the snapshot. */
214
+ name: string;
215
+ /** UUID of the Project to which the volume and the snapshot belong. */
216
+ projectId?: string;
217
+ /** List of tags assigned to the snapshot. */
218
+ tags?: string[];
219
+ /** Size of the snapshot. */
220
+ size?: number;
221
+ };
196
222
  export type ImportSnapshotFromS3Request = {
197
223
  /** Zone to target. If none is passed will use default zone from the config. */
198
224
  zone?: Zone;
@@ -10,6 +10,11 @@ const CreateVolumeRequest = {
10
10
  minLength: 1
11
11
  }
12
12
  };
13
+ const ImportSnapshotFromObjectStorageRequest = {
14
+ name: {
15
+ minLength: 1
16
+ }
17
+ };
13
18
  const ImportSnapshotFromS3Request = {
14
19
  name: {
15
20
  minLength: 1
@@ -49,6 +54,7 @@ const Reference = {
49
54
  };
50
55
  exports.CreateSnapshotRequest = CreateSnapshotRequest;
51
56
  exports.CreateVolumeRequest = CreateVolumeRequest;
57
+ exports.ImportSnapshotFromObjectStorageRequest = ImportSnapshotFromObjectStorageRequest;
52
58
  exports.ImportSnapshotFromS3Request = ImportSnapshotFromS3Request;
53
59
  exports.ListSnapshotsRequest = ListSnapshotsRequest;
54
60
  exports.ListVolumeTypesRequest = ListVolumeTypesRequest;
@@ -8,6 +8,11 @@ export declare const CreateVolumeRequest: {
8
8
  minLength: number;
9
9
  };
10
10
  };
11
+ export declare const ImportSnapshotFromObjectStorageRequest: {
12
+ name: {
13
+ minLength: number;
14
+ };
15
+ };
11
16
  export declare const ImportSnapshotFromS3Request: {
12
17
  name: {
13
18
  minLength: number;
@@ -8,6 +8,11 @@ const CreateVolumeRequest = {
8
8
  minLength: 1
9
9
  }
10
10
  };
11
+ const ImportSnapshotFromObjectStorageRequest = {
12
+ name: {
13
+ minLength: 1
14
+ }
15
+ };
11
16
  const ImportSnapshotFromS3Request = {
12
17
  name: {
13
18
  minLength: 1
@@ -48,6 +53,7 @@ const Reference = {
48
53
  export {
49
54
  CreateSnapshotRequest,
50
55
  CreateVolumeRequest,
56
+ ImportSnapshotFromObjectStorageRequest,
51
57
  ImportSnapshotFromS3Request,
52
58
  ListSnapshotsRequest,
53
59
  ListVolumeTypesRequest,
@@ -223,6 +223,8 @@ const unmarshalServer = (data) => {
223
223
  );
224
224
  }
225
225
  return {
226
+ adminPasswordEncryptedValue: data.admin_password_encrypted_value,
227
+ adminPasswordEncryptionSshKeyId: data.admin_password_encryption_ssh_key_id,
226
228
  allowedActions: data.allowed_actions,
227
229
  arch: data.arch,
228
230
  bootType: data.boot_type,
@@ -1286,6 +1288,7 @@ const marshalVolumeServerTemplate = (request, defaults) => ({
1286
1288
  volume_type: request.volumeType
1287
1289
  });
1288
1290
  const marshalCreateServerRequest = (request, defaults) => ({
1291
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1289
1292
  boot_type: request.bootType,
1290
1293
  bootscript: request.bootscript,
1291
1294
  commercial_type: request.commercialType,
@@ -1577,6 +1580,7 @@ const marshalServerMaintenance = (request, defaults) => ({
1577
1580
  start_date: request.startDate
1578
1581
  });
1579
1582
  const marshalSetServerRequest = (request, defaults) => ({
1583
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1580
1584
  allowed_actions: request.allowedActions !== void 0 ? request.allowedActions : void 0,
1581
1585
  arch: request.arch,
1582
1586
  boot_type: request.bootType,
@@ -1689,6 +1693,7 @@ const marshalSecurityGroupTemplate = (request, defaults) => ({
1689
1693
  name: request.name
1690
1694
  });
1691
1695
  const marshalUpdateServerRequest = (request, defaults) => ({
1696
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1692
1697
  boot_type: request.bootType,
1693
1698
  bootscript: request.bootscript,
1694
1699
  commercial_type: request.commercialType,
@@ -221,6 +221,8 @@ const unmarshalServer = (data) => {
221
221
  );
222
222
  }
223
223
  return {
224
+ adminPasswordEncryptedValue: data.admin_password_encrypted_value,
225
+ adminPasswordEncryptionSshKeyId: data.admin_password_encryption_ssh_key_id,
224
226
  allowedActions: data.allowed_actions,
225
227
  arch: data.arch,
226
228
  bootType: data.boot_type,
@@ -1284,6 +1286,7 @@ const marshalVolumeServerTemplate = (request, defaults) => ({
1284
1286
  volume_type: request.volumeType
1285
1287
  });
1286
1288
  const marshalCreateServerRequest = (request, defaults) => ({
1289
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1287
1290
  boot_type: request.bootType,
1288
1291
  bootscript: request.bootscript,
1289
1292
  commercial_type: request.commercialType,
@@ -1575,6 +1578,7 @@ const marshalServerMaintenance = (request, defaults) => ({
1575
1578
  start_date: request.startDate
1576
1579
  });
1577
1580
  const marshalSetServerRequest = (request, defaults) => ({
1581
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1578
1582
  allowed_actions: request.allowedActions !== void 0 ? request.allowedActions : void 0,
1579
1583
  arch: request.arch,
1580
1584
  boot_type: request.bootType,
@@ -1687,6 +1691,7 @@ const marshalSecurityGroupTemplate = (request, defaults) => ({
1687
1691
  name: request.name
1688
1692
  });
1689
1693
  const marshalUpdateServerRequest = (request, defaults) => ({
1694
+ admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1690
1695
  boot_type: request.bootType,
1691
1696
  bootscript: request.bootscript,
1692
1697
  commercial_type: request.commercialType,