@scaleway/sdk 1.2.0 → 1.5.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/api/account/index.js +0 -2
- package/dist/api/account/v2/api.gen.js +16 -6
- package/dist/api/applesilicon/v1alpha1/api.gen.js +31 -13
- package/dist/api/baremetal/index.js +2 -2
- package/dist/api/baremetal/v1/api.gen.js +59 -45
- package/dist/api/billing/index.js +2 -0
- package/dist/api/billing/v2alpha1/api.gen.js +52 -0
- package/dist/api/billing/v2alpha1/index.gen.js +3 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +52 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +36 -23
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +2 -1
- package/dist/api/container/v1beta1/api.gen.js +34 -27
- package/dist/api/domain/v2beta1/api.gen.js +89 -78
- package/dist/api/flexibleip/v1alpha1/api.gen.js +18 -11
- package/dist/api/function/v1beta1/api.gen.js +39 -30
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/iam/v1alpha1/api.gen.js +147 -39
- package/dist/api/instance/index.js +2 -2
- package/dist/api/instance/v1/api.gen.js +72 -61
- package/dist/api/iot/v1/api.gen.js +37 -37
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +65 -46
- package/dist/api/k8s/v1/marshalling.gen.js +6 -1
- package/dist/api/lb/index.js +2 -2
- package/dist/api/lb/v1/api.gen.js +231 -110
- package/dist/api/lb/v1/marshalling.gen.js +2 -2
- package/dist/api/marketplace/v1/api.gen.js +2 -2
- package/dist/api/marketplace/v2/api.gen.js +3 -3
- package/dist/api/mnq/v1alpha1/api.gen.js +11 -10
- package/dist/api/rdb/v1/api.gen.js +195 -63
- package/dist/api/rdb/v1/marshalling.gen.js +16 -2
- package/dist/api/redis/v1/api.gen.js +88 -25
- package/dist/api/registry/v1/api.gen.js +15 -13
- package/dist/api/secret/v1alpha1/api.gen.js +43 -18
- package/dist/api/tem/v1alpha1/api.gen.js +26 -14
- package/dist/api/tem/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/test/v1/api.gen.js +11 -10
- package/dist/api/vpc/v1/api.gen.js +5 -5
- package/dist/api/vpcgw/v1/api.gen.js +130 -41
- package/dist/api/vpcgw/v1/marshalling.gen.js +18 -15
- package/dist/api/webhosting/v1alpha1/api.gen.js +10 -9
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +3 -1
- package/dist/helpers/is-response.js +10 -0
- package/dist/index.cjs +1598 -928
- package/dist/index.d.ts +3970 -2960
- package/dist/index.js +44 -42
- package/dist/scw/constants.js +1 -1
- package/dist/scw/fetch/response-parser.js +2 -1
- package/package.json +2 -2
- package/dist/api/account/v2alpha1/api.gen.js +0 -85
- package/dist/api/account/v2alpha1/index.js +0 -1
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -57
|
@@ -13,7 +13,7 @@ const jsonContentHeaders = {
|
|
|
13
13
|
/**
|
|
14
14
|
* IoT API.
|
|
15
15
|
*
|
|
16
|
-
* This API allows you to manage IoT hubs and devices.
|
|
16
|
+
* This API allows you to manage IoT hubs and devices. IoT API.
|
|
17
17
|
*/
|
|
18
18
|
class API extends API$1 {
|
|
19
19
|
constructor() {
|
|
@@ -31,7 +31,7 @@ class API extends API$1 {
|
|
|
31
31
|
}, unmarshalListHubsResponse);
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* List hubs
|
|
34
|
+
* List hubs.
|
|
35
35
|
*
|
|
36
36
|
* @param request - The request {@link ListHubsRequest}
|
|
37
37
|
* @returns A Promise of ListHubsResponse
|
|
@@ -43,7 +43,7 @@ class API extends API$1 {
|
|
|
43
43
|
return enrichForPagination('hubs', _this.pageOfListHubs, request);
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
* Create a hub
|
|
46
|
+
* Create a hub.
|
|
47
47
|
*
|
|
48
48
|
* @param request - The request {@link CreateHubRequest}
|
|
49
49
|
* @returns A Promise of Hub
|
|
@@ -55,7 +55,7 @@ class API extends API$1 {
|
|
|
55
55
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs`
|
|
56
56
|
}, unmarshalHub);
|
|
57
57
|
/**
|
|
58
|
-
* Get a hub
|
|
58
|
+
* Get a hub.
|
|
59
59
|
*
|
|
60
60
|
* @param request - The request {@link GetHubRequest}
|
|
61
61
|
* @returns A Promise of Hub
|
|
@@ -73,7 +73,7 @@ class API extends API$1 {
|
|
|
73
73
|
*/
|
|
74
74
|
this.waitForHub = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!HUB_TRANSIENT_STATUSES.includes(res.status))), this.getHub, request, options);
|
|
75
75
|
/**
|
|
76
|
-
* Update a hub
|
|
76
|
+
* Update a hub.
|
|
77
77
|
*
|
|
78
78
|
* @param request - The request {@link UpdateHubRequest}
|
|
79
79
|
* @returns A Promise of Hub
|
|
@@ -85,7 +85,7 @@ class API extends API$1 {
|
|
|
85
85
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}`
|
|
86
86
|
}, unmarshalHub);
|
|
87
87
|
/**
|
|
88
|
-
* Enable a hub
|
|
88
|
+
* Enable a hub.
|
|
89
89
|
*
|
|
90
90
|
* @param request - The request {@link EnableHubRequest}
|
|
91
91
|
* @returns A Promise of Hub
|
|
@@ -97,7 +97,7 @@ class API extends API$1 {
|
|
|
97
97
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/enable`
|
|
98
98
|
}, unmarshalHub);
|
|
99
99
|
/**
|
|
100
|
-
* Disable a hub
|
|
100
|
+
* Disable a hub.
|
|
101
101
|
*
|
|
102
102
|
* @param request - The request {@link DisableHubRequest}
|
|
103
103
|
* @returns A Promise of Hub
|
|
@@ -109,7 +109,7 @@ class API extends API$1 {
|
|
|
109
109
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/disable`
|
|
110
110
|
}, unmarshalHub);
|
|
111
111
|
/**
|
|
112
|
-
* Delete a hub
|
|
112
|
+
* Delete a hub.
|
|
113
113
|
*
|
|
114
114
|
* @param request - The request {@link DeleteHubRequest}
|
|
115
115
|
*/
|
|
@@ -119,7 +119,7 @@ class API extends API$1 {
|
|
|
119
119
|
urlParams: urlParams(['delete_devices', request.deleteDevices])
|
|
120
120
|
});
|
|
121
121
|
/**
|
|
122
|
-
* Get a hub's metrics
|
|
122
|
+
* Get a hub's metrics.
|
|
123
123
|
*
|
|
124
124
|
* @deprecated
|
|
125
125
|
* @param request - The request {@link GetHubMetricsRequest}
|
|
@@ -131,7 +131,7 @@ class API extends API$1 {
|
|
|
131
131
|
urlParams: urlParams(['start_date', request.startDate])
|
|
132
132
|
}, unmarshalGetHubMetricsResponse);
|
|
133
133
|
/**
|
|
134
|
-
* Set the certificate authority of a hub
|
|
134
|
+
* Set the certificate authority of a hub.
|
|
135
135
|
*
|
|
136
136
|
* @param request - The request {@link SetHubCARequest}
|
|
137
137
|
* @returns A Promise of Hub
|
|
@@ -143,7 +143,7 @@ class API extends API$1 {
|
|
|
143
143
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/ca`
|
|
144
144
|
}, unmarshalHub);
|
|
145
145
|
/**
|
|
146
|
-
* Get the certificate authority of a hub
|
|
146
|
+
* Get the certificate authority of a hub.
|
|
147
147
|
*
|
|
148
148
|
* @param request - The request {@link GetHubCARequest}
|
|
149
149
|
* @returns A Promise of GetHubCAResponse
|
|
@@ -163,7 +163,7 @@ class API extends API$1 {
|
|
|
163
163
|
}, unmarshalListDevicesResponse);
|
|
164
164
|
};
|
|
165
165
|
/**
|
|
166
|
-
* List devices
|
|
166
|
+
* List devices.
|
|
167
167
|
*
|
|
168
168
|
* @param request - The request {@link ListDevicesRequest}
|
|
169
169
|
* @returns A Promise of ListDevicesResponse
|
|
@@ -175,7 +175,7 @@ class API extends API$1 {
|
|
|
175
175
|
return enrichForPagination('devices', _this.pageOfListDevices, request);
|
|
176
176
|
};
|
|
177
177
|
/**
|
|
178
|
-
* Add a device
|
|
178
|
+
* Add a device.
|
|
179
179
|
*
|
|
180
180
|
* @param request - The request {@link CreateDeviceRequest}
|
|
181
181
|
* @returns A Promise of CreateDeviceResponse
|
|
@@ -187,7 +187,7 @@ class API extends API$1 {
|
|
|
187
187
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices`
|
|
188
188
|
}, unmarshalCreateDeviceResponse);
|
|
189
189
|
/**
|
|
190
|
-
* Get a device
|
|
190
|
+
* Get a device.
|
|
191
191
|
*
|
|
192
192
|
* @param request - The request {@link GetDeviceRequest}
|
|
193
193
|
* @returns A Promise of Device
|
|
@@ -197,7 +197,7 @@ class API extends API$1 {
|
|
|
197
197
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
198
198
|
}, unmarshalDevice);
|
|
199
199
|
/**
|
|
200
|
-
* Update a device
|
|
200
|
+
* Update a device.
|
|
201
201
|
*
|
|
202
202
|
* @param request - The request {@link UpdateDeviceRequest}
|
|
203
203
|
* @returns A Promise of Device
|
|
@@ -209,7 +209,7 @@ class API extends API$1 {
|
|
|
209
209
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
210
210
|
}, unmarshalDevice);
|
|
211
211
|
/**
|
|
212
|
-
* Enable a device
|
|
212
|
+
* Enable a device.
|
|
213
213
|
*
|
|
214
214
|
* @param request - The request {@link EnableDeviceRequest}
|
|
215
215
|
* @returns A Promise of Device
|
|
@@ -221,7 +221,7 @@ class API extends API$1 {
|
|
|
221
221
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/enable`
|
|
222
222
|
}, unmarshalDevice);
|
|
223
223
|
/**
|
|
224
|
-
* Disable a device
|
|
224
|
+
* Disable a device.
|
|
225
225
|
*
|
|
226
226
|
* @param request - The request {@link DisableDeviceRequest}
|
|
227
227
|
* @returns A Promise of Device
|
|
@@ -233,7 +233,7 @@ class API extends API$1 {
|
|
|
233
233
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/disable`
|
|
234
234
|
}, unmarshalDevice);
|
|
235
235
|
/**
|
|
236
|
-
* Renew a device certificate
|
|
236
|
+
* Renew a device certificate.
|
|
237
237
|
*
|
|
238
238
|
* @param request - The request {@link RenewDeviceCertificateRequest}
|
|
239
239
|
* @returns A Promise of RenewDeviceCertificateResponse
|
|
@@ -245,7 +245,7 @@ class API extends API$1 {
|
|
|
245
245
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/renew-certificate`
|
|
246
246
|
}, unmarshalRenewDeviceCertificateResponse);
|
|
247
247
|
/**
|
|
248
|
-
* Set a custom certificate on a device
|
|
248
|
+
* Set a custom certificate on a device.
|
|
249
249
|
*
|
|
250
250
|
* @param request - The request {@link SetDeviceCertificateRequest}
|
|
251
251
|
* @returns A Promise of SetDeviceCertificateResponse
|
|
@@ -257,7 +257,7 @@ class API extends API$1 {
|
|
|
257
257
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/certificate`
|
|
258
258
|
}, unmarshalSetDeviceCertificateResponse);
|
|
259
259
|
/**
|
|
260
|
-
* Get a device's certificate
|
|
260
|
+
* Get a device's certificate.
|
|
261
261
|
*
|
|
262
262
|
* @param request - The request {@link GetDeviceCertificateRequest}
|
|
263
263
|
* @returns A Promise of GetDeviceCertificateResponse
|
|
@@ -267,7 +267,7 @@ class API extends API$1 {
|
|
|
267
267
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/certificate`
|
|
268
268
|
}, unmarshalGetDeviceCertificateResponse);
|
|
269
269
|
/**
|
|
270
|
-
* Remove a device
|
|
270
|
+
* Remove a device.
|
|
271
271
|
*
|
|
272
272
|
* @param request - The request {@link DeleteDeviceRequest}
|
|
273
273
|
*/
|
|
@@ -276,7 +276,7 @@ class API extends API$1 {
|
|
|
276
276
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
277
277
|
});
|
|
278
278
|
/**
|
|
279
|
-
* Get a device's metrics
|
|
279
|
+
* Get a device's metrics.
|
|
280
280
|
*
|
|
281
281
|
* @deprecated
|
|
282
282
|
* @param request - The request {@link GetDeviceMetricsRequest}
|
|
@@ -298,7 +298,7 @@ class API extends API$1 {
|
|
|
298
298
|
}, unmarshalListRoutesResponse);
|
|
299
299
|
};
|
|
300
300
|
/**
|
|
301
|
-
* List routes
|
|
301
|
+
* List routes.
|
|
302
302
|
*
|
|
303
303
|
* @param request - The request {@link ListRoutesRequest}
|
|
304
304
|
* @returns A Promise of ListRoutesResponse
|
|
@@ -310,7 +310,7 @@ class API extends API$1 {
|
|
|
310
310
|
return enrichForPagination('routes', _this.pageOfListRoutes, request);
|
|
311
311
|
};
|
|
312
312
|
/**
|
|
313
|
-
* Multiple route kinds can be created:
|
|
313
|
+
* Create a route. Multiple route kinds can be created:
|
|
314
314
|
*
|
|
315
315
|
* - Database Route. Create a route that will record subscribed MQTT messages
|
|
316
316
|
* into your database. <b>You need to manage the database by yourself</b>.
|
|
@@ -331,7 +331,7 @@ class API extends API$1 {
|
|
|
331
331
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
332
332
|
}, unmarshalRoute);
|
|
333
333
|
/**
|
|
334
|
-
* Update a route
|
|
334
|
+
* Update a route.
|
|
335
335
|
*
|
|
336
336
|
* @param request - The request {@link UpdateRouteRequest}
|
|
337
337
|
* @returns A Promise of Route
|
|
@@ -343,7 +343,7 @@ class API extends API$1 {
|
|
|
343
343
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
344
344
|
}, unmarshalRoute);
|
|
345
345
|
/**
|
|
346
|
-
* Get a route
|
|
346
|
+
* Get a route.
|
|
347
347
|
*
|
|
348
348
|
* @param request - The request {@link GetRouteRequest}
|
|
349
349
|
* @returns A Promise of Route
|
|
@@ -353,7 +353,7 @@ class API extends API$1 {
|
|
|
353
353
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
354
354
|
}, unmarshalRoute);
|
|
355
355
|
/**
|
|
356
|
-
* Delete a route
|
|
356
|
+
* Delete a route.
|
|
357
357
|
*
|
|
358
358
|
* @param request - The request {@link DeleteRouteRequest}
|
|
359
359
|
*/
|
|
@@ -372,7 +372,7 @@ class API extends API$1 {
|
|
|
372
372
|
}, unmarshalListNetworksResponse);
|
|
373
373
|
};
|
|
374
374
|
/**
|
|
375
|
-
* List the Networks
|
|
375
|
+
* List the Networks.
|
|
376
376
|
*
|
|
377
377
|
* @param request - The request {@link ListNetworksRequest}
|
|
378
378
|
* @returns A Promise of ListNetworksResponse
|
|
@@ -384,7 +384,7 @@ class API extends API$1 {
|
|
|
384
384
|
return enrichForPagination('networks', _this.pageOfListNetworks, request);
|
|
385
385
|
};
|
|
386
386
|
/**
|
|
387
|
-
* Create a new Network
|
|
387
|
+
* Create a new Network.
|
|
388
388
|
*
|
|
389
389
|
* @param request - The request {@link CreateNetworkRequest}
|
|
390
390
|
* @returns A Promise of CreateNetworkResponse
|
|
@@ -396,7 +396,7 @@ class API extends API$1 {
|
|
|
396
396
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks`
|
|
397
397
|
}, unmarshalCreateNetworkResponse);
|
|
398
398
|
/**
|
|
399
|
-
* Retrieve a specific Network
|
|
399
|
+
* Retrieve a specific Network.
|
|
400
400
|
*
|
|
401
401
|
* @param request - The request {@link GetNetworkRequest}
|
|
402
402
|
* @returns A Promise of Network
|
|
@@ -406,7 +406,7 @@ class API extends API$1 {
|
|
|
406
406
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks/${validatePathParam('networkId', request.networkId)}`
|
|
407
407
|
}, unmarshalNetwork);
|
|
408
408
|
/**
|
|
409
|
-
* Delete a Network
|
|
409
|
+
* Delete a Network.
|
|
410
410
|
*
|
|
411
411
|
* @param request - The request {@link DeleteNetworkRequest}
|
|
412
412
|
*/
|
|
@@ -415,7 +415,7 @@ class API extends API$1 {
|
|
|
415
415
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks/${validatePathParam('networkId', request.networkId)}`
|
|
416
416
|
});
|
|
417
417
|
/**
|
|
418
|
-
* BETA - Get a Cloud Twin Document
|
|
418
|
+
* BETA - Get a Cloud Twin Document.
|
|
419
419
|
*
|
|
420
420
|
* @param request - The request {@link GetTwinDocumentRequest}
|
|
421
421
|
* @returns A Promise of TwinDocument
|
|
@@ -425,7 +425,7 @@ class API extends API$1 {
|
|
|
425
425
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
426
426
|
}, unmarshalTwinDocument);
|
|
427
427
|
/**
|
|
428
|
-
* BETA - Update a Cloud Twin Document
|
|
428
|
+
* BETA - Update a Cloud Twin Document.
|
|
429
429
|
*
|
|
430
430
|
* @param request - The request {@link PutTwinDocumentRequest}
|
|
431
431
|
* @returns A Promise of TwinDocument
|
|
@@ -437,7 +437,7 @@ class API extends API$1 {
|
|
|
437
437
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
438
438
|
}, unmarshalTwinDocument);
|
|
439
439
|
/**
|
|
440
|
-
* BETA - Patch a Cloud Twin Document
|
|
440
|
+
* BETA - Patch a Cloud Twin Document.
|
|
441
441
|
*
|
|
442
442
|
* @param request - The request {@link PatchTwinDocumentRequest}
|
|
443
443
|
* @returns A Promise of TwinDocument
|
|
@@ -449,7 +449,7 @@ class API extends API$1 {
|
|
|
449
449
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
450
450
|
}, unmarshalTwinDocument);
|
|
451
451
|
/**
|
|
452
|
-
* BETA - Delete a Cloud Twin Document
|
|
452
|
+
* BETA - Delete a Cloud Twin Document.
|
|
453
453
|
*
|
|
454
454
|
* @param request - The request {@link DeleteTwinDocumentRequest}
|
|
455
455
|
*/
|
|
@@ -458,7 +458,7 @@ class API extends API$1 {
|
|
|
458
458
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
459
459
|
});
|
|
460
460
|
/**
|
|
461
|
-
* BETA - List the documents of a Cloud Twin
|
|
461
|
+
* BETA - List the documents of a Cloud Twin.
|
|
462
462
|
*
|
|
463
463
|
* @param request - The request {@link ListTwinDocumentsRequest}
|
|
464
464
|
* @returns A Promise of ListTwinDocumentsResponse
|
|
@@ -468,7 +468,7 @@ class API extends API$1 {
|
|
|
468
468
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}`
|
|
469
469
|
}, unmarshalListTwinDocumentsResponse);
|
|
470
470
|
/**
|
|
471
|
-
* BETA - Delete all the documents of a Cloud Twin
|
|
471
|
+
* BETA - Delete all the documents of a Cloud Twin.
|
|
472
472
|
*
|
|
473
473
|
* @param request - The request {@link DeleteTwinDocumentsRequest}
|
|
474
474
|
*/
|
package/dist/api/k8s/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as index
|
|
2
|
-
export { index
|
|
1
|
+
import * as index from './v1/index.js';
|
|
2
|
+
export { index as v1 };
|
|
@@ -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 { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion } from './marshalling.gen.js';
|
|
6
|
+
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
const jsonContentHeaders = {
|
|
@@ -27,8 +27,8 @@ class API extends API$1 {
|
|
|
27
27
|
}, unmarshalListClustersResponse);
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
30
|
+
* List all clusters. List all the existing Kubernetes clusters in a specific
|
|
31
|
+
* Region.
|
|
32
32
|
*
|
|
33
33
|
* @param request - The request {@link ListClustersRequest}
|
|
34
34
|
* @returns A Promise of ListClustersResponse
|
|
@@ -40,7 +40,8 @@ class API extends API$1 {
|
|
|
40
40
|
return enrichForPagination('clusters', _this.pageOfListClusters, request);
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Create a new cluster. Create a new Kubernetes cluster on a Scaleway
|
|
44
|
+
* account.
|
|
44
45
|
*
|
|
45
46
|
* @param request - The request {@link CreateClusterRequest}
|
|
46
47
|
* @returns A Promise of Cluster
|
|
@@ -52,7 +53,8 @@ class API extends API$1 {
|
|
|
52
53
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters`
|
|
53
54
|
}, unmarshalCluster);
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
+
* Get specific cluster information. Get details about a specific Kubernetes
|
|
57
|
+
* cluster.
|
|
56
58
|
*
|
|
57
59
|
* @param request - The request {@link GetClusterRequest}
|
|
58
60
|
* @returns A Promise of Cluster
|
|
@@ -70,8 +72,10 @@ class API extends API$1 {
|
|
|
70
72
|
*/
|
|
71
73
|
this.waitForCluster = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
|
|
72
74
|
/**
|
|
73
|
-
*
|
|
74
|
-
* method is
|
|
75
|
+
* Update a cluster. Update a specific Kubernetes cluster. Note that this
|
|
76
|
+
* method is designed to update details such as name, description, tags and
|
|
77
|
+
* configuration. However, you cannot upgrade a cluster with this method. To
|
|
78
|
+
* do so, use the dedicated endpoint.
|
|
75
79
|
*
|
|
76
80
|
* @param request - The request {@link UpdateClusterRequest}
|
|
77
81
|
* @returns A Promise of Cluster
|
|
@@ -83,9 +87,9 @@ class API extends API$1 {
|
|
|
83
87
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}`
|
|
84
88
|
}, unmarshalCluster);
|
|
85
89
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
90
|
+
* Delete a cluster. Delete a specific cluster and all its associated pools
|
|
91
|
+
* and nodes. Note that this method will not delete any Load Balancers or
|
|
92
|
+
* Block Volumes that are associated with the cluster.
|
|
89
93
|
*
|
|
90
94
|
* @param request - The request {@link DeleteClusterRequest}
|
|
91
95
|
* @returns A Promise of Cluster
|
|
@@ -96,7 +100,7 @@ class API extends API$1 {
|
|
|
96
100
|
urlParams: urlParams(['with_additional_resources', request.withAdditionalResources])
|
|
97
101
|
}, unmarshalCluster);
|
|
98
102
|
/**
|
|
99
|
-
*
|
|
103
|
+
* Upgrade a cluster. Upgrade a specific Kubernetes cluster and/or its
|
|
100
104
|
* associated pools to a specific and supported Kubernetes version.
|
|
101
105
|
*
|
|
102
106
|
* @param request - The request {@link UpgradeClusterRequest}
|
|
@@ -109,10 +113,23 @@ class API extends API$1 {
|
|
|
109
113
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/upgrade`
|
|
110
114
|
}, unmarshalCluster);
|
|
111
115
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
+
* Change type of a cluster. Change type of a specific Kubernetes cluster.
|
|
117
|
+
*
|
|
118
|
+
* @param request - The request {@link SetClusterTypeRequest}
|
|
119
|
+
* @returns A Promise of Cluster
|
|
120
|
+
*/
|
|
121
|
+
this.setClusterType = request => this.client.fetch({
|
|
122
|
+
body: JSON.stringify(marshalSetClusterTypeRequest(request, this.client.settings)),
|
|
123
|
+
headers: jsonContentHeaders,
|
|
124
|
+
method: 'POST',
|
|
125
|
+
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/set-type`
|
|
126
|
+
}, unmarshalCluster);
|
|
127
|
+
/**
|
|
128
|
+
* List available versions for a cluster. List the versions that a specific
|
|
129
|
+
* Kubernetes cluster is allowed to upgrade to. Results will comprise every
|
|
130
|
+
* patch version greater than the current patch, as well as one minor version
|
|
131
|
+
* ahead of the current version. Any upgrade skipping a minor version will not
|
|
132
|
+
* work.
|
|
116
133
|
*
|
|
117
134
|
* @param request - The request {@link ListClusterAvailableVersionsRequest}
|
|
118
135
|
* @returns A Promise of ListClusterAvailableVersionsResponse
|
|
@@ -128,11 +145,10 @@ class API extends API$1 {
|
|
|
128
145
|
responseType: 'blob'
|
|
129
146
|
});
|
|
130
147
|
/**
|
|
131
|
-
*
|
|
132
|
-
* cluster. This will invalidate the old admin token (which will
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* token was used).
|
|
148
|
+
* Reset the admin token of a cluster. Reset the admin token for a specific
|
|
149
|
+
* Kubernetes cluster. This will invalidate the old admin token (which will
|
|
150
|
+
* not be usable afterwards) and create a new one. Note that you will need to
|
|
151
|
+
* redownload kubeconfig in order to keep interacting with the cluster.
|
|
136
152
|
*
|
|
137
153
|
* @param request - The request {@link ResetClusterAdminTokenRequest}
|
|
138
154
|
*/
|
|
@@ -148,15 +164,16 @@ class API extends API$1 {
|
|
|
148
164
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['status', request.status ?? 'unknown'])
|
|
149
165
|
}, unmarshalListPoolsResponse);
|
|
150
166
|
/**
|
|
151
|
-
*
|
|
152
|
-
* cluster.
|
|
167
|
+
* List all the pools in a cluster. List all the existing pools for a specific
|
|
168
|
+
* Kubernetes cluster.
|
|
153
169
|
*
|
|
154
170
|
* @param request - The request {@link ListPoolsRequest}
|
|
155
171
|
* @returns A Promise of ListPoolsResponse
|
|
156
172
|
*/
|
|
157
173
|
this.listPools = request => enrichForPagination('pools', this.pageOfListPools, request);
|
|
158
174
|
/**
|
|
159
|
-
*
|
|
175
|
+
* Create a new pool in a cluster. Create a new pool in a specific Kubernetes
|
|
176
|
+
* cluster.
|
|
160
177
|
*
|
|
161
178
|
* @param request - The request {@link CreatePoolRequest}
|
|
162
179
|
* @returns A Promise of Pool
|
|
@@ -168,7 +185,8 @@ class API extends API$1 {
|
|
|
168
185
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/pools`
|
|
169
186
|
}, unmarshalPool);
|
|
170
187
|
/**
|
|
171
|
-
*
|
|
188
|
+
* Get a pool in a cluster. Get details about a specific pool in a Kubernetes
|
|
189
|
+
* cluster.
|
|
172
190
|
*
|
|
173
191
|
* @param request - The request {@link GetPoolRequest}
|
|
174
192
|
* @returns A Promise of Pool
|
|
@@ -186,9 +204,9 @@ class API extends API$1 {
|
|
|
186
204
|
*/
|
|
187
205
|
this.waitForPool = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!POOL_TRANSIENT_STATUSES.includes(res.status))), this.getPool, request, options);
|
|
188
206
|
/**
|
|
189
|
-
*
|
|
190
|
-
* Note that this will work when the targeted version is the same than
|
|
191
|
-
* version of the cluster.
|
|
207
|
+
* Upgrade a pool in a cluster. Upgrade the Kubernetes version of a specific
|
|
208
|
+
* pool. Note that this will work when the targeted version is the same than
|
|
209
|
+
* the version of the cluster.
|
|
192
210
|
*
|
|
193
211
|
* @param request - The request {@link UpgradePoolRequest}
|
|
194
212
|
* @returns A Promise of Pool
|
|
@@ -200,8 +218,8 @@ class API extends API$1 {
|
|
|
200
218
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}/upgrade`
|
|
201
219
|
}, unmarshalPool);
|
|
202
220
|
/**
|
|
203
|
-
*
|
|
204
|
-
* size,
|
|
221
|
+
* Update a pool in a cluster. Update attributes of a specific pool, such as
|
|
222
|
+
* size, autoscaling settings, and tags.
|
|
205
223
|
*
|
|
206
224
|
* @param request - The request {@link UpdatePoolRequest}
|
|
207
225
|
* @returns A Promise of Pool
|
|
@@ -213,8 +231,8 @@ class API extends API$1 {
|
|
|
213
231
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}`
|
|
214
232
|
}, unmarshalPool);
|
|
215
233
|
/**
|
|
216
|
-
*
|
|
217
|
-
* the nodes
|
|
234
|
+
* Delete a pool in a cluster. Delete a specific pool from a cluster. All of
|
|
235
|
+
* the pool's nodes will also be deleted.
|
|
218
236
|
*
|
|
219
237
|
* @param request - The request {@link DeletePoolRequest}
|
|
220
238
|
* @returns A Promise of Pool
|
|
@@ -224,8 +242,9 @@ class API extends API$1 {
|
|
|
224
242
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}`
|
|
225
243
|
}, unmarshalPool);
|
|
226
244
|
/**
|
|
227
|
-
*
|
|
228
|
-
* directly called by end users,
|
|
245
|
+
* Create a Kosmos node. Get metadata about a Kosmos node. This method is not
|
|
246
|
+
* intended to be directly called by end users, only by the
|
|
247
|
+
* kapsule-node-agent.
|
|
229
248
|
*
|
|
230
249
|
* @param request - The request {@link CreateExternalNodeRequest}
|
|
231
250
|
* @returns A Promise of ExternalNode
|
|
@@ -242,15 +261,15 @@ class API extends API$1 {
|
|
|
242
261
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['pool_id', request.poolId], ['status', request.status ?? 'unknown'])
|
|
243
262
|
}, unmarshalListNodesResponse);
|
|
244
263
|
/**
|
|
245
|
-
*
|
|
246
|
-
* cluster.
|
|
264
|
+
* List all the nodes in a cluster. List all the existing nodes for a specific
|
|
265
|
+
* Kubernetes cluster.
|
|
247
266
|
*
|
|
248
267
|
* @param request - The request {@link ListNodesRequest}
|
|
249
268
|
* @returns A Promise of ListNodesResponse
|
|
250
269
|
*/
|
|
251
270
|
this.listNodes = request => enrichForPagination('nodes', this.pageOfListNodes, request);
|
|
252
271
|
/**
|
|
253
|
-
*
|
|
272
|
+
* Get a node in a cluster. Get details about a specific Kubernetes node.
|
|
254
273
|
*
|
|
255
274
|
* @param request - The request {@link GetNodeRequest}
|
|
256
275
|
* @returns A Promise of Node
|
|
@@ -268,7 +287,7 @@ class API extends API$1 {
|
|
|
268
287
|
*/
|
|
269
288
|
this.waitForNode = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NODE_TRANSIENT_STATUSES.includes(res.status))), this.getNode, request, options);
|
|
270
289
|
/**
|
|
271
|
-
*
|
|
290
|
+
* Replace a node in a cluster. Replace a specific node. The node will be set
|
|
272
291
|
* cordoned, meaning that scheduling will be disabled. Then the existing pods
|
|
273
292
|
* on the node will be drained and reschedule onto another schedulable node.
|
|
274
293
|
* Then the node will be deleted, and a new one will be created after the
|
|
@@ -287,11 +306,11 @@ class API extends API$1 {
|
|
|
287
306
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}/replace`
|
|
288
307
|
}, unmarshalNode);
|
|
289
308
|
/**
|
|
290
|
-
*
|
|
309
|
+
* Reboot a node in a cluster. Reboot a specific node. This node will first be
|
|
291
310
|
* cordoned, meaning that scheduling will be disabled. Then the existing pods
|
|
292
|
-
* on the node will be drained and
|
|
311
|
+
* on the node will be drained and rescheduled onto another schedulable node.
|
|
293
312
|
* Note that when there is not enough space to reschedule all the pods (in a
|
|
294
|
-
* one
|
|
313
|
+
* one-node cluster, for instance), you may experience some disruption of your
|
|
295
314
|
* applications.
|
|
296
315
|
*
|
|
297
316
|
* @param request - The request {@link RebootNodeRequest}
|
|
@@ -304,8 +323,8 @@ class API extends API$1 {
|
|
|
304
323
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}/reboot`
|
|
305
324
|
}, unmarshalNode);
|
|
306
325
|
/**
|
|
307
|
-
*
|
|
308
|
-
* enough space to reschedule all the pods (in a one
|
|
326
|
+
* Delete a node in a cluster. Delete a specific node. Note that when there is
|
|
327
|
+
* not enough space to reschedule all the pods (in a one-node cluster for
|
|
309
328
|
* instance), you may experience some disruption of your applications.
|
|
310
329
|
*
|
|
311
330
|
* @param request - The request {@link DeleteNodeRequest}
|
|
@@ -317,8 +336,8 @@ class API extends API$1 {
|
|
|
317
336
|
urlParams: urlParams(['replace', request.replace], ['skip_drain', request.skipDrain])
|
|
318
337
|
}, unmarshalNode);
|
|
319
338
|
/**
|
|
320
|
-
*
|
|
321
|
-
* Kubernetes cluster.
|
|
339
|
+
* List all available versions. List all available versions for the creation
|
|
340
|
+
* of a new Kubernetes cluster.
|
|
322
341
|
*
|
|
323
342
|
* @param request - The request {@link ListVersionsRequest}
|
|
324
343
|
* @returns A Promise of ListVersionsResponse
|
|
@@ -333,8 +352,8 @@ class API extends API$1 {
|
|
|
333
352
|
}, unmarshalListVersionsResponse);
|
|
334
353
|
};
|
|
335
354
|
/**
|
|
336
|
-
*
|
|
337
|
-
* about the version.
|
|
355
|
+
* Get details about a specific version. Get a specific Kubernetes version and
|
|
356
|
+
* the details about the version.
|
|
338
357
|
*
|
|
339
358
|
* @param request - The request {@link GetVersionRequest}
|
|
340
359
|
* @returns A Promise of Version
|
|
@@ -82,6 +82,7 @@ const unmarshalCluster = data => {
|
|
|
82
82
|
name: data.name,
|
|
83
83
|
openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : undefined,
|
|
84
84
|
organizationId: data.organization_id,
|
|
85
|
+
privateNetworkId: data.private_network_id,
|
|
85
86
|
projectId: data.project_id,
|
|
86
87
|
region: data.region,
|
|
87
88
|
status: data.status,
|
|
@@ -310,6 +311,7 @@ const marshalCreateClusterRequest = (request, defaults) => ({
|
|
|
310
311
|
name: request.name || randomName('k8s'),
|
|
311
312
|
open_id_connect_config: request.openIdConnectConfig ? marshalCreateClusterRequestOpenIDConnectConfig(request.openIdConnectConfig) : undefined,
|
|
312
313
|
pools: request.pools ? request.pools.map(elt => marshalCreateClusterRequestPoolConfig(elt)) : undefined,
|
|
314
|
+
private_network_id: request.privateNetworkId,
|
|
313
315
|
tags: request.tags,
|
|
314
316
|
type: request.type,
|
|
315
317
|
version: request.version,
|
|
@@ -340,6 +342,9 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
340
342
|
upgrade_policy: request.upgradePolicy ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : undefined,
|
|
341
343
|
zone: request.zone ?? defaults.defaultZone
|
|
342
344
|
});
|
|
345
|
+
const marshalSetClusterTypeRequest = (request, defaults) => ({
|
|
346
|
+
type: request.type
|
|
347
|
+
});
|
|
343
348
|
const marshalUpdateClusterRequest = (request, defaults) => ({
|
|
344
349
|
admission_plugins: request.admissionPlugins,
|
|
345
350
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
@@ -371,4 +376,4 @@ const marshalUpgradePoolRequest = (request, defaults) => ({
|
|
|
371
376
|
version: request.version
|
|
372
377
|
});
|
|
373
378
|
|
|
374
|
-
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
|
379
|
+
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
package/dist/api/lb/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as index
|
|
2
|
-
export { index
|
|
1
|
+
import * as index from './v1/index.js';
|
|
2
|
+
export { index as v1 };
|