@scaleway/sdk-baremetal 1.0.5 → 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.
@@ -95,7 +95,7 @@ class API extends sdkClient.API {
95
95
  marshalling_gen.unmarshalServer
96
96
  );
97
97
  /**
98
- * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
98
+ * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
99
99
  *
100
100
  * @param request - The request {@link UpdateServerRequest}
101
101
  * @returns A Promise of Server
@@ -1,6 +1,6 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
- import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, InstallServerRequest, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
2
+ import { API as ParentAPI } from '@scaleway/sdk-client';
3
+ import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, InstallServerRequest, IP, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, Offer, Option, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
4
4
  /**
5
5
  * Elastic Metal API.
6
6
 
@@ -46,7 +46,7 @@ export declare class API extends ParentAPI {
46
46
  */
47
47
  createServer: (request: Readonly<CreateServerRequest>) => Promise<Server>;
48
48
  /**
49
- * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
49
+ * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
50
50
  *
51
51
  * @param request - The request {@link UpdateServerRequest}
52
52
  * @returns A Promise of Server
@@ -93,7 +93,7 @@ class API extends API$1 {
93
93
  unmarshalServer
94
94
  );
95
95
  /**
96
- * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
96
+ * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
97
97
  *
98
98
  * @param request - The request {@link UpdateServerRequest}
99
99
  * @returns A Promise of Server
@@ -1,5 +1,5 @@
1
1
  export { API, PrivateNetworkAPI, } from './api.gen';
2
2
  export * from './content.gen';
3
3
  export * from './marshalling.gen';
4
- export type { AddOptionServerRequest, BMCAccess, CPU, CertificationOption, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GPU, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, IPReverseStatus, IPVersion, InstallServerRequest, LicenseOption, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, OS, OSOSField, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen';
4
+ export type { AddOptionServerRequest, BMCAccess, CertificationOption, CPU, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, GPU, InstallServerRequest, IP, IPReverseStatus, IPVersion, LicenseOption, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, OS, OSOSField, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen';
5
5
  export * as ValidationRules from './validation-rules.gen';
@@ -107,40 +107,6 @@ const unmarshalIP = (data) => {
107
107
  version: data.version
108
108
  };
109
109
  };
110
- const unmarshalOSOSField = (data) => {
111
- if (!sdkClient.isJSONObject(data)) {
112
- throw new TypeError(
113
- `Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
114
- );
115
- }
116
- return {
117
- defaultValue: data.default_value,
118
- editable: data.editable,
119
- required: data.required
120
- };
121
- };
122
- const unmarshalOS = (data) => {
123
- if (!sdkClient.isJSONObject(data)) {
124
- throw new TypeError(
125
- `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
126
- );
127
- }
128
- return {
129
- allowed: data.allowed,
130
- customPartitioningSupported: data.custom_partitioning_supported,
131
- enabled: data.enabled,
132
- id: data.id,
133
- licenseRequired: data.license_required,
134
- logoUrl: data.logo_url,
135
- name: data.name,
136
- password: data.password ? unmarshalOSOSField(data.password) : void 0,
137
- servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
138
- serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
139
- ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
140
- user: data.user ? unmarshalOSOSField(data.user) : void 0,
141
- version: data.version
142
- };
143
- };
144
110
  const unmarshalCertificationOption = (data) => {
145
111
  if (!sdkClient.isJSONObject(data)) {
146
112
  throw new TypeError(
@@ -187,6 +153,116 @@ const unmarshalRemoteAccessOption = (data) => {
187
153
  }
188
154
  return {};
189
155
  };
156
+ const unmarshalServerInstall = (data) => {
157
+ if (!sdkClient.isJSONObject(data)) {
158
+ throw new TypeError(
159
+ `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
160
+ );
161
+ }
162
+ return {
163
+ hostname: data.hostname,
164
+ osId: data.os_id,
165
+ partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
166
+ serviceUrl: data.service_url,
167
+ serviceUser: data.service_user,
168
+ sshKeyIds: data.ssh_key_ids,
169
+ status: data.status,
170
+ user: data.user
171
+ };
172
+ };
173
+ const unmarshalServerOption = (data) => {
174
+ if (!sdkClient.isJSONObject(data)) {
175
+ throw new TypeError(
176
+ `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
177
+ );
178
+ }
179
+ return {
180
+ certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
181
+ expiresAt: sdkClient.unmarshalDate(data.expires_at),
182
+ id: data.id,
183
+ license: data.license ? unmarshalLicenseOption(data.license) : void 0,
184
+ manageable: data.manageable,
185
+ name: data.name,
186
+ privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
187
+ publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
188
+ remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
189
+ status: data.status
190
+ };
191
+ };
192
+ const unmarshalServerRescueServer = (data) => {
193
+ if (!sdkClient.isJSONObject(data)) {
194
+ throw new TypeError(
195
+ `Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
196
+ );
197
+ }
198
+ return {
199
+ password: data.password,
200
+ user: data.user
201
+ };
202
+ };
203
+ const unmarshalServer = (data) => {
204
+ if (!sdkClient.isJSONObject(data)) {
205
+ throw new TypeError(
206
+ `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
207
+ );
208
+ }
209
+ return {
210
+ bootType: data.boot_type,
211
+ createdAt: sdkClient.unmarshalDate(data.created_at),
212
+ description: data.description,
213
+ domain: data.domain,
214
+ id: data.id,
215
+ install: data.install ? unmarshalServerInstall(data.install) : void 0,
216
+ ips: sdkClient.unmarshalArrayOfObject(data.ips, unmarshalIP),
217
+ name: data.name,
218
+ offerId: data.offer_id,
219
+ offerName: data.offer_name,
220
+ options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalServerOption),
221
+ organizationId: data.organization_id,
222
+ pingStatus: data.ping_status,
223
+ projectId: data.project_id,
224
+ protected: data.protected,
225
+ rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
226
+ status: data.status,
227
+ tags: data.tags,
228
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
229
+ zone: data.zone
230
+ };
231
+ };
232
+ const unmarshalOSOSField = (data) => {
233
+ if (!sdkClient.isJSONObject(data)) {
234
+ throw new TypeError(
235
+ `Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
236
+ );
237
+ }
238
+ return {
239
+ defaultValue: data.default_value,
240
+ editable: data.editable,
241
+ required: data.required
242
+ };
243
+ };
244
+ const unmarshalOS = (data) => {
245
+ if (!sdkClient.isJSONObject(data)) {
246
+ throw new TypeError(
247
+ `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
248
+ );
249
+ }
250
+ return {
251
+ allowed: data.allowed,
252
+ customPartitioningSupported: data.custom_partitioning_supported,
253
+ enabled: data.enabled,
254
+ id: data.id,
255
+ licenseRequired: data.license_required,
256
+ logoUrl: data.logo_url,
257
+ name: data.name,
258
+ password: data.password ? unmarshalOSOSField(data.password) : void 0,
259
+ servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
260
+ serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
261
+ ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
262
+ user: data.user ? unmarshalOSOSField(data.user) : void 0,
263
+ version: data.version
264
+ };
265
+ };
190
266
  const unmarshalCPU = (data) => {
191
267
  if (!sdkClient.isJSONObject(data)) {
192
268
  throw new TypeError(
@@ -354,81 +430,6 @@ const unmarshalServerPrivateNetwork = (data) => {
354
430
  vlan: data.vlan
355
431
  };
356
432
  };
357
- const unmarshalServerInstall = (data) => {
358
- if (!sdkClient.isJSONObject(data)) {
359
- throw new TypeError(
360
- `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
361
- );
362
- }
363
- return {
364
- hostname: data.hostname,
365
- osId: data.os_id,
366
- partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
367
- serviceUrl: data.service_url,
368
- serviceUser: data.service_user,
369
- sshKeyIds: data.ssh_key_ids,
370
- status: data.status,
371
- user: data.user
372
- };
373
- };
374
- const unmarshalServerOption = (data) => {
375
- if (!sdkClient.isJSONObject(data)) {
376
- throw new TypeError(
377
- `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
378
- );
379
- }
380
- return {
381
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
382
- expiresAt: sdkClient.unmarshalDate(data.expires_at),
383
- id: data.id,
384
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
385
- manageable: data.manageable,
386
- name: data.name,
387
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
388
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
389
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
390
- status: data.status
391
- };
392
- };
393
- const unmarshalServerRescueServer = (data) => {
394
- if (!sdkClient.isJSONObject(data)) {
395
- throw new TypeError(
396
- `Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
397
- );
398
- }
399
- return {
400
- password: data.password,
401
- user: data.user
402
- };
403
- };
404
- const unmarshalServer = (data) => {
405
- if (!sdkClient.isJSONObject(data)) {
406
- throw new TypeError(
407
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
408
- );
409
- }
410
- return {
411
- bootType: data.boot_type,
412
- createdAt: sdkClient.unmarshalDate(data.created_at),
413
- description: data.description,
414
- domain: data.domain,
415
- id: data.id,
416
- install: data.install ? unmarshalServerInstall(data.install) : void 0,
417
- ips: sdkClient.unmarshalArrayOfObject(data.ips, unmarshalIP),
418
- name: data.name,
419
- offerId: data.offer_id,
420
- offerName: data.offer_name,
421
- options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalServerOption),
422
- organizationId: data.organization_id,
423
- pingStatus: data.ping_status,
424
- projectId: data.project_id,
425
- rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
426
- status: data.status,
427
- tags: data.tags,
428
- updatedAt: sdkClient.unmarshalDate(data.updated_at),
429
- zone: data.zone
430
- };
431
- };
432
433
  const unmarshalSetting = (data) => {
433
434
  if (!sdkClient.isJSONObject(data)) {
434
435
  throw new TypeError(
@@ -571,9 +572,6 @@ const unmarshalSetServerPrivateNetworksResponse = (data) => {
571
572
  )
572
573
  };
573
574
  };
574
- const marshalAddOptionServerRequest = (request, defaults) => ({
575
- expires_at: request.expiresAt
576
- });
577
575
  const marshalSchemaPartition = (request, defaults) => ({
578
576
  label: request.label,
579
577
  number: request.number,
@@ -630,6 +628,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
630
628
  name: request.name,
631
629
  offer_id: request.offerId,
632
630
  option_ids: request.optionIds,
631
+ protected: request.protected,
633
632
  tags: request.tags,
634
633
  ...sdkClient.resolveOneOf([
635
634
  {
@@ -644,6 +643,9 @@ const marshalCreateServerRequest = (request, defaults) => ({
644
643
  }
645
644
  ])
646
645
  });
646
+ const marshalAddOptionServerRequest = (request, defaults) => ({
647
+ expires_at: request.expiresAt
648
+ });
647
649
  const marshalInstallServerRequest = (request, defaults) => ({
648
650
  hostname: request.hostname,
649
651
  os_id: request.osId,
@@ -661,13 +663,15 @@ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaul
661
663
  private_network_ids: request.privateNetworkIds
662
664
  });
663
665
  const marshalRebootServerRequest = (request, defaults) => ({
664
- boot_type: request.bootType
666
+ boot_type: request.bootType,
667
+ ssh_key_ids: request.sshKeyIds
665
668
  });
666
669
  const marshalStartBMCAccessRequest = (request, defaults) => ({
667
670
  ip: request.ip
668
671
  });
669
672
  const marshalStartServerRequest = (request, defaults) => ({
670
- boot_type: request.bootType
673
+ boot_type: request.bootType,
674
+ ssh_key_ids: request.sshKeyIds
671
675
  });
672
676
  const marshalUpdateIPRequest = (request, defaults) => ({
673
677
  reverse: request.reverse
@@ -675,6 +679,7 @@ const marshalUpdateIPRequest = (request, defaults) => ({
675
679
  const marshalUpdateServerRequest = (request, defaults) => ({
676
680
  description: request.description,
677
681
  name: request.name,
682
+ protected: request.protected,
678
683
  tags: request.tags
679
684
  });
680
685
  const marshalUpdateSettingRequest = (request, defaults) => ({
@@ -1,12 +1,12 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, GetServerMetricsResponse, IP, InstallServerRequest, ListOSResponse, ListOffersResponse, ListOptionsResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
2
+ import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, GetServerMetricsResponse, InstallServerRequest, IP, ListOffersResponse, ListOptionsResponse, ListOSResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, Offer, Option, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
3
3
  export declare const unmarshalSchema: (data: unknown) => Schema;
4
4
  export declare const unmarshalIP: (data: unknown) => IP;
5
+ export declare const unmarshalServer: (data: unknown) => Server;
5
6
  export declare const unmarshalOS: (data: unknown) => OS;
6
7
  export declare const unmarshalOffer: (data: unknown) => Offer;
7
8
  export declare const unmarshalOption: (data: unknown) => Option;
8
9
  export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
9
- export declare const unmarshalServer: (data: unknown) => Server;
10
10
  export declare const unmarshalSetting: (data: unknown) => Setting;
11
11
  export declare const unmarshalBMCAccess: (data: unknown) => BMCAccess;
12
12
  export declare const unmarshalGetServerMetricsResponse: (data: unknown) => GetServerMetricsResponse;
@@ -18,9 +18,9 @@ export declare const unmarshalListServerPrivateNetworksResponse: (data: unknown)
18
18
  export declare const unmarshalListServersResponse: (data: unknown) => ListServersResponse;
19
19
  export declare const unmarshalListSettingsResponse: (data: unknown) => ListSettingsResponse;
20
20
  export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown) => SetServerPrivateNetworksResponse;
21
- export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
22
21
  export declare const marshalSchema: (request: Schema, defaults: DefaultValues) => Record<string, unknown>;
23
22
  export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
23
+ export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
24
24
  export declare const marshalInstallServerRequest: (request: InstallServerRequest, defaults: DefaultValues) => Record<string, unknown>;
25
25
  export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
26
26
  export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -105,40 +105,6 @@ const unmarshalIP = (data) => {
105
105
  version: data.version
106
106
  };
107
107
  };
108
- const unmarshalOSOSField = (data) => {
109
- if (!isJSONObject(data)) {
110
- throw new TypeError(
111
- `Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
112
- );
113
- }
114
- return {
115
- defaultValue: data.default_value,
116
- editable: data.editable,
117
- required: data.required
118
- };
119
- };
120
- const unmarshalOS = (data) => {
121
- if (!isJSONObject(data)) {
122
- throw new TypeError(
123
- `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
124
- );
125
- }
126
- return {
127
- allowed: data.allowed,
128
- customPartitioningSupported: data.custom_partitioning_supported,
129
- enabled: data.enabled,
130
- id: data.id,
131
- licenseRequired: data.license_required,
132
- logoUrl: data.logo_url,
133
- name: data.name,
134
- password: data.password ? unmarshalOSOSField(data.password) : void 0,
135
- servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
136
- serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
137
- ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
138
- user: data.user ? unmarshalOSOSField(data.user) : void 0,
139
- version: data.version
140
- };
141
- };
142
108
  const unmarshalCertificationOption = (data) => {
143
109
  if (!isJSONObject(data)) {
144
110
  throw new TypeError(
@@ -185,6 +151,116 @@ const unmarshalRemoteAccessOption = (data) => {
185
151
  }
186
152
  return {};
187
153
  };
154
+ const unmarshalServerInstall = (data) => {
155
+ if (!isJSONObject(data)) {
156
+ throw new TypeError(
157
+ `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
158
+ );
159
+ }
160
+ return {
161
+ hostname: data.hostname,
162
+ osId: data.os_id,
163
+ partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
164
+ serviceUrl: data.service_url,
165
+ serviceUser: data.service_user,
166
+ sshKeyIds: data.ssh_key_ids,
167
+ status: data.status,
168
+ user: data.user
169
+ };
170
+ };
171
+ const unmarshalServerOption = (data) => {
172
+ if (!isJSONObject(data)) {
173
+ throw new TypeError(
174
+ `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
175
+ );
176
+ }
177
+ return {
178
+ certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
179
+ expiresAt: unmarshalDate(data.expires_at),
180
+ id: data.id,
181
+ license: data.license ? unmarshalLicenseOption(data.license) : void 0,
182
+ manageable: data.manageable,
183
+ name: data.name,
184
+ privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
185
+ publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
186
+ remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
187
+ status: data.status
188
+ };
189
+ };
190
+ const unmarshalServerRescueServer = (data) => {
191
+ if (!isJSONObject(data)) {
192
+ throw new TypeError(
193
+ `Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
194
+ );
195
+ }
196
+ return {
197
+ password: data.password,
198
+ user: data.user
199
+ };
200
+ };
201
+ const unmarshalServer = (data) => {
202
+ if (!isJSONObject(data)) {
203
+ throw new TypeError(
204
+ `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
205
+ );
206
+ }
207
+ return {
208
+ bootType: data.boot_type,
209
+ createdAt: unmarshalDate(data.created_at),
210
+ description: data.description,
211
+ domain: data.domain,
212
+ id: data.id,
213
+ install: data.install ? unmarshalServerInstall(data.install) : void 0,
214
+ ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
215
+ name: data.name,
216
+ offerId: data.offer_id,
217
+ offerName: data.offer_name,
218
+ options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
219
+ organizationId: data.organization_id,
220
+ pingStatus: data.ping_status,
221
+ projectId: data.project_id,
222
+ protected: data.protected,
223
+ rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
224
+ status: data.status,
225
+ tags: data.tags,
226
+ updatedAt: unmarshalDate(data.updated_at),
227
+ zone: data.zone
228
+ };
229
+ };
230
+ const unmarshalOSOSField = (data) => {
231
+ if (!isJSONObject(data)) {
232
+ throw new TypeError(
233
+ `Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
234
+ );
235
+ }
236
+ return {
237
+ defaultValue: data.default_value,
238
+ editable: data.editable,
239
+ required: data.required
240
+ };
241
+ };
242
+ const unmarshalOS = (data) => {
243
+ if (!isJSONObject(data)) {
244
+ throw new TypeError(
245
+ `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
246
+ );
247
+ }
248
+ return {
249
+ allowed: data.allowed,
250
+ customPartitioningSupported: data.custom_partitioning_supported,
251
+ enabled: data.enabled,
252
+ id: data.id,
253
+ licenseRequired: data.license_required,
254
+ logoUrl: data.logo_url,
255
+ name: data.name,
256
+ password: data.password ? unmarshalOSOSField(data.password) : void 0,
257
+ servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
258
+ serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
259
+ ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
260
+ user: data.user ? unmarshalOSOSField(data.user) : void 0,
261
+ version: data.version
262
+ };
263
+ };
188
264
  const unmarshalCPU = (data) => {
189
265
  if (!isJSONObject(data)) {
190
266
  throw new TypeError(
@@ -352,81 +428,6 @@ const unmarshalServerPrivateNetwork = (data) => {
352
428
  vlan: data.vlan
353
429
  };
354
430
  };
355
- const unmarshalServerInstall = (data) => {
356
- if (!isJSONObject(data)) {
357
- throw new TypeError(
358
- `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
359
- );
360
- }
361
- return {
362
- hostname: data.hostname,
363
- osId: data.os_id,
364
- partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
365
- serviceUrl: data.service_url,
366
- serviceUser: data.service_user,
367
- sshKeyIds: data.ssh_key_ids,
368
- status: data.status,
369
- user: data.user
370
- };
371
- };
372
- const unmarshalServerOption = (data) => {
373
- if (!isJSONObject(data)) {
374
- throw new TypeError(
375
- `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
376
- );
377
- }
378
- return {
379
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
380
- expiresAt: unmarshalDate(data.expires_at),
381
- id: data.id,
382
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
383
- manageable: data.manageable,
384
- name: data.name,
385
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
386
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
387
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
388
- status: data.status
389
- };
390
- };
391
- const unmarshalServerRescueServer = (data) => {
392
- if (!isJSONObject(data)) {
393
- throw new TypeError(
394
- `Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
395
- );
396
- }
397
- return {
398
- password: data.password,
399
- user: data.user
400
- };
401
- };
402
- const unmarshalServer = (data) => {
403
- if (!isJSONObject(data)) {
404
- throw new TypeError(
405
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
406
- );
407
- }
408
- return {
409
- bootType: data.boot_type,
410
- createdAt: unmarshalDate(data.created_at),
411
- description: data.description,
412
- domain: data.domain,
413
- id: data.id,
414
- install: data.install ? unmarshalServerInstall(data.install) : void 0,
415
- ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
416
- name: data.name,
417
- offerId: data.offer_id,
418
- offerName: data.offer_name,
419
- options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
420
- organizationId: data.organization_id,
421
- pingStatus: data.ping_status,
422
- projectId: data.project_id,
423
- rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
424
- status: data.status,
425
- tags: data.tags,
426
- updatedAt: unmarshalDate(data.updated_at),
427
- zone: data.zone
428
- };
429
- };
430
431
  const unmarshalSetting = (data) => {
431
432
  if (!isJSONObject(data)) {
432
433
  throw new TypeError(
@@ -569,9 +570,6 @@ const unmarshalSetServerPrivateNetworksResponse = (data) => {
569
570
  )
570
571
  };
571
572
  };
572
- const marshalAddOptionServerRequest = (request, defaults) => ({
573
- expires_at: request.expiresAt
574
- });
575
573
  const marshalSchemaPartition = (request, defaults) => ({
576
574
  label: request.label,
577
575
  number: request.number,
@@ -628,6 +626,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
628
626
  name: request.name,
629
627
  offer_id: request.offerId,
630
628
  option_ids: request.optionIds,
629
+ protected: request.protected,
631
630
  tags: request.tags,
632
631
  ...resolveOneOf([
633
632
  {
@@ -642,6 +641,9 @@ const marshalCreateServerRequest = (request, defaults) => ({
642
641
  }
643
642
  ])
644
643
  });
644
+ const marshalAddOptionServerRequest = (request, defaults) => ({
645
+ expires_at: request.expiresAt
646
+ });
645
647
  const marshalInstallServerRequest = (request, defaults) => ({
646
648
  hostname: request.hostname,
647
649
  os_id: request.osId,
@@ -659,13 +661,15 @@ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaul
659
661
  private_network_ids: request.privateNetworkIds
660
662
  });
661
663
  const marshalRebootServerRequest = (request, defaults) => ({
662
- boot_type: request.bootType
664
+ boot_type: request.bootType,
665
+ ssh_key_ids: request.sshKeyIds
663
666
  });
664
667
  const marshalStartBMCAccessRequest = (request, defaults) => ({
665
668
  ip: request.ip
666
669
  });
667
670
  const marshalStartServerRequest = (request, defaults) => ({
668
- boot_type: request.bootType
671
+ boot_type: request.bootType,
672
+ ssh_key_ids: request.sshKeyIds
669
673
  });
670
674
  const marshalUpdateIPRequest = (request, defaults) => ({
671
675
  reverse: request.reverse
@@ -673,6 +677,7 @@ const marshalUpdateIPRequest = (request, defaults) => ({
673
677
  const marshalUpdateServerRequest = (request, defaults) => ({
674
678
  description: request.description,
675
679
  name: request.name,
680
+ protected: request.protected,
676
681
  tags: request.tags
677
682
  });
678
683
  const marshalUpdateSettingRequest = (request, defaults) => ({
@@ -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
  /**
@@ -1,5 +1,5 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
1
  import type { ApiLocality } from '@scaleway/sdk-client';
2
+ import { API as ParentAPI } 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-baremetal",
3
- "version": "1.0.5",
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.5"
32
+ "@scaleway/random-name": "5.1.2",
33
+ "@scaleway/sdk-std": "1.0.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.0"
36
+ "@scaleway/sdk-client": "^1.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.0"
39
+ "@scaleway/sdk-client": "^1.3.1"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",