@scaleway/sdk-block 2.2.0 → 2.2.2
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/api.gen.js +20 -34
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +7 -4
- package/dist/v1/types.gen.d.ts +4 -1
- package/dist/v1alpha1/api.gen.js +19 -34
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/marshalling.gen.js +7 -4
- package/dist/v1alpha1/types.gen.d.ts +0 -1
- package/package.json +2 -2
package/dist/v1/api.gen.js
CHANGED
|
@@ -28,10 +28,7 @@ class API extends API$1 {
|
|
|
28
28
|
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volume-types`,
|
|
29
29
|
urlParams: urlParams(
|
|
30
30
|
["page", request.page],
|
|
31
|
-
[
|
|
32
|
-
"page_size",
|
|
33
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
34
|
-
]
|
|
31
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
35
32
|
)
|
|
36
33
|
},
|
|
37
34
|
unmarshalListVolumeTypesResponse
|
|
@@ -53,13 +50,11 @@ class API extends API$1 {
|
|
|
53
50
|
["order_by", request.orderBy],
|
|
54
51
|
["organization_id", request.organizationId],
|
|
55
52
|
["page", request.page],
|
|
56
|
-
[
|
|
57
|
-
"page_size",
|
|
58
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
59
|
-
],
|
|
53
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
60
54
|
["product_resource_id", request.productResourceId],
|
|
61
55
|
["project_id", request.projectId],
|
|
62
56
|
["tags", request.tags],
|
|
57
|
+
["volume_ids", request.volumeIds],
|
|
63
58
|
["volume_type", request.volumeType]
|
|
64
59
|
)
|
|
65
60
|
},
|
|
@@ -111,9 +106,7 @@ class API extends API$1 {
|
|
|
111
106
|
* @returns A Promise of Volume
|
|
112
107
|
*/
|
|
113
108
|
waitForVolume = (request, options) => waitForResource(
|
|
114
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
115
|
-
!VOLUME_TRANSIENT_STATUSES.includes(res.status)
|
|
116
|
-
)),
|
|
109
|
+
options?.stop ?? ((res) => Promise.resolve(!VOLUME_TRANSIENT_STATUSES.includes(res.status))),
|
|
117
110
|
this.getVolume,
|
|
118
111
|
request,
|
|
119
112
|
options
|
|
@@ -123,10 +116,12 @@ class API extends API$1 {
|
|
|
123
116
|
*
|
|
124
117
|
* @param request - The request {@link DeleteVolumeRequest}
|
|
125
118
|
*/
|
|
126
|
-
deleteVolume = (request) => this.client.fetch(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
deleteVolume = (request) => this.client.fetch(
|
|
120
|
+
{
|
|
121
|
+
method: "DELETE",
|
|
122
|
+
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam("volumeId", request.volumeId)}`
|
|
123
|
+
}
|
|
124
|
+
);
|
|
130
125
|
/**
|
|
131
126
|
* Update a volume. 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).
|
|
132
127
|
You can only resize a volume to a larger size. It is currently not possible to change your Block Storage Class.
|
|
@@ -155,10 +150,7 @@ class API extends API$1 {
|
|
|
155
150
|
["order_by", request.orderBy],
|
|
156
151
|
["organization_id", request.organizationId],
|
|
157
152
|
["page", request.page],
|
|
158
|
-
[
|
|
159
|
-
"page_size",
|
|
160
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
161
|
-
],
|
|
153
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
162
154
|
["project_id", request.projectId],
|
|
163
155
|
["tags", request.tags],
|
|
164
156
|
["volume_id", request.volumeId]
|
|
@@ -194,9 +186,7 @@ class API extends API$1 {
|
|
|
194
186
|
* @returns A Promise of Snapshot
|
|
195
187
|
*/
|
|
196
188
|
waitForSnapshot = (request, options) => waitForResource(
|
|
197
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
198
|
-
!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
|
|
199
|
-
)),
|
|
189
|
+
options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
|
|
200
190
|
this.getSnapshot,
|
|
201
191
|
request,
|
|
202
192
|
options
|
|
@@ -229,10 +219,7 @@ class API extends API$1 {
|
|
|
229
219
|
importSnapshotFromObjectStorage = (request) => this.client.fetch(
|
|
230
220
|
{
|
|
231
221
|
body: JSON.stringify(
|
|
232
|
-
marshalImportSnapshotFromObjectStorageRequest(
|
|
233
|
-
request,
|
|
234
|
-
this.client.settings
|
|
235
|
-
)
|
|
222
|
+
marshalImportSnapshotFromObjectStorageRequest(request, this.client.settings)
|
|
236
223
|
),
|
|
237
224
|
headers: jsonContentHeaders,
|
|
238
225
|
method: "POST",
|
|
@@ -250,10 +237,7 @@ class API extends API$1 {
|
|
|
250
237
|
exportSnapshotToObjectStorage = (request) => this.client.fetch(
|
|
251
238
|
{
|
|
252
239
|
body: JSON.stringify(
|
|
253
|
-
marshalExportSnapshotToObjectStorageRequest(
|
|
254
|
-
request,
|
|
255
|
-
this.client.settings
|
|
256
|
-
)
|
|
240
|
+
marshalExportSnapshotToObjectStorageRequest(request, this.client.settings)
|
|
257
241
|
),
|
|
258
242
|
headers: jsonContentHeaders,
|
|
259
243
|
method: "POST",
|
|
@@ -266,10 +250,12 @@ class API extends API$1 {
|
|
|
266
250
|
*
|
|
267
251
|
* @param request - The request {@link DeleteSnapshotRequest}
|
|
268
252
|
*/
|
|
269
|
-
deleteSnapshot = (request) => this.client.fetch(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
253
|
+
deleteSnapshot = (request) => this.client.fetch(
|
|
254
|
+
{
|
|
255
|
+
method: "DELETE",
|
|
256
|
+
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
257
|
+
}
|
|
258
|
+
);
|
|
273
259
|
/**
|
|
274
260
|
* Update a snapshot. Update the name or tags of the snapshot.
|
|
275
261
|
*
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
1
|
+
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
4
|
export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen.js';
|
|
@@ -153,12 +153,15 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
param: "from_snapshot",
|
|
156
|
-
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
157
|
-
request.fromSnapshot
|
|
158
|
-
) : void 0
|
|
156
|
+
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(request.fromSnapshot) : void 0
|
|
159
157
|
}
|
|
160
158
|
]),
|
|
161
|
-
...resolveOneOf([
|
|
159
|
+
...resolveOneOf([
|
|
160
|
+
{
|
|
161
|
+
param: "perf_iops",
|
|
162
|
+
value: request.perfIops
|
|
163
|
+
}
|
|
164
|
+
])
|
|
162
165
|
});
|
|
163
166
|
const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
164
167
|
bucket: request.bucket,
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -470,6 +470,10 @@ export type ListVolumesRequest = {
|
|
|
470
470
|
* Filter by volume type.
|
|
471
471
|
*/
|
|
472
472
|
volumeType?: string;
|
|
473
|
+
/**
|
|
474
|
+
* Filter by volume IDs.
|
|
475
|
+
*/
|
|
476
|
+
volumeIds?: string[];
|
|
473
477
|
};
|
|
474
478
|
export interface ListVolumesResponse {
|
|
475
479
|
/**
|
|
@@ -514,7 +518,6 @@ export type UpdateVolumeRequest = {
|
|
|
514
518
|
name?: string;
|
|
515
519
|
/**
|
|
516
520
|
* Size in bytes of the volume, with a granularity of 1 GB (10^9 bytes).
|
|
517
|
-
Must be compliant with the minimum (1GB) and maximum (10TB) allowed size.
|
|
518
521
|
*/
|
|
519
522
|
size?: number;
|
|
520
523
|
/**
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -28,10 +28,7 @@ class API extends API$1 {
|
|
|
28
28
|
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volume-types`,
|
|
29
29
|
urlParams: urlParams(
|
|
30
30
|
["page", request.page],
|
|
31
|
-
[
|
|
32
|
-
"page_size",
|
|
33
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
34
|
-
]
|
|
31
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
35
32
|
)
|
|
36
33
|
},
|
|
37
34
|
unmarshalListVolumeTypesResponse
|
|
@@ -52,10 +49,7 @@ class API extends API$1 {
|
|
|
52
49
|
["order_by", request.orderBy],
|
|
53
50
|
["organization_id", request.organizationId],
|
|
54
51
|
["page", request.page],
|
|
55
|
-
[
|
|
56
|
-
"page_size",
|
|
57
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
58
|
-
],
|
|
52
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
59
53
|
["product_resource_id", request.productResourceId],
|
|
60
54
|
["project_id", request.projectId],
|
|
61
55
|
["tags", request.tags]
|
|
@@ -109,9 +103,7 @@ class API extends API$1 {
|
|
|
109
103
|
* @returns A Promise of Volume
|
|
110
104
|
*/
|
|
111
105
|
waitForVolume = (request, options) => waitForResource(
|
|
112
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
113
|
-
!VOLUME_TRANSIENT_STATUSES.includes(res.status)
|
|
114
|
-
)),
|
|
106
|
+
options?.stop ?? ((res) => Promise.resolve(!VOLUME_TRANSIENT_STATUSES.includes(res.status))),
|
|
115
107
|
this.getVolume,
|
|
116
108
|
request,
|
|
117
109
|
options
|
|
@@ -121,10 +113,12 @@ class API extends API$1 {
|
|
|
121
113
|
*
|
|
122
114
|
* @param request - The request {@link DeleteVolumeRequest}
|
|
123
115
|
*/
|
|
124
|
-
deleteVolume = (request) => this.client.fetch(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
deleteVolume = (request) => this.client.fetch(
|
|
117
|
+
{
|
|
118
|
+
method: "DELETE",
|
|
119
|
+
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam("volumeId", request.volumeId)}`
|
|
120
|
+
}
|
|
121
|
+
);
|
|
128
122
|
/**
|
|
129
123
|
* Update a volume. 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).
|
|
130
124
|
You can only resize a volume to a larger size. It is currently not possible to change your Block Storage Class.
|
|
@@ -152,10 +146,7 @@ class API extends API$1 {
|
|
|
152
146
|
["order_by", request.orderBy],
|
|
153
147
|
["organization_id", request.organizationId],
|
|
154
148
|
["page", request.page],
|
|
155
|
-
[
|
|
156
|
-
"page_size",
|
|
157
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
158
|
-
],
|
|
149
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
159
150
|
["project_id", request.projectId],
|
|
160
151
|
["tags", request.tags],
|
|
161
152
|
["volume_id", request.volumeId]
|
|
@@ -191,9 +182,7 @@ class API extends API$1 {
|
|
|
191
182
|
* @returns A Promise of Snapshot
|
|
192
183
|
*/
|
|
193
184
|
waitForSnapshot = (request, options) => waitForResource(
|
|
194
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
195
|
-
!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
|
|
196
|
-
)),
|
|
185
|
+
options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
|
|
197
186
|
this.getSnapshot,
|
|
198
187
|
request,
|
|
199
188
|
options
|
|
@@ -246,10 +235,7 @@ class API extends API$1 {
|
|
|
246
235
|
importSnapshotFromObjectStorage = (request) => this.client.fetch(
|
|
247
236
|
{
|
|
248
237
|
body: JSON.stringify(
|
|
249
|
-
marshalImportSnapshotFromObjectStorageRequest(
|
|
250
|
-
request,
|
|
251
|
-
this.client.settings
|
|
252
|
-
)
|
|
238
|
+
marshalImportSnapshotFromObjectStorageRequest(request, this.client.settings)
|
|
253
239
|
),
|
|
254
240
|
headers: jsonContentHeaders,
|
|
255
241
|
method: "POST",
|
|
@@ -267,10 +253,7 @@ class API extends API$1 {
|
|
|
267
253
|
exportSnapshotToObjectStorage = (request) => this.client.fetch(
|
|
268
254
|
{
|
|
269
255
|
body: JSON.stringify(
|
|
270
|
-
marshalExportSnapshotToObjectStorageRequest(
|
|
271
|
-
request,
|
|
272
|
-
this.client.settings
|
|
273
|
-
)
|
|
256
|
+
marshalExportSnapshotToObjectStorageRequest(request, this.client.settings)
|
|
274
257
|
),
|
|
275
258
|
headers: jsonContentHeaders,
|
|
276
259
|
method: "POST",
|
|
@@ -283,10 +266,12 @@ class API extends API$1 {
|
|
|
283
266
|
*
|
|
284
267
|
* @param request - The request {@link DeleteSnapshotRequest}
|
|
285
268
|
*/
|
|
286
|
-
deleteSnapshot = (request) => this.client.fetch(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
269
|
+
deleteSnapshot = (request) => this.client.fetch(
|
|
270
|
+
{
|
|
271
|
+
method: "DELETE",
|
|
272
|
+
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
273
|
+
}
|
|
274
|
+
);
|
|
290
275
|
/**
|
|
291
276
|
* Update a snapshot. Update the name or tags of the snapshot.
|
|
292
277
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
1
|
+
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
4
|
export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen.js';
|
|
@@ -153,12 +153,15 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
param: "from_snapshot",
|
|
156
|
-
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
157
|
-
request.fromSnapshot
|
|
158
|
-
) : void 0
|
|
156
|
+
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(request.fromSnapshot) : void 0
|
|
159
157
|
}
|
|
160
158
|
]),
|
|
161
|
-
...resolveOneOf([
|
|
159
|
+
...resolveOneOf([
|
|
160
|
+
{
|
|
161
|
+
param: "perf_iops",
|
|
162
|
+
value: request.perfIops
|
|
163
|
+
}
|
|
164
|
+
])
|
|
162
165
|
});
|
|
163
166
|
const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
164
167
|
bucket: request.bucket,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-block",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Scaleway SDK block",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@scaleway/random-name": "5.1.2",
|
|
30
|
-
"@scaleway/sdk-std": "2.1.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|