@scaleway/sdk-baremetal 1.0.4 → 1.1.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.
@@ -48,6 +48,12 @@ export interface SchemaRAID {
48
48
  export interface SchemaZFS {
49
49
  pools: SchemaPool[];
50
50
  }
51
+ export interface Schema {
52
+ disks: SchemaDisk[];
53
+ raids: SchemaRAID[];
54
+ filesystems: SchemaFilesystem[];
55
+ zfs?: SchemaZFS;
56
+ }
51
57
  export interface CertificationOption {
52
58
  }
53
59
  export interface LicenseOption {
@@ -61,11 +67,161 @@ export interface PublicBandwidthOption {
61
67
  }
62
68
  export interface RemoteAccessOption {
63
69
  }
64
- export interface Schema {
65
- disks: SchemaDisk[];
66
- raids: SchemaRAID[];
67
- filesystems: SchemaFilesystem[];
68
- zfs?: SchemaZFS;
70
+ export interface CreateServerRequestInstall {
71
+ /**
72
+ * ID of the OS to installation on the server.
73
+ */
74
+ osId: string;
75
+ /**
76
+ * Hostname of the server.
77
+ */
78
+ hostname: string;
79
+ /**
80
+ * SSH key IDs authorized on the server.
81
+ */
82
+ sshKeyIds: string[];
83
+ /**
84
+ * User for the installation.
85
+ */
86
+ user?: string;
87
+ /**
88
+ * Password for the installation.
89
+ */
90
+ password?: string;
91
+ /**
92
+ * Regular user that runs the service to be installed on the server.
93
+ */
94
+ serviceUser?: string;
95
+ /**
96
+ * Password used for the service to install.
97
+ */
98
+ servicePassword?: string;
99
+ /**
100
+ * Partitioning schema.
101
+ */
102
+ partitioningSchema?: Schema;
103
+ }
104
+ export interface IP {
105
+ /**
106
+ * ID of the IP.
107
+ */
108
+ id: string;
109
+ /**
110
+ * Address of the IP.
111
+ */
112
+ address: string;
113
+ /**
114
+ * Reverse IP value.
115
+ */
116
+ reverse: string;
117
+ /**
118
+ * Version of IP (v4 or v6).
119
+ */
120
+ version: IPVersion;
121
+ /**
122
+ * Status of the reverse.
123
+ */
124
+ reverseStatus: IPReverseStatus;
125
+ /**
126
+ * A message related to the reverse status, e.g. in case of an error.
127
+ */
128
+ reverseStatusMessage: string;
129
+ }
130
+ export interface ServerInstall {
131
+ /**
132
+ * ID of the OS.
133
+ */
134
+ osId: string;
135
+ /**
136
+ * Host defined during the server installation.
137
+ */
138
+ hostname: string;
139
+ /**
140
+ * SSH public key IDs defined during server installation.
141
+ */
142
+ sshKeyIds: string[];
143
+ /**
144
+ * Status of the server installation.
145
+ */
146
+ status: ServerInstallStatus;
147
+ /**
148
+ * User defined in the server installation, or the default user if none were specified.
149
+ */
150
+ user: string;
151
+ /**
152
+ * Service user defined in the server installation, or the default user if none were specified.
153
+ */
154
+ serviceUser: string;
155
+ /**
156
+ * Address of the installed service.
157
+ */
158
+ serviceUrl: string;
159
+ /**
160
+ * Partitioning schema.
161
+ */
162
+ partitioningSchema?: Schema;
163
+ }
164
+ export interface ServerOption {
165
+ /**
166
+ * ID of the option.
167
+ */
168
+ id: string;
169
+ /**
170
+ * Name of the option.
171
+ */
172
+ name: string;
173
+ /**
174
+ * Status of the option on this server.
175
+ */
176
+ status: ServerOptionOptionStatus;
177
+ /**
178
+ * Defines whether the option can be managed (added or removed).
179
+ */
180
+ manageable: boolean;
181
+ /**
182
+ * Auto expiration date for compatible options.
183
+ */
184
+ expiresAt?: Date;
185
+ /**
186
+ * License option, contains the ID of the OS linked to the option.
187
+ *
188
+ * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
189
+ */
190
+ license?: LicenseOption;
191
+ /**
192
+ * Public_bandwidth option, contains the bandwidth_in_bps.
193
+ *
194
+ * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
195
+ */
196
+ publicBandwidth?: PublicBandwidthOption;
197
+ /**
198
+ * Private_network option, contains the bandwidth_in_bps.
199
+ *
200
+ * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
201
+ */
202
+ privateNetwork?: PrivateNetworkOption;
203
+ /**
204
+ * Remote_access option.
205
+ *
206
+ * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
207
+ */
208
+ remoteAccess?: RemoteAccessOption;
209
+ /**
210
+ * Certification option.
211
+ *
212
+ * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
213
+ */
214
+ certification?: CertificationOption;
215
+ }
216
+ export interface ServerRescueServer {
217
+ /**
218
+ * Rescue user name.
219
+ */
220
+ user: string;
221
+ /**
222
+ * Rescue password.
223
+ */
224
+ password: string;
69
225
  }
70
226
  export interface OSOSField {
71
227
  editable: boolean;
@@ -211,161 +367,133 @@ export interface RaidController {
211
367
  model: string;
212
368
  raidLevel: string[];
213
369
  }
214
- export interface IP {
215
- /**
216
- * ID of the IP.
217
- */
218
- id: string;
219
- /**
220
- * Address of the IP.
221
- */
222
- address: string;
223
- /**
224
- * Reverse IP value.
225
- */
226
- reverse: string;
227
- /**
228
- * Version of IP (v4 or v6).
229
- */
230
- version: IPVersion;
370
+ export type CreateServerRequest = {
231
371
  /**
232
- * Status of the reverse.
372
+ * Zone to target. If none is passed will use default zone from the config.
233
373
  */
234
- reverseStatus: IPReverseStatus;
374
+ zone?: ScwZone;
235
375
  /**
236
- * A message related to the reverse status, e.g. in case of an error.
376
+ * Offer ID of the new server.
237
377
  */
238
- reverseStatusMessage: string;
239
- }
240
- export interface ServerInstall {
378
+ offerId: string;
241
379
  /**
242
- * ID of the OS.
380
+ * @deprecated Organization ID with which the server will be created.
381
+ *
382
+ * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
243
383
  */
244
- osId: string;
384
+ organizationId?: string;
245
385
  /**
246
- * Host defined during the server installation.
386
+ * Project ID with which the server will be created.
387
+ *
388
+ * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
247
389
  */
248
- hostname: string;
390
+ projectId?: string;
249
391
  /**
250
- * SSH public key IDs defined during server installation.
392
+ * Name of the server (≠hostname).
251
393
  */
252
- sshKeyIds: string[];
394
+ name: string;
253
395
  /**
254
- * Status of the server installation.
396
+ * Description associated with the server, max 255 characters.
255
397
  */
256
- status: ServerInstallStatus;
398
+ description: string;
257
399
  /**
258
- * User defined in the server installation, or the default user if none were specified.
400
+ * Tags to associate to the server.
259
401
  */
260
- user: string;
402
+ tags?: string[];
261
403
  /**
262
- * Service user defined in the server installation, or the default user if none were specified.
404
+ * Object describing the configuration details of the OS installation on the server.
263
405
  */
264
- serviceUser: string;
406
+ install?: CreateServerRequestInstall;
265
407
  /**
266
- * Address of the installed service.
408
+ * IDs of options to enable on server.
267
409
  */
268
- serviceUrl: string;
410
+ optionIds?: string[];
269
411
  /**
270
- * Partitioning schema.
412
+ * If enabled, the server can not be deleted.
271
413
  */
272
- partitioningSchema?: Schema;
273
- }
274
- export interface ServerOption {
414
+ protected: boolean;
415
+ };
416
+ export interface Server {
275
417
  /**
276
- * ID of the option.
418
+ * ID of the server.
277
419
  */
278
420
  id: string;
279
421
  /**
280
- * Name of the option.
422
+ * Organization ID the server is attached to.
281
423
  */
282
- name: string;
424
+ organizationId: string;
283
425
  /**
284
- * Status of the option on this server.
426
+ * Project ID the server is attached to.
285
427
  */
286
- status: ServerOptionOptionStatus;
428
+ projectId: string;
287
429
  /**
288
- * Defines whether the option can be managed (added or removed).
430
+ * Name of the server.
289
431
  */
290
- manageable: boolean;
432
+ name: string;
291
433
  /**
292
- * Auto expiration date for compatible options.
434
+ * Description of the server.
293
435
  */
294
- expiresAt?: Date;
436
+ description: string;
295
437
  /**
296
- * License option, contains the ID of the OS linked to the option.
297
- *
298
- * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
438
+ * Last modification date of the server.
299
439
  */
300
- license?: LicenseOption;
440
+ updatedAt?: Date;
301
441
  /**
302
- * Public_bandwidth option, contains the bandwidth_in_bps.
303
- *
304
- * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
442
+ * Creation date of the server.
305
443
  */
306
- publicBandwidth?: PublicBandwidthOption;
444
+ createdAt?: Date;
307
445
  /**
308
- * Private_network option, contains the bandwidth_in_bps.
309
- *
310
- * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
446
+ * Status of the server.
311
447
  */
312
- privateNetwork?: PrivateNetworkOption;
448
+ status: ServerStatus;
313
449
  /**
314
- * Remote_access option.
315
- *
316
- * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
450
+ * Offer ID of the server.
317
451
  */
318
- remoteAccess?: RemoteAccessOption;
452
+ offerId: string;
319
453
  /**
320
- * Certification option.
321
- *
322
- * One-of ('option'): at most one of 'license', 'publicBandwidth', 'privateNetwork', 'remoteAccess', 'certification' could be set.
454
+ * Offer name of the server.
323
455
  */
324
- certification?: CertificationOption;
325
- }
326
- export interface ServerRescueServer {
456
+ offerName: string;
327
457
  /**
328
- * Rescue user name.
458
+ * Array of custom tags attached to the server.
329
459
  */
330
- user: string;
460
+ tags: string[];
331
461
  /**
332
- * Rescue password.
462
+ * Array of IPs attached to the server.
333
463
  */
334
- password: string;
335
- }
336
- export interface CreateServerRequestInstall {
464
+ ips: IP[];
337
465
  /**
338
- * ID of the OS to installation on the server.
466
+ * Domain of the server.
339
467
  */
340
- osId: string;
468
+ domain: string;
341
469
  /**
342
- * Hostname of the server.
470
+ * Boot type of the server.
343
471
  */
344
- hostname: string;
472
+ bootType: ServerBootType;
345
473
  /**
346
- * SSH key IDs authorized on the server.
474
+ * Zone in which is the server located.
347
475
  */
348
- sshKeyIds: string[];
476
+ zone: ScwZone;
349
477
  /**
350
- * User for the installation.
478
+ * Configuration of the installation.
351
479
  */
352
- user?: string;
480
+ install?: ServerInstall;
353
481
  /**
354
- * Password for the installation.
482
+ * Status of server ping.
355
483
  */
356
- password?: string;
484
+ pingStatus: ServerPingStatus;
357
485
  /**
358
- * Regular user that runs the service to be installed on the server.
486
+ * Options enabled on the server.
359
487
  */
360
- serviceUser?: string;
488
+ options: ServerOption[];
361
489
  /**
362
- * Password used for the service to install.
490
+ * Configuration of rescue boot.
363
491
  */
364
- servicePassword?: string;
492
+ rescueServer?: ServerRescueServer;
365
493
  /**
366
- * Partitioning schema.
494
+ * If enabled, the server can not be deleted.
367
495
  */
368
- partitioningSchema?: Schema;
496
+ protected: boolean;
369
497
  }
370
498
  export interface OS {
371
499
  /**
@@ -619,84 +747,6 @@ export interface ServerPrivateNetwork {
619
747
  */
620
748
  updatedAt?: Date;
621
749
  }
622
- export interface Server {
623
- /**
624
- * ID of the server.
625
- */
626
- id: string;
627
- /**
628
- * Organization ID the server is attached to.
629
- */
630
- organizationId: string;
631
- /**
632
- * Project ID the server is attached to.
633
- */
634
- projectId: string;
635
- /**
636
- * Name of the server.
637
- */
638
- name: string;
639
- /**
640
- * Description of the server.
641
- */
642
- description: string;
643
- /**
644
- * Last modification date of the server.
645
- */
646
- updatedAt?: Date;
647
- /**
648
- * Creation date of the server.
649
- */
650
- createdAt?: Date;
651
- /**
652
- * Status of the server.
653
- */
654
- status: ServerStatus;
655
- /**
656
- * Offer ID of the server.
657
- */
658
- offerId: string;
659
- /**
660
- * Offer name of the server.
661
- */
662
- offerName: string;
663
- /**
664
- * Array of custom tags attached to the server.
665
- */
666
- tags: string[];
667
- /**
668
- * Array of IPs attached to the server.
669
- */
670
- ips: IP[];
671
- /**
672
- * Domain of the server.
673
- */
674
- domain: string;
675
- /**
676
- * Boot type of the server.
677
- */
678
- bootType: ServerBootType;
679
- /**
680
- * Zone in which is the server located.
681
- */
682
- zone: ScwZone;
683
- /**
684
- * Configuration of the installation.
685
- */
686
- install?: ServerInstall;
687
- /**
688
- * Status of server ping.
689
- */
690
- pingStatus: ServerPingStatus;
691
- /**
692
- * Options enabled on the server.
693
- */
694
- options: ServerOption[];
695
- /**
696
- * Configuration of rescue boot.
697
- */
698
- rescueServer?: ServerRescueServer;
699
- }
700
750
  export interface Setting {
701
751
  /**
702
752
  * ID of the setting.
@@ -751,48 +801,6 @@ export interface BMCAccess {
751
801
  */
752
802
  expiresAt?: Date;
753
803
  }
754
- export type CreateServerRequest = {
755
- /**
756
- * Zone to target. If none is passed will use default zone from the config.
757
- */
758
- zone?: ScwZone;
759
- /**
760
- * Offer ID of the new server.
761
- */
762
- offerId: string;
763
- /**
764
- * @deprecated Organization ID with which the server will be created.
765
- *
766
- * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
767
- */
768
- organizationId?: string;
769
- /**
770
- * Project ID with which the server will be created.
771
- *
772
- * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
773
- */
774
- projectId?: string;
775
- /**
776
- * Name of the server (≠hostname).
777
- */
778
- name: string;
779
- /**
780
- * Description associated with the server, max 255 characters.
781
- */
782
- description: string;
783
- /**
784
- * Tags to associate to the server.
785
- */
786
- tags?: string[];
787
- /**
788
- * Object describing the configuration details of the OS installation on the server.
789
- */
790
- install?: CreateServerRequestInstall;
791
- /**
792
- * IDs of options to enable on server.
793
- */
794
- optionIds?: string[];
795
- };
796
804
  export type DeleteOptionServerRequest = {
797
805
  /**
798
806
  * Zone to target. If none is passed will use default zone from the config.
@@ -1250,6 +1258,10 @@ export type RebootServerRequest = {
1250
1258
  * The type of boot.
1251
1259
  */
1252
1260
  bootType?: ServerBootType;
1261
+ /**
1262
+ * Additional SSH public key IDs to configure on rescue image.
1263
+ */
1264
+ sshKeyIds?: string[];
1253
1265
  };
1254
1266
  export interface SetServerPrivateNetworksResponse {
1255
1267
  serverPrivateNetworks: ServerPrivateNetwork[];
@@ -1281,6 +1293,10 @@ export type StartServerRequest = {
1281
1293
  * The type of boot.
1282
1294
  */
1283
1295
  bootType?: ServerBootType;
1296
+ /**
1297
+ * Additional SSH public key IDs to configure on rescue image.
1298
+ */
1299
+ sshKeyIds?: string[];
1284
1300
  };
1285
1301
  export type StopBMCAccessRequest = {
1286
1302
  /**
@@ -1341,6 +1357,10 @@ export type UpdateServerRequest = {
1341
1357
  * Tags associated with the server, not updated if null.
1342
1358
  */
1343
1359
  tags?: string[];
1360
+ /**
1361
+ * If enabled, the server can not be deleted.
1362
+ */
1363
+ protected?: boolean;
1344
1364
  };
1345
1365
  export type UpdateSettingRequest = {
1346
1366
  /**
@@ -6,15 +6,20 @@ const jsonContentHeaders = {
6
6
  "Content-Type": "application/json; charset=utf-8"
7
7
  };
8
8
  class PrivateNetworkAPI extends sdkClient.API {
9
- /** Lists the available zones of the API. */
10
- static LOCALITIES = [
11
- "fr-par-1",
12
- "fr-par-2",
13
- "nl-ams-1",
14
- "nl-ams-2",
15
- "pl-waw-2",
16
- "pl-waw-3"
17
- ];
9
+ /**
10
+ * Locality of this API.
11
+ * type ∈ {'zone','region','global','unspecified'}
12
+ */
13
+ static LOCALITY = sdkClient.toApiLocality({
14
+ zones: [
15
+ "fr-par-1",
16
+ "fr-par-2",
17
+ "nl-ams-1",
18
+ "nl-ams-2",
19
+ "pl-waw-2",
20
+ "pl-waw-3"
21
+ ]
22
+ });
18
23
  /**
19
24
  * Add a server to a Private Network. Add an Elastic Metal server to a Private Network.
20
25
  *
@@ -1,12 +1,15 @@
1
+ import type { ApiLocality } from '@scaleway/sdk-client';
1
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Zone as ScwZone } from '@scaleway/sdk-client';
3
3
  import type { ListServerPrivateNetworksResponse, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, ServerPrivateNetwork, SetServerPrivateNetworksResponse } from './types.gen';
4
4
  /**
5
5
  * Elastic Metal - Private Networks API.
6
6
  */
7
7
  export declare class PrivateNetworkAPI extends ParentAPI {
8
- /** Lists the available zones of the API. */
9
- static readonly LOCALITIES: ScwZone[];
8
+ /**
9
+ * Locality of this API.
10
+ * type ∈ {'zone','region','global','unspecified'}
11
+ */
12
+ static readonly LOCALITY: ApiLocality;
10
13
  /**
11
14
  * Add a server to a Private Network. Add an Elastic Metal server to a Private Network.
12
15
  *
@@ -1,18 +1,23 @@
1
- import { API as API$1, validatePathParam, urlParams, enrichForPagination } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, validatePathParam, urlParams, enrichForPagination } from "@scaleway/sdk-client";
2
2
  import { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, unmarshalServerPrivateNetwork, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalSetServerPrivateNetworksResponse, unmarshalListServerPrivateNetworksResponse } from "./marshalling.gen.js";
3
3
  const jsonContentHeaders = {
4
4
  "Content-Type": "application/json; charset=utf-8"
5
5
  };
6
6
  class PrivateNetworkAPI extends API$1 {
7
- /** Lists the available zones of the API. */
8
- static LOCALITIES = [
9
- "fr-par-1",
10
- "fr-par-2",
11
- "nl-ams-1",
12
- "nl-ams-2",
13
- "pl-waw-2",
14
- "pl-waw-3"
15
- ];
7
+ /**
8
+ * Locality of this API.
9
+ * type ∈ {'zone','region','global','unspecified'}
10
+ */
11
+ static LOCALITY = toApiLocality({
12
+ zones: [
13
+ "fr-par-1",
14
+ "fr-par-2",
15
+ "nl-ams-1",
16
+ "nl-ams-2",
17
+ "pl-waw-2",
18
+ "pl-waw-3"
19
+ ]
20
+ });
16
21
  /**
17
22
  * Add a server to a Private Network. Add an Elastic Metal server to a Private Network.
18
23
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-baremetal",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "Scaleway SDK baremetal",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,17 +26,17 @@
26
26
  "directory": "packages_generated/baremetal"
27
27
  },
28
28
  "engines": {
29
- "node": ">=20.19.1"
29
+ "node": ">=20.19.4"
30
30
  },
31
31
  "dependencies": {
32
- "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.4"
32
+ "@scaleway/random-name": "5.1.2",
33
+ "@scaleway/sdk-std": "1.0.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.3"
36
+ "@scaleway/sdk-client": "^1.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.3"
39
+ "@scaleway/sdk-client": "^1.3.1"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",