@scaleway/sdk-instance 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2638 @@
1
+ import type { Zone as ScwZone } from '@scaleway/sdk-client';
2
+ export type Arch = 'unknown_arch' | 'x86_64' | 'arm' | 'arm64';
3
+ export type AttachServerVolumeRequestVolumeType = 'unknown_volume_type' | 'l_ssd' | 'b_ssd' | 'sbs_volume';
4
+ export type BootType = 'local' | 'bootscript' | 'rescue';
5
+ export type ImageState = 'available' | 'creating' | 'error';
6
+ export type IpState = 'unknown_state' | 'detached' | 'attached' | 'pending' | 'error';
7
+ export type IpType = 'unknown_iptype' | 'routed_ipv4' | 'routed_ipv6';
8
+ export type ListServersRequestOrder = 'creation_date_desc' | 'creation_date_asc' | 'modification_date_desc' | 'modification_date_asc';
9
+ export type PlacementGroupPolicyMode = 'optional' | 'enforced';
10
+ export type PlacementGroupPolicyType = 'max_availability' | 'low_latency';
11
+ export type PrivateNICState = 'available' | 'syncing' | 'syncing_error';
12
+ export type SecurityGroupPolicy = 'unknown_policy' | 'accept' | 'drop';
13
+ export type SecurityGroupRuleAction = 'unknown_action' | 'accept' | 'drop';
14
+ export type SecurityGroupRuleDirection = 'unknown_direction' | 'inbound' | 'outbound';
15
+ export type SecurityGroupRuleProtocol = 'unknown_protocol' | 'TCP' | 'UDP' | 'ICMP' | 'ANY';
16
+ export type SecurityGroupState = 'available' | 'syncing' | 'syncing_error';
17
+ export type ServerAction = 'poweron' | 'backup' | 'stop_in_place' | 'poweroff' | 'terminate' | 'reboot' | 'enable_routed_ip';
18
+ export type ServerIpIpFamily = 'inet' | 'inet6';
19
+ export type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac';
20
+ export type ServerIpState = 'unknown_state' | 'detached' | 'attached' | 'pending' | 'error';
21
+ export type ServerState = 'running' | 'stopped' | 'stopped in place' | 'starting' | 'stopping' | 'locked';
22
+ export type ServerTypesAvailability = 'available' | 'scarce' | 'shortage';
23
+ export type SnapshotState = 'available' | 'snapshotting' | 'error' | 'invalid_data' | 'importing' | 'exporting';
24
+ export type SnapshotVolumeType = 'unknown_volume_type' | 'l_ssd' | 'b_ssd' | 'unified';
25
+ export type TaskStatus = 'pending' | 'started' | 'success' | 'failure' | 'retry';
26
+ export type VolumeServerState = 'available' | 'snapshotting' | 'fetching' | 'resizing' | 'saving' | 'hotsyncing' | 'error';
27
+ export type VolumeServerVolumeType = 'l_ssd' | 'b_ssd' | 'sbs_volume' | 'scratch';
28
+ export type VolumeState = 'available' | 'snapshotting' | 'fetching' | 'resizing' | 'saving' | 'hotsyncing' | 'error';
29
+ export type VolumeVolumeType = 'l_ssd' | 'b_ssd' | 'unified' | 'scratch' | 'sbs_volume' | 'sbs_snapshot';
30
+ export interface ServerSummary {
31
+ id: string;
32
+ name: string;
33
+ }
34
+ export interface Bootscript {
35
+ architecture: Arch;
36
+ bootcmdargs: string;
37
+ default: boolean;
38
+ dtb: string;
39
+ id: string;
40
+ initrd: string;
41
+ kernel: string;
42
+ organization: string;
43
+ public: boolean;
44
+ title: string;
45
+ project: string;
46
+ /**
47
+ * Zone to target. If none is passed will use default zone from the config.
48
+ */
49
+ zone: ScwZone;
50
+ }
51
+ export interface Volume {
52
+ /**
53
+ * Volume unique ID.
54
+ */
55
+ id: string;
56
+ /**
57
+ * Volume name.
58
+ */
59
+ name: string;
60
+ /**
61
+ * @deprecated Show the volume NBD export URI.
62
+ */
63
+ exportUri?: string;
64
+ /**
65
+ * Volume disk size.
66
+ */
67
+ size: number;
68
+ /**
69
+ * Volume type.
70
+ */
71
+ volumeType: VolumeVolumeType;
72
+ /**
73
+ * Volume creation date.
74
+ */
75
+ creationDate?: Date;
76
+ /**
77
+ * Volume modification date.
78
+ */
79
+ modificationDate?: Date;
80
+ /**
81
+ * Volume Organization ID.
82
+ */
83
+ organization: string;
84
+ /**
85
+ * Volume Project ID.
86
+ */
87
+ project: string;
88
+ /**
89
+ * Volume tags.
90
+ */
91
+ tags: string[];
92
+ /**
93
+ * Instance attached to the volume.
94
+ */
95
+ server?: ServerSummary;
96
+ /**
97
+ * Volume state.
98
+ */
99
+ state: VolumeState;
100
+ /**
101
+ * Zone in which the volume is located.
102
+ */
103
+ zone: ScwZone;
104
+ }
105
+ export interface VolumeSummary {
106
+ id: string;
107
+ name: string;
108
+ size: number;
109
+ volumeType: VolumeVolumeType;
110
+ }
111
+ export interface ServerTypeNetworkInterface {
112
+ /**
113
+ * Maximum internal bandwidth in bits per seconds.
114
+ */
115
+ internalBandwidth?: number;
116
+ /**
117
+ * Maximum internet bandwidth in bits per seconds.
118
+ */
119
+ internetBandwidth?: number;
120
+ }
121
+ export interface ServerTypeVolumeConstraintSizes {
122
+ /**
123
+ * Minimum volume size in bytes.
124
+ */
125
+ minSize: number;
126
+ /**
127
+ * Maximum volume size in bytes.
128
+ */
129
+ maxSize: number;
130
+ }
131
+ export interface Image {
132
+ id: string;
133
+ name: string;
134
+ arch: Arch;
135
+ creationDate?: Date;
136
+ modificationDate?: Date;
137
+ /**
138
+ * @deprecated
139
+ */
140
+ defaultBootscript?: Bootscript;
141
+ extraVolumes: Record<string, Volume>;
142
+ fromServer: string;
143
+ organization: string;
144
+ public: boolean;
145
+ rootVolume?: VolumeSummary;
146
+ state: ImageState;
147
+ project: string;
148
+ tags: string[];
149
+ /**
150
+ * Zone to target. If none is passed will use default zone from the config.
151
+ */
152
+ zone: ScwZone;
153
+ }
154
+ export interface PlacementGroup {
155
+ /**
156
+ * Placement group unique ID.
157
+ */
158
+ id: string;
159
+ /**
160
+ * Placement group name.
161
+ */
162
+ name: string;
163
+ /**
164
+ * Placement group Organization ID.
165
+ */
166
+ organization: string;
167
+ /**
168
+ * Placement group Project ID.
169
+ */
170
+ project: string;
171
+ /**
172
+ * Placement group tags.
173
+ */
174
+ tags: string[];
175
+ /**
176
+ * Select the failure mode when the placement cannot be respected, either optional or enforced.
177
+ */
178
+ policyMode: PlacementGroupPolicyMode;
179
+ /**
180
+ * Select the behavior of the placement group, either low_latency (group) or max_availability (spread).
181
+ */
182
+ policyType: PlacementGroupPolicyType;
183
+ /**
184
+ * In the server endpoints the value is always false as it is deprecated.
185
+ In the placement group endpoints the value is correct.
186
+ */
187
+ policyRespected: boolean;
188
+ /**
189
+ * Zone in which the placement group is located.
190
+ */
191
+ zone: ScwZone;
192
+ }
193
+ export interface PrivateNIC {
194
+ /**
195
+ * Private NIC unique ID.
196
+ */
197
+ id: string;
198
+ /**
199
+ * Instance to which the private NIC is attached.
200
+ */
201
+ serverId: string;
202
+ /**
203
+ * Private Network the private NIC is attached to.
204
+ */
205
+ privateNetworkId: string;
206
+ /**
207
+ * Private NIC MAC address.
208
+ */
209
+ macAddress: string;
210
+ /**
211
+ * Private NIC state.
212
+ */
213
+ state: PrivateNICState;
214
+ /**
215
+ * Private NIC tags.
216
+ */
217
+ tags: string[];
218
+ }
219
+ export interface SecurityGroupSummary {
220
+ id: string;
221
+ name: string;
222
+ }
223
+ export interface ServerIp {
224
+ /**
225
+ * Unique ID of the IP address.
226
+ */
227
+ id: string;
228
+ /**
229
+ * Instance's public IP-Address.
230
+ */
231
+ address: string;
232
+ /**
233
+ * Gateway's IP address.
234
+ */
235
+ gateway: string;
236
+ /**
237
+ * CIDR netmask.
238
+ */
239
+ netmask: string;
240
+ /**
241
+ * IP address family (inet or inet6).
242
+ */
243
+ family: ServerIpIpFamily;
244
+ /**
245
+ * True if the IP address is dynamic.
246
+ */
247
+ dynamic: boolean;
248
+ /**
249
+ * Information about this address provisioning mode.
250
+ */
251
+ provisioningMode: ServerIpProvisioningMode;
252
+ /**
253
+ * Tags associated with the IP.
254
+ */
255
+ tags: string[];
256
+ /**
257
+ * The ip_id of an IPAM ip if the ip is created from IPAM, null if not.
258
+ */
259
+ ipamId: string;
260
+ /**
261
+ * IP address state.
262
+ */
263
+ state: ServerIpState;
264
+ }
265
+ export interface ServerIpv6 {
266
+ /**
267
+ * Instance IPv6 IP-Address.
268
+ */
269
+ address: string;
270
+ /**
271
+ * IPv6 IP-addresses gateway.
272
+ */
273
+ gateway: string;
274
+ /**
275
+ * IPv6 IP-addresses CIDR netmask.
276
+ */
277
+ netmask: string;
278
+ }
279
+ export interface ServerLocation {
280
+ clusterId: string;
281
+ hypervisorId: string;
282
+ nodeId: string;
283
+ platformId: string;
284
+ zoneId: string;
285
+ }
286
+ export interface ServerMaintenance {
287
+ reason: string;
288
+ startDate?: Date;
289
+ }
290
+ export interface VolumeServer {
291
+ id: string;
292
+ name?: string;
293
+ /**
294
+ * @deprecated
295
+ */
296
+ exportUri?: string;
297
+ organization?: string;
298
+ server?: ServerSummary;
299
+ size?: number;
300
+ volumeType: VolumeServerVolumeType;
301
+ creationDate?: Date;
302
+ modificationDate?: Date;
303
+ state?: VolumeServerState;
304
+ project?: string;
305
+ boot: boolean;
306
+ /**
307
+ * Zone to target. If none is passed will use default zone from the config.
308
+ */
309
+ zone: ScwZone;
310
+ }
311
+ export interface SnapshotBaseVolume {
312
+ /**
313
+ * Volume ID on which the snapshot is based.
314
+ */
315
+ id: string;
316
+ /**
317
+ * Volume name on which the snapshot is based on.
318
+ */
319
+ name: string;
320
+ }
321
+ export interface ServerTypeCapabilities {
322
+ /**
323
+ * Defines whether the Instance supports block storage.
324
+ */
325
+ blockStorage?: boolean;
326
+ /**
327
+ * List of supported boot types.
328
+ */
329
+ bootTypes: BootType[];
330
+ /**
331
+ * Max number of SFS (Scaleway File Systems) that can be attached to the Instance.
332
+ */
333
+ maxFileSystems: number;
334
+ }
335
+ export interface ServerTypeGPUInfo {
336
+ /**
337
+ * GPU manufacturer.
338
+ */
339
+ gpuManufacturer: string;
340
+ /**
341
+ * GPU model name.
342
+ */
343
+ gpuName: string;
344
+ /**
345
+ * RAM of a single GPU, in bytes.
346
+ */
347
+ gpuMemory: number;
348
+ }
349
+ export interface ServerTypeNetwork {
350
+ /**
351
+ * List of available network interfaces.
352
+ */
353
+ interfaces: ServerTypeNetworkInterface[];
354
+ /**
355
+ * Total maximum internal bandwidth in bits per seconds.
356
+ */
357
+ sumInternalBandwidth?: number;
358
+ /**
359
+ * Total maximum internet bandwidth in bits per seconds.
360
+ */
361
+ sumInternetBandwidth?: number;
362
+ /**
363
+ * True if IPv6 is enabled.
364
+ */
365
+ ipv6Support: boolean;
366
+ }
367
+ export interface ServerTypeVolumeConstraintsByType {
368
+ /**
369
+ * Local SSD volumes.
370
+ */
371
+ lSsd?: ServerTypeVolumeConstraintSizes;
372
+ }
373
+ export interface VolumeTypeCapabilities {
374
+ snapshot: boolean;
375
+ }
376
+ export interface VolumeTypeConstraints {
377
+ min: number;
378
+ max: number;
379
+ }
380
+ export interface Server {
381
+ /**
382
+ * Instance unique ID.
383
+ */
384
+ id: string;
385
+ /**
386
+ * Instance name.
387
+ */
388
+ name: string;
389
+ /**
390
+ * Instance Organization ID.
391
+ */
392
+ organization: string;
393
+ /**
394
+ * Instance Project ID.
395
+ */
396
+ project: string;
397
+ /**
398
+ * List of allowed actions on the Instance.
399
+ */
400
+ allowedActions: ServerAction[];
401
+ /**
402
+ * Tags associated with the Instance.
403
+ */
404
+ tags: string[];
405
+ /**
406
+ * Instance commercial type (eg. GP1-M).
407
+ */
408
+ commercialType: string;
409
+ /**
410
+ * Instance creation date.
411
+ */
412
+ creationDate?: Date;
413
+ /**
414
+ * True if a dynamic IPv4 is required.
415
+ */
416
+ dynamicIpRequired: boolean;
417
+ /**
418
+ * @deprecated True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated.
419
+ */
420
+ routedIpEnabled?: boolean;
421
+ /**
422
+ * @deprecated True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
423
+ */
424
+ enableIpv6?: boolean;
425
+ /**
426
+ * Instance host name.
427
+ */
428
+ hostname: string;
429
+ /**
430
+ * Information about the Instance image.
431
+ */
432
+ image?: Image;
433
+ /**
434
+ * Defines whether the Instance protection option is activated.
435
+ */
436
+ protected: boolean;
437
+ /**
438
+ * Private IP address of the Instance (deprecated and always `null` when `routed_ip_enabled` is `True`).
439
+ */
440
+ privateIp?: string;
441
+ /**
442
+ * @deprecated Information about the public IP (deprecated in favor of `public_ips`).
443
+ */
444
+ publicIp?: ServerIp;
445
+ /**
446
+ * Information about all the public IPs attached to the server.
447
+ */
448
+ publicIps: ServerIp[];
449
+ /**
450
+ * The server's MAC address.
451
+ */
452
+ macAddress: string;
453
+ /**
454
+ * Instance modification date.
455
+ */
456
+ modificationDate?: Date;
457
+ /**
458
+ * Instance state.
459
+ */
460
+ state: ServerState;
461
+ /**
462
+ * Instance location.
463
+ */
464
+ location?: ServerLocation;
465
+ /**
466
+ * @deprecated Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`).
467
+ */
468
+ ipv6?: ServerIpv6;
469
+ /**
470
+ * Instance boot type.
471
+ */
472
+ bootType: BootType;
473
+ /**
474
+ * Instance volumes.
475
+ */
476
+ volumes: Record<string, VolumeServer>;
477
+ /**
478
+ * Instance security group.
479
+ */
480
+ securityGroup?: SecurityGroupSummary;
481
+ /**
482
+ * Instance planned maintenance.
483
+ */
484
+ maintenances: ServerMaintenance[];
485
+ /**
486
+ * Detailed information about the Instance state.
487
+ */
488
+ stateDetail: string;
489
+ /**
490
+ * Instance architecture.
491
+ */
492
+ arch: Arch;
493
+ /**
494
+ * Instance placement group.
495
+ */
496
+ placementGroup?: PlacementGroup;
497
+ /**
498
+ * Instance private NICs.
499
+ */
500
+ privateNics: PrivateNIC[];
501
+ /**
502
+ * Zone in which the Instance is located.
503
+ */
504
+ zone: ScwZone;
505
+ /**
506
+ * The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.
507
+ */
508
+ adminPasswordEncryptionSshKeyId?: string;
509
+ /**
510
+ * This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.
511
+ */
512
+ adminPasswordEncryptedValue?: string;
513
+ /**
514
+ * True if the Instance type has reached end of service.
515
+ */
516
+ endOfService: boolean;
517
+ }
518
+ export interface VolumeTemplate {
519
+ /**
520
+ * UUID of the volume.
521
+ */
522
+ id: string;
523
+ /**
524
+ * Name of the volume.
525
+ */
526
+ name: string;
527
+ /**
528
+ * Disk size of the volume, must be a multiple of 512.
529
+ */
530
+ size: number;
531
+ /**
532
+ * Type of the volume.
533
+ */
534
+ volumeType: VolumeVolumeType;
535
+ /**
536
+ * @deprecated Organization ID of the volume.
537
+ *
538
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
539
+ */
540
+ organization?: string;
541
+ /**
542
+ * Project ID of the volume.
543
+ *
544
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
545
+ */
546
+ project?: string;
547
+ }
548
+ export interface Ip {
549
+ id: string;
550
+ address: string;
551
+ reverse?: string;
552
+ server?: ServerSummary;
553
+ organization: string;
554
+ tags: string[];
555
+ project: string;
556
+ type: IpType;
557
+ state: IpState;
558
+ prefix: string;
559
+ ipamId: string;
560
+ /**
561
+ * Zone to target. If none is passed will use default zone from the config.
562
+ */
563
+ zone: ScwZone;
564
+ }
565
+ export interface SecurityGroup {
566
+ /**
567
+ * Security group unique ID.
568
+ */
569
+ id: string;
570
+ /**
571
+ * Security group name.
572
+ */
573
+ name: string;
574
+ /**
575
+ * Security group description.
576
+ */
577
+ description: string;
578
+ /**
579
+ * True if SMTP is blocked on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
580
+ */
581
+ enableDefaultSecurity: boolean;
582
+ /**
583
+ * Default inbound policy.
584
+ */
585
+ inboundDefaultPolicy: SecurityGroupPolicy;
586
+ /**
587
+ * Default outbound policy.
588
+ */
589
+ outboundDefaultPolicy: SecurityGroupPolicy;
590
+ /**
591
+ * Security group Organization ID.
592
+ */
593
+ organization: string;
594
+ /**
595
+ * Security group Project ID.
596
+ */
597
+ project: string;
598
+ /**
599
+ * Security group tags.
600
+ */
601
+ tags: string[];
602
+ /**
603
+ * @deprecated True if it is your default security group for this Organization ID.
604
+ */
605
+ organizationDefault?: boolean;
606
+ /**
607
+ * True if it is your default security group for this Project ID.
608
+ */
609
+ projectDefault: boolean;
610
+ /**
611
+ * Security group creation date.
612
+ */
613
+ creationDate?: Date;
614
+ /**
615
+ * Security group modification date.
616
+ */
617
+ modificationDate?: Date;
618
+ /**
619
+ * List of Instances attached to this security group.
620
+ */
621
+ servers: ServerSummary[];
622
+ /**
623
+ * Defines whether the security group is stateful.
624
+ */
625
+ stateful: boolean;
626
+ /**
627
+ * Security group state.
628
+ */
629
+ state: SecurityGroupState;
630
+ /**
631
+ * Zone in which the security group is located.
632
+ */
633
+ zone: ScwZone;
634
+ }
635
+ export interface SecurityGroupRule {
636
+ id: string;
637
+ protocol: SecurityGroupRuleProtocol;
638
+ direction: SecurityGroupRuleDirection;
639
+ action: SecurityGroupRuleAction;
640
+ ipRange: string;
641
+ destPortFrom?: number;
642
+ destPortTo?: number;
643
+ position: number;
644
+ editable: boolean;
645
+ /**
646
+ * Zone to target. If none is passed will use default zone from the config.
647
+ */
648
+ zone: ScwZone;
649
+ }
650
+ export interface VolumeServerTemplate {
651
+ /**
652
+ * UUID of the volume.
653
+ */
654
+ id?: string;
655
+ /**
656
+ * Force the Instance to boot on this volume.
657
+ */
658
+ boot?: boolean;
659
+ /**
660
+ * Name of the volume.
661
+ */
662
+ name?: string;
663
+ /**
664
+ * Disk size of the volume, must be a multiple of 512.
665
+ */
666
+ size?: number;
667
+ /**
668
+ * Type of the volume.
669
+ */
670
+ volumeType: VolumeVolumeType;
671
+ /**
672
+ * ID of the snapshot on which this volume will be based.
673
+ */
674
+ baseSnapshot?: string;
675
+ /**
676
+ * Organization ID of the volume.
677
+ */
678
+ organization?: string;
679
+ /**
680
+ * Project ID of the volume.
681
+ */
682
+ project?: string;
683
+ }
684
+ export interface Snapshot {
685
+ /**
686
+ * Snapshot ID.
687
+ */
688
+ id: string;
689
+ /**
690
+ * Snapshot name.
691
+ */
692
+ name: string;
693
+ /**
694
+ * Snapshot Organization ID.
695
+ */
696
+ organization: string;
697
+ /**
698
+ * Snapshot Project ID.
699
+ */
700
+ project: string;
701
+ /**
702
+ * Snapshot tags.
703
+ */
704
+ tags: string[];
705
+ /**
706
+ * Snapshot volume type.
707
+ */
708
+ volumeType: VolumeVolumeType;
709
+ /**
710
+ * Snapshot size.
711
+ */
712
+ size: number;
713
+ /**
714
+ * Snapshot state.
715
+ */
716
+ state: SnapshotState;
717
+ /**
718
+ * Volume on which the snapshot is based on.
719
+ */
720
+ baseVolume?: SnapshotBaseVolume;
721
+ /**
722
+ * Snapshot creation date.
723
+ */
724
+ creationDate?: Date;
725
+ /**
726
+ * Snapshot modification date.
727
+ */
728
+ modificationDate?: Date;
729
+ /**
730
+ * Snapshot zone.
731
+ */
732
+ zone: ScwZone;
733
+ /**
734
+ * Reason for the failed snapshot import.
735
+ */
736
+ errorReason?: string;
737
+ }
738
+ export interface Task {
739
+ /**
740
+ * Unique ID of the task.
741
+ */
742
+ id: string;
743
+ /**
744
+ * Description of the task.
745
+ */
746
+ description: string;
747
+ /**
748
+ * Progress of the task in percent.
749
+ */
750
+ progress: number;
751
+ /**
752
+ * Task start date.
753
+ */
754
+ startedAt?: Date;
755
+ /**
756
+ * Task end date.
757
+ */
758
+ terminatedAt?: Date;
759
+ /**
760
+ * Task status.
761
+ */
762
+ status: TaskStatus;
763
+ hrefFrom: string;
764
+ hrefResult: string;
765
+ /**
766
+ * Zone in which the task is executed.
767
+ */
768
+ zone: ScwZone;
769
+ }
770
+ export interface Dashboard {
771
+ volumesCount: number;
772
+ runningServersCount: number;
773
+ serversByTypes: Record<string, number>;
774
+ imagesCount: number;
775
+ snapshotsCount: number;
776
+ serversCount: number;
777
+ ipsCount: number;
778
+ securityGroupsCount: number;
779
+ ipsUnused: number;
780
+ volumesLSsdCount: number;
781
+ /**
782
+ * @deprecated
783
+ */
784
+ volumesBSsdCount?: number;
785
+ volumesLSsdTotalSize: number;
786
+ /**
787
+ * @deprecated
788
+ */
789
+ volumesBSsdTotalSize?: number;
790
+ privateNicsCount: number;
791
+ placementGroupsCount: number;
792
+ }
793
+ export interface PlacementGroupServer {
794
+ /**
795
+ * Instance UUID.
796
+ */
797
+ id: string;
798
+ /**
799
+ * Instance name.
800
+ */
801
+ name: string;
802
+ /**
803
+ * Defines whether the placement group policy is respected (either 1 or 0).
804
+ */
805
+ policyRespected: boolean;
806
+ }
807
+ export interface GetServerTypesAvailabilityResponseAvailability {
808
+ availability: ServerTypesAvailability;
809
+ }
810
+ export interface ServerType {
811
+ /**
812
+ * @deprecated Estimated monthly price, for a 30 days month, in Euro.
813
+ */
814
+ monthlyPrice?: number;
815
+ /**
816
+ * Hourly price in Euro.
817
+ */
818
+ hourlyPrice: number;
819
+ /**
820
+ * Alternative Instance name, if any.
821
+ */
822
+ altNames: string[];
823
+ /**
824
+ * Additional volume constraints.
825
+ */
826
+ perVolumeConstraint?: ServerTypeVolumeConstraintsByType;
827
+ /**
828
+ * Initial volume constraints.
829
+ */
830
+ volumesConstraint?: ServerTypeVolumeConstraintSizes;
831
+ /**
832
+ * Number of CPU.
833
+ */
834
+ ncpus: number;
835
+ /**
836
+ * Number of GPU.
837
+ */
838
+ gpu?: number;
839
+ /**
840
+ * Available RAM in bytes.
841
+ */
842
+ ram: number;
843
+ /**
844
+ * GPU information.
845
+ */
846
+ gpuInfo?: ServerTypeGPUInfo;
847
+ /**
848
+ * CPU architecture.
849
+ */
850
+ arch: Arch;
851
+ /**
852
+ * Network available for the Instance.
853
+ */
854
+ network?: ServerTypeNetwork;
855
+ /**
856
+ * Capabilities.
857
+ */
858
+ capabilities?: ServerTypeCapabilities;
859
+ /**
860
+ * Maximum available scratch storage.
861
+ */
862
+ scratchStorageMaxSize?: number;
863
+ /**
864
+ * The maximum bandwidth allocated to block storage access (in bytes per second).
865
+ */
866
+ blockBandwidth?: number;
867
+ /**
868
+ * True if this Instance type has reached end of service.
869
+ */
870
+ endOfService: boolean;
871
+ }
872
+ export interface VolumeType {
873
+ displayName: string;
874
+ capabilities?: VolumeTypeCapabilities;
875
+ constraints?: VolumeTypeConstraints;
876
+ }
877
+ export interface ServerActionRequestVolumeBackupTemplate {
878
+ /**
879
+ * Overrides the `volume_type` of the snapshot for this volume.
880
+ If omitted, the volume type of the original volume will be used.
881
+ */
882
+ volumeType: SnapshotVolumeType;
883
+ }
884
+ export interface SetSecurityGroupRulesRequestRule {
885
+ /**
886
+ * UUID of the security rule to update. If no value is provided, a new rule will be created.
887
+ */
888
+ id?: string;
889
+ /**
890
+ * Action to apply when the rule matches a packet.
891
+ */
892
+ action: SecurityGroupRuleAction;
893
+ /**
894
+ * Protocol family this rule applies to.
895
+ */
896
+ protocol: SecurityGroupRuleProtocol;
897
+ /**
898
+ * Direction the rule applies to.
899
+ */
900
+ direction: SecurityGroupRuleDirection;
901
+ /**
902
+ * Range of IP addresses these rules apply to.
903
+ */
904
+ ipRange: string;
905
+ /**
906
+ * Beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY.
907
+ */
908
+ destPortFrom?: number;
909
+ /**
910
+ * End of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from.
911
+ */
912
+ destPortTo?: number;
913
+ /**
914
+ * Position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined.
915
+ */
916
+ position: number;
917
+ /**
918
+ * Indicates if this rule is editable. Rules with the value false will be ignored.
919
+ */
920
+ editable?: boolean;
921
+ /**
922
+ * Zone of the rule. This field is ignored.
923
+ */
924
+ zone?: ScwZone;
925
+ }
926
+ export interface VolumeImageUpdateTemplate {
927
+ /**
928
+ * UUID of the snapshot.
929
+ */
930
+ id: string;
931
+ }
932
+ export interface SecurityGroupTemplate {
933
+ id: string;
934
+ name: string;
935
+ }
936
+ export type ApplyBlockMigrationRequest = {
937
+ /**
938
+ * Zone to target. If none is passed will use default zone from the config.
939
+ */
940
+ zone?: ScwZone;
941
+ /**
942
+ * The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
943
+ *
944
+ * One-of ('resource'): at most one of 'volumeId', 'snapshotId' could be set.
945
+ */
946
+ volumeId?: string;
947
+ /**
948
+ * The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
949
+ *
950
+ * One-of ('resource'): at most one of 'volumeId', 'snapshotId' could be set.
951
+ */
952
+ snapshotId?: string;
953
+ /**
954
+ * A value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
955
+ */
956
+ validationKey: string;
957
+ };
958
+ export type AttachServerFileSystemRequest = {
959
+ /**
960
+ * Zone to target. If none is passed will use default zone from the config.
961
+ */
962
+ zone?: ScwZone;
963
+ serverId: string;
964
+ filesystemId: string;
965
+ };
966
+ export interface AttachServerFileSystemResponse {
967
+ server?: Server;
968
+ }
969
+ export type AttachServerVolumeRequest = {
970
+ /**
971
+ * Zone to target. If none is passed will use default zone from the config.
972
+ */
973
+ zone?: ScwZone;
974
+ serverId: string;
975
+ volumeId: string;
976
+ volumeType?: AttachServerVolumeRequestVolumeType;
977
+ boot?: boolean;
978
+ };
979
+ export interface AttachServerVolumeResponse {
980
+ server?: Server;
981
+ }
982
+ export type CheckBlockMigrationOrganizationQuotasRequest = {
983
+ /**
984
+ * Zone to target. If none is passed will use default zone from the config.
985
+ */
986
+ zone?: ScwZone;
987
+ organization?: string;
988
+ };
989
+ export type CreateImageRequest = {
990
+ /**
991
+ * Zone to target. If none is passed will use default zone from the config.
992
+ */
993
+ zone?: ScwZone;
994
+ /**
995
+ * Name of the image.
996
+ */
997
+ name?: string;
998
+ /**
999
+ * UUID of the snapshot.
1000
+ */
1001
+ rootVolume: string;
1002
+ /**
1003
+ * Architecture of the image.
1004
+ */
1005
+ arch: Arch;
1006
+ /**
1007
+ * Additional volumes of the image.
1008
+ */
1009
+ extraVolumes?: Record<string, VolumeTemplate>;
1010
+ /**
1011
+ * @deprecated Organization ID of the image.
1012
+ *
1013
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1014
+ */
1015
+ organization?: string;
1016
+ /**
1017
+ * Project ID of the image.
1018
+ *
1019
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1020
+ */
1021
+ project?: string;
1022
+ /**
1023
+ * Tags of the image.
1024
+ */
1025
+ tags?: string[];
1026
+ /**
1027
+ * True to create a public image.
1028
+ */
1029
+ public?: boolean;
1030
+ };
1031
+ export interface CreateImageResponse {
1032
+ image?: Image;
1033
+ }
1034
+ export type CreateIpRequest = {
1035
+ /**
1036
+ * Zone to target. If none is passed will use default zone from the config.
1037
+ */
1038
+ zone?: ScwZone;
1039
+ /**
1040
+ * @deprecated Organization ID in which the IP is reserved.
1041
+ *
1042
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1043
+ */
1044
+ organization?: string;
1045
+ /**
1046
+ * Project ID in which the IP is reserved.
1047
+ *
1048
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1049
+ */
1050
+ project?: string;
1051
+ /**
1052
+ * Tags of the IP.
1053
+ */
1054
+ tags?: string[];
1055
+ /**
1056
+ * UUID of the Instance you want to attach the IP to.
1057
+ */
1058
+ server?: string;
1059
+ /**
1060
+ * IP type to reserve (either 'routed_ipv4' or 'routed_ipv6').
1061
+ */
1062
+ type?: IpType;
1063
+ };
1064
+ export interface CreateIpResponse {
1065
+ ip?: Ip;
1066
+ }
1067
+ export type CreatePlacementGroupRequest = {
1068
+ /**
1069
+ * Zone to target. If none is passed will use default zone from the config.
1070
+ */
1071
+ zone?: ScwZone;
1072
+ /**
1073
+ * Name of the placement group.
1074
+ */
1075
+ name?: string;
1076
+ /**
1077
+ * @deprecated Organization ID of the placement group.
1078
+ *
1079
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1080
+ */
1081
+ organization?: string;
1082
+ /**
1083
+ * Project ID of the placement group.
1084
+ *
1085
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1086
+ */
1087
+ project?: string;
1088
+ /**
1089
+ * Tags of the placement group.
1090
+ */
1091
+ tags?: string[];
1092
+ /**
1093
+ * Operating mode of the placement group.
1094
+ */
1095
+ policyMode?: PlacementGroupPolicyMode;
1096
+ /**
1097
+ * Policy type of the placement group.
1098
+ */
1099
+ policyType?: PlacementGroupPolicyType;
1100
+ };
1101
+ export interface CreatePlacementGroupResponse {
1102
+ placementGroup?: PlacementGroup;
1103
+ }
1104
+ export type CreatePrivateNICRequest = {
1105
+ /**
1106
+ * Zone to target. If none is passed will use default zone from the config.
1107
+ */
1108
+ zone?: ScwZone;
1109
+ /**
1110
+ * UUID of the Instance the private NIC will be attached to.
1111
+ */
1112
+ serverId: string;
1113
+ /**
1114
+ * UUID of the private network where the private NIC will be attached.
1115
+ */
1116
+ privateNetworkId: string;
1117
+ /**
1118
+ * Private NIC tags.
1119
+ */
1120
+ tags?: string[];
1121
+ /**
1122
+ * @deprecated Ip_ids defined from IPAM.
1123
+ */
1124
+ ipIds?: string[];
1125
+ /**
1126
+ * UUID of IPAM ips, to be attached to the instance in the requested private network.
1127
+ */
1128
+ ipamIpIds?: string[];
1129
+ };
1130
+ export interface CreatePrivateNICResponse {
1131
+ privateNic?: PrivateNIC;
1132
+ }
1133
+ export type CreateSecurityGroupRequest = {
1134
+ /**
1135
+ * Zone to target. If none is passed will use default zone from the config.
1136
+ */
1137
+ zone?: ScwZone;
1138
+ /**
1139
+ * Name of the security group.
1140
+ */
1141
+ name?: string;
1142
+ /**
1143
+ * Description of the security group.
1144
+ */
1145
+ description: string;
1146
+ /**
1147
+ * @deprecated Organization ID the security group belongs to.
1148
+ *
1149
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1150
+ */
1151
+ organization?: string;
1152
+ /**
1153
+ * Project ID the security group belong to.
1154
+ *
1155
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1156
+ */
1157
+ project?: string;
1158
+ /**
1159
+ * Tags of the security group.
1160
+ */
1161
+ tags?: string[];
1162
+ /**
1163
+ * @deprecated Defines whether this security group becomes the default security group for new Instances.
1164
+ *
1165
+ * One-of ('defaultIdentifier'): at most one of 'organizationDefault', 'projectDefault' could be set.
1166
+ */
1167
+ organizationDefault?: boolean;
1168
+ /**
1169
+ * Whether this security group becomes the default security group for new Instances.
1170
+ *
1171
+ * One-of ('defaultIdentifier'): at most one of 'organizationDefault', 'projectDefault' could be set.
1172
+ */
1173
+ projectDefault?: boolean;
1174
+ /**
1175
+ * Whether the security group is stateful or not.
1176
+ */
1177
+ stateful: boolean;
1178
+ /**
1179
+ * Default policy for inbound rules.
1180
+ */
1181
+ inboundDefaultPolicy?: SecurityGroupPolicy;
1182
+ /**
1183
+ * Default policy for outbound rules.
1184
+ */
1185
+ outboundDefaultPolicy?: SecurityGroupPolicy;
1186
+ /**
1187
+ * True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
1188
+ */
1189
+ enableDefaultSecurity?: boolean;
1190
+ };
1191
+ export interface CreateSecurityGroupResponse {
1192
+ securityGroup?: SecurityGroup;
1193
+ }
1194
+ export type CreateSecurityGroupRuleRequest = {
1195
+ /**
1196
+ * Zone to target. If none is passed will use default zone from the config.
1197
+ */
1198
+ zone?: ScwZone;
1199
+ /**
1200
+ * UUID of the security group.
1201
+ */
1202
+ securityGroupId: string;
1203
+ protocol: SecurityGroupRuleProtocol;
1204
+ direction: SecurityGroupRuleDirection;
1205
+ action: SecurityGroupRuleAction;
1206
+ ipRange: string;
1207
+ /**
1208
+ * Beginning of the range of ports to apply this rule to (inclusive).
1209
+ */
1210
+ destPortFrom?: number;
1211
+ /**
1212
+ * End of the range of ports to apply this rule to (inclusive).
1213
+ */
1214
+ destPortTo?: number;
1215
+ /**
1216
+ * Position of this rule in the security group rules list.
1217
+ */
1218
+ position: number;
1219
+ /**
1220
+ * Indicates if this rule is editable (will be ignored).
1221
+ */
1222
+ editable: boolean;
1223
+ };
1224
+ export interface CreateSecurityGroupRuleResponse {
1225
+ rule?: SecurityGroupRule;
1226
+ }
1227
+ export type CreateServerRequest = {
1228
+ /**
1229
+ * Zone to target. If none is passed will use default zone from the config.
1230
+ */
1231
+ zone?: ScwZone;
1232
+ /**
1233
+ * Instance name.
1234
+ */
1235
+ name?: string;
1236
+ /**
1237
+ * Define if a dynamic IPv4 is required for the Instance.
1238
+ */
1239
+ dynamicIpRequired?: boolean;
1240
+ /**
1241
+ * @deprecated If true, configure the Instance so it uses the new routed IP mode.
1242
+ */
1243
+ routedIpEnabled?: boolean;
1244
+ /**
1245
+ * Define the Instance commercial type (i.e. GP1-S).
1246
+ */
1247
+ commercialType: string;
1248
+ /**
1249
+ * Instance image ID or label.
1250
+ */
1251
+ image?: string;
1252
+ /**
1253
+ * Volumes attached to the server.
1254
+ */
1255
+ volumes?: Record<string, VolumeServerTemplate>;
1256
+ /**
1257
+ * @deprecated True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`).
1258
+ */
1259
+ enableIpv6?: boolean;
1260
+ /**
1261
+ * @deprecated ID of the reserved IP to attach to the Instance.
1262
+ */
1263
+ publicIp?: string;
1264
+ /**
1265
+ * A list of reserved IP IDs to attach to the Instance.
1266
+ */
1267
+ publicIps?: string[];
1268
+ /**
1269
+ * Boot type to use.
1270
+ */
1271
+ bootType?: BootType;
1272
+ /**
1273
+ * @deprecated Instance Organization ID.
1274
+ *
1275
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1276
+ */
1277
+ organization?: string;
1278
+ /**
1279
+ * Instance Project ID.
1280
+ *
1281
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1282
+ */
1283
+ project?: string;
1284
+ /**
1285
+ * Instance tags.
1286
+ */
1287
+ tags?: string[];
1288
+ /**
1289
+ * Security group ID.
1290
+ */
1291
+ securityGroup?: string;
1292
+ /**
1293
+ * Placement group ID if Instance must be part of a placement group.
1294
+ */
1295
+ placementGroup?: string;
1296
+ /**
1297
+ * The public_key value of this key is used to encrypt the admin password.
1298
+ */
1299
+ adminPasswordEncryptionSshKeyId?: string;
1300
+ /**
1301
+ * True to activate server protection option.
1302
+ */
1303
+ protected: boolean;
1304
+ };
1305
+ export interface CreateServerResponse {
1306
+ server?: Server;
1307
+ }
1308
+ export type CreateSnapshotRequest = {
1309
+ /**
1310
+ * Zone to target. If none is passed will use default zone from the config.
1311
+ */
1312
+ zone?: ScwZone;
1313
+ /**
1314
+ * Name of the snapshot.
1315
+ */
1316
+ name?: string;
1317
+ /**
1318
+ * UUID of the volume.
1319
+ */
1320
+ volumeId?: string;
1321
+ /**
1322
+ * Tags of the snapshot.
1323
+ */
1324
+ tags?: string[];
1325
+ /**
1326
+ * @deprecated Organization ID of the snapshot.
1327
+ *
1328
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1329
+ */
1330
+ organization?: string;
1331
+ /**
1332
+ * Project ID of the snapshot.
1333
+ *
1334
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1335
+ */
1336
+ project?: string;
1337
+ /**
1338
+ * Overrides the volume_type of the snapshot.
1339
+ If omitted, the volume type of the original volume will be used.
1340
+ */
1341
+ volumeType?: SnapshotVolumeType;
1342
+ /**
1343
+ * Bucket name for snapshot imports.
1344
+ */
1345
+ bucket?: string;
1346
+ /**
1347
+ * Object key for snapshot imports.
1348
+ */
1349
+ key?: string;
1350
+ /**
1351
+ * Imported snapshot size, must be a multiple of 512.
1352
+ */
1353
+ size?: number;
1354
+ };
1355
+ export interface CreateSnapshotResponse {
1356
+ snapshot?: Snapshot;
1357
+ task?: Task;
1358
+ }
1359
+ export type CreateVolumeRequest = {
1360
+ /**
1361
+ * Zone to target. If none is passed will use default zone from the config.
1362
+ */
1363
+ zone?: ScwZone;
1364
+ /**
1365
+ * Volume name.
1366
+ */
1367
+ name?: string;
1368
+ /**
1369
+ * @deprecated Volume Organization ID.
1370
+ *
1371
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1372
+ */
1373
+ organization?: string;
1374
+ /**
1375
+ * Volume Project ID.
1376
+ *
1377
+ * One-of ('projectIdentifier'): at most one of 'project', 'organization' could be set.
1378
+ */
1379
+ project?: string;
1380
+ /**
1381
+ * Volume tags.
1382
+ */
1383
+ tags?: string[];
1384
+ /**
1385
+ * Volume type.
1386
+ */
1387
+ volumeType?: VolumeVolumeType;
1388
+ /**
1389
+ * Volume disk size, must be a multiple of 512.
1390
+ *
1391
+ * One-of ('from'): at most one of 'size', 'baseSnapshot' could be set.
1392
+ */
1393
+ size?: number;
1394
+ /**
1395
+ * ID of the snapshot on which this volume will be based.
1396
+ *
1397
+ * One-of ('from'): at most one of 'size', 'baseSnapshot' could be set.
1398
+ */
1399
+ baseSnapshot?: string;
1400
+ };
1401
+ export interface CreateVolumeResponse {
1402
+ volume?: Volume;
1403
+ }
1404
+ export type DeleteImageRequest = {
1405
+ /**
1406
+ * Zone to target. If none is passed will use default zone from the config.
1407
+ */
1408
+ zone?: ScwZone;
1409
+ /**
1410
+ * UUID of the image you want to delete.
1411
+ */
1412
+ imageId: string;
1413
+ };
1414
+ export type DeleteIpRequest = {
1415
+ /**
1416
+ * Zone to target. If none is passed will use default zone from the config.
1417
+ */
1418
+ zone?: ScwZone;
1419
+ /**
1420
+ * ID or address of the IP to delete.
1421
+ */
1422
+ ip: string;
1423
+ };
1424
+ export type DeletePlacementGroupRequest = {
1425
+ /**
1426
+ * Zone to target. If none is passed will use default zone from the config.
1427
+ */
1428
+ zone?: ScwZone;
1429
+ /**
1430
+ * UUID of the placement group you want to delete.
1431
+ */
1432
+ placementGroupId: string;
1433
+ };
1434
+ export type DeletePrivateNICRequest = {
1435
+ /**
1436
+ * Zone to target. If none is passed will use default zone from the config.
1437
+ */
1438
+ zone?: ScwZone;
1439
+ /**
1440
+ * Instance to which the private NIC is attached.
1441
+ */
1442
+ serverId: string;
1443
+ /**
1444
+ * Private NIC unique ID.
1445
+ */
1446
+ privateNicId: string;
1447
+ };
1448
+ export type DeleteSecurityGroupRequest = {
1449
+ /**
1450
+ * Zone to target. If none is passed will use default zone from the config.
1451
+ */
1452
+ zone?: ScwZone;
1453
+ /**
1454
+ * UUID of the security group you want to delete.
1455
+ */
1456
+ securityGroupId: string;
1457
+ };
1458
+ export type DeleteSecurityGroupRuleRequest = {
1459
+ /**
1460
+ * Zone to target. If none is passed will use default zone from the config.
1461
+ */
1462
+ zone?: ScwZone;
1463
+ securityGroupId: string;
1464
+ securityGroupRuleId: string;
1465
+ };
1466
+ export type DeleteServerRequest = {
1467
+ /**
1468
+ * Zone to target. If none is passed will use default zone from the config.
1469
+ */
1470
+ zone?: ScwZone;
1471
+ serverId: string;
1472
+ };
1473
+ export type DeleteServerUserDataRequest = {
1474
+ /**
1475
+ * Zone to target. If none is passed will use default zone from the config.
1476
+ */
1477
+ zone?: ScwZone;
1478
+ /**
1479
+ * UUID of the Instance.
1480
+ */
1481
+ serverId: string;
1482
+ /**
1483
+ * Key of the user data to delete.
1484
+ */
1485
+ key: string;
1486
+ };
1487
+ export type DeleteSnapshotRequest = {
1488
+ /**
1489
+ * Zone to target. If none is passed will use default zone from the config.
1490
+ */
1491
+ zone?: ScwZone;
1492
+ /**
1493
+ * UUID of the snapshot you want to delete.
1494
+ */
1495
+ snapshotId: string;
1496
+ };
1497
+ export type DeleteVolumeRequest = {
1498
+ /**
1499
+ * Zone to target. If none is passed will use default zone from the config.
1500
+ */
1501
+ zone?: ScwZone;
1502
+ /**
1503
+ * UUID of the volume you want to delete.
1504
+ */
1505
+ volumeId: string;
1506
+ };
1507
+ export type DetachServerFileSystemRequest = {
1508
+ /**
1509
+ * Zone to target. If none is passed will use default zone from the config.
1510
+ */
1511
+ zone?: ScwZone;
1512
+ serverId: string;
1513
+ filesystemId: string;
1514
+ };
1515
+ export interface DetachServerFileSystemResponse {
1516
+ server?: Server;
1517
+ }
1518
+ export type DetachServerVolumeRequest = {
1519
+ /**
1520
+ * Zone to target. If none is passed will use default zone from the config.
1521
+ */
1522
+ zone?: ScwZone;
1523
+ serverId: string;
1524
+ volumeId: string;
1525
+ };
1526
+ export interface DetachServerVolumeResponse {
1527
+ server?: Server;
1528
+ }
1529
+ export type ExportSnapshotRequest = {
1530
+ /**
1531
+ * Zone to target. If none is passed will use default zone from the config.
1532
+ */
1533
+ zone?: ScwZone;
1534
+ /**
1535
+ * Snapshot ID.
1536
+ */
1537
+ snapshotId: string;
1538
+ /**
1539
+ * Object Storage bucket name.
1540
+ */
1541
+ bucket: string;
1542
+ /**
1543
+ * Object key.
1544
+ */
1545
+ key: string;
1546
+ };
1547
+ export interface ExportSnapshotResponse {
1548
+ task?: Task;
1549
+ }
1550
+ export type GetDashboardRequest = {
1551
+ /**
1552
+ * Zone to target. If none is passed will use default zone from the config.
1553
+ */
1554
+ zone?: ScwZone;
1555
+ organization?: string;
1556
+ project?: string;
1557
+ };
1558
+ export interface GetDashboardResponse {
1559
+ dashboard?: Dashboard;
1560
+ }
1561
+ export type GetImageRequest = {
1562
+ /**
1563
+ * Zone to target. If none is passed will use default zone from the config.
1564
+ */
1565
+ zone?: ScwZone;
1566
+ /**
1567
+ * UUID of the image you want to get.
1568
+ */
1569
+ imageId: string;
1570
+ };
1571
+ export interface GetImageResponse {
1572
+ image?: Image;
1573
+ }
1574
+ export type GetIpRequest = {
1575
+ /**
1576
+ * Zone to target. If none is passed will use default zone from the config.
1577
+ */
1578
+ zone?: ScwZone;
1579
+ /**
1580
+ * IP ID or address to get.
1581
+ */
1582
+ ip: string;
1583
+ };
1584
+ export interface GetIpResponse {
1585
+ ip?: Ip;
1586
+ }
1587
+ export type GetPlacementGroupRequest = {
1588
+ /**
1589
+ * Zone to target. If none is passed will use default zone from the config.
1590
+ */
1591
+ zone?: ScwZone;
1592
+ /**
1593
+ * UUID of the placement group you want to get.
1594
+ */
1595
+ placementGroupId: string;
1596
+ };
1597
+ export interface GetPlacementGroupResponse {
1598
+ placementGroup?: PlacementGroup;
1599
+ }
1600
+ export type GetPlacementGroupServersRequest = {
1601
+ /**
1602
+ * Zone to target. If none is passed will use default zone from the config.
1603
+ */
1604
+ zone?: ScwZone;
1605
+ /**
1606
+ * UUID of the placement group you want to get.
1607
+ */
1608
+ placementGroupId: string;
1609
+ };
1610
+ export interface GetPlacementGroupServersResponse {
1611
+ /**
1612
+ * Instances attached to the placement group.
1613
+ */
1614
+ servers: PlacementGroupServer[];
1615
+ }
1616
+ export type GetPrivateNICRequest = {
1617
+ /**
1618
+ * Zone to target. If none is passed will use default zone from the config.
1619
+ */
1620
+ zone?: ScwZone;
1621
+ /**
1622
+ * Instance to which the private NIC is attached.
1623
+ */
1624
+ serverId: string;
1625
+ /**
1626
+ * Private NIC unique ID.
1627
+ */
1628
+ privateNicId: string;
1629
+ };
1630
+ export interface GetPrivateNICResponse {
1631
+ privateNic?: PrivateNIC;
1632
+ }
1633
+ export type GetSecurityGroupRequest = {
1634
+ /**
1635
+ * Zone to target. If none is passed will use default zone from the config.
1636
+ */
1637
+ zone?: ScwZone;
1638
+ /**
1639
+ * UUID of the security group you want to get.
1640
+ */
1641
+ securityGroupId: string;
1642
+ };
1643
+ export interface GetSecurityGroupResponse {
1644
+ securityGroup?: SecurityGroup;
1645
+ }
1646
+ export type GetSecurityGroupRuleRequest = {
1647
+ /**
1648
+ * Zone to target. If none is passed will use default zone from the config.
1649
+ */
1650
+ zone?: ScwZone;
1651
+ securityGroupId: string;
1652
+ securityGroupRuleId: string;
1653
+ };
1654
+ export interface GetSecurityGroupRuleResponse {
1655
+ rule?: SecurityGroupRule;
1656
+ }
1657
+ export type GetServerCompatibleTypesRequest = {
1658
+ /**
1659
+ * Zone to target. If none is passed will use default zone from the config.
1660
+ */
1661
+ zone?: ScwZone;
1662
+ /**
1663
+ * UUID of the Instance you want to get.
1664
+ */
1665
+ serverId: string;
1666
+ };
1667
+ export type GetServerRequest = {
1668
+ /**
1669
+ * Zone to target. If none is passed will use default zone from the config.
1670
+ */
1671
+ zone?: ScwZone;
1672
+ /**
1673
+ * UUID of the Instance you want to get.
1674
+ */
1675
+ serverId: string;
1676
+ };
1677
+ export interface GetServerResponse {
1678
+ server?: Server;
1679
+ }
1680
+ export type GetServerTypesAvailabilityRequest = {
1681
+ /**
1682
+ * Zone to target. If none is passed will use default zone from the config.
1683
+ */
1684
+ zone?: ScwZone;
1685
+ /**
1686
+ * A positive integer lower or equal to 100 to select the number of items to return.
1687
+ */
1688
+ perPage?: number;
1689
+ /**
1690
+ * A positive integer to choose the page to return.
1691
+ */
1692
+ page?: number;
1693
+ };
1694
+ export interface GetServerTypesAvailabilityResponse {
1695
+ /**
1696
+ * Map of server types.
1697
+ */
1698
+ servers: Record<string, GetServerTypesAvailabilityResponseAvailability>;
1699
+ totalCount: number;
1700
+ }
1701
+ export type GetSnapshotRequest = {
1702
+ /**
1703
+ * Zone to target. If none is passed will use default zone from the config.
1704
+ */
1705
+ zone?: ScwZone;
1706
+ /**
1707
+ * UUID of the snapshot you want to get.
1708
+ */
1709
+ snapshotId: string;
1710
+ };
1711
+ export interface GetSnapshotResponse {
1712
+ snapshot?: Snapshot;
1713
+ }
1714
+ export type GetVolumeRequest = {
1715
+ /**
1716
+ * Zone to target. If none is passed will use default zone from the config.
1717
+ */
1718
+ zone?: ScwZone;
1719
+ /**
1720
+ * UUID of the volume you want to get.
1721
+ */
1722
+ volumeId: string;
1723
+ };
1724
+ export interface GetVolumeResponse {
1725
+ volume?: Volume;
1726
+ }
1727
+ export type ListDefaultSecurityGroupRulesRequest = {
1728
+ /**
1729
+ * Zone to target. If none is passed will use default zone from the config.
1730
+ */
1731
+ zone?: ScwZone;
1732
+ };
1733
+ export type ListImagesRequest = {
1734
+ /**
1735
+ * Zone to target. If none is passed will use default zone from the config.
1736
+ */
1737
+ zone?: ScwZone;
1738
+ organization?: string;
1739
+ perPage?: number;
1740
+ page?: number;
1741
+ name?: string;
1742
+ public?: boolean;
1743
+ arch?: string;
1744
+ project?: string;
1745
+ tags?: string;
1746
+ };
1747
+ export interface ListImagesResponse {
1748
+ /**
1749
+ * Total number of images.
1750
+ */
1751
+ totalCount: number;
1752
+ /**
1753
+ * List of images.
1754
+ */
1755
+ images: Image[];
1756
+ }
1757
+ export type ListIpsRequest = {
1758
+ /**
1759
+ * Zone to target. If none is passed will use default zone from the config.
1760
+ */
1761
+ zone?: ScwZone;
1762
+ /**
1763
+ * Project ID in which the IPs are reserved.
1764
+ */
1765
+ project?: string;
1766
+ /**
1767
+ * Organization ID in which the IPs are reserved.
1768
+ */
1769
+ organization?: string;
1770
+ /**
1771
+ * Filter IPs with these exact tags (to filter with several tags, use commas to separate them).
1772
+ */
1773
+ tags?: string[];
1774
+ /**
1775
+ * Filter on the IP address (Works as a LIKE operation on the IP address).
1776
+ */
1777
+ name?: string;
1778
+ /**
1779
+ * A positive integer lower or equal to 100 to select the number of items to return.
1780
+ */
1781
+ perPage?: number;
1782
+ /**
1783
+ * A positive integer to choose the page to return.
1784
+ */
1785
+ page?: number;
1786
+ /**
1787
+ * Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4' or 'routed_ipv6').
1788
+ */
1789
+ type?: string;
1790
+ };
1791
+ export interface ListIpsResponse {
1792
+ /**
1793
+ * Total number of ips.
1794
+ */
1795
+ totalCount: number;
1796
+ /**
1797
+ * List of ips.
1798
+ */
1799
+ ips: Ip[];
1800
+ }
1801
+ export type ListPlacementGroupsRequest = {
1802
+ /**
1803
+ * Zone to target. If none is passed will use default zone from the config.
1804
+ */
1805
+ zone?: ScwZone;
1806
+ /**
1807
+ * A positive integer lower or equal to 100 to select the number of items to return.
1808
+ */
1809
+ perPage?: number;
1810
+ /**
1811
+ * A positive integer to choose the page to return.
1812
+ */
1813
+ page?: number;
1814
+ /**
1815
+ * List only placement groups of this Organization ID.
1816
+ */
1817
+ organization?: string;
1818
+ /**
1819
+ * List only placement groups of this Project ID.
1820
+ */
1821
+ project?: string;
1822
+ /**
1823
+ * List placement groups with these exact tags (to filter with several tags, use commas to separate them).
1824
+ */
1825
+ tags?: string[];
1826
+ /**
1827
+ * Filter placement groups by name (for eg. "cluster1" will return "cluster100" and "cluster1" but not "foo").
1828
+ */
1829
+ name?: string;
1830
+ };
1831
+ export interface ListPlacementGroupsResponse {
1832
+ /**
1833
+ * Total number of placement groups.
1834
+ */
1835
+ totalCount: number;
1836
+ /**
1837
+ * List of placement groups.
1838
+ */
1839
+ placementGroups: PlacementGroup[];
1840
+ }
1841
+ export type ListPrivateNICsRequest = {
1842
+ /**
1843
+ * Zone to target. If none is passed will use default zone from the config.
1844
+ */
1845
+ zone?: ScwZone;
1846
+ /**
1847
+ * Instance to which the private NIC is attached.
1848
+ */
1849
+ serverId: string;
1850
+ /**
1851
+ * Private NIC tags.
1852
+ */
1853
+ tags?: string[];
1854
+ /**
1855
+ * A positive integer lower or equal to 100 to select the number of items to return.
1856
+ */
1857
+ perPage?: number;
1858
+ /**
1859
+ * A positive integer to choose the page to return.
1860
+ */
1861
+ page?: number;
1862
+ };
1863
+ export interface ListPrivateNICsResponse {
1864
+ privateNics: PrivateNIC[];
1865
+ totalCount: number;
1866
+ }
1867
+ export type ListSecurityGroupRulesRequest = {
1868
+ /**
1869
+ * Zone to target. If none is passed will use default zone from the config.
1870
+ */
1871
+ zone?: ScwZone;
1872
+ /**
1873
+ * UUID of the security group.
1874
+ */
1875
+ securityGroupId: string;
1876
+ /**
1877
+ * A positive integer lower or equal to 100 to select the number of items to return.
1878
+ */
1879
+ perPage?: number;
1880
+ /**
1881
+ * A positive integer to choose the page to return.
1882
+ */
1883
+ page?: number;
1884
+ };
1885
+ export interface ListSecurityGroupRulesResponse {
1886
+ /**
1887
+ * Total number of security groups.
1888
+ */
1889
+ totalCount: number;
1890
+ /**
1891
+ * List of security rules.
1892
+ */
1893
+ rules: SecurityGroupRule[];
1894
+ }
1895
+ export type ListSecurityGroupsRequest = {
1896
+ /**
1897
+ * Zone to target. If none is passed will use default zone from the config.
1898
+ */
1899
+ zone?: ScwZone;
1900
+ /**
1901
+ * Name of the security group.
1902
+ */
1903
+ name?: string;
1904
+ /**
1905
+ * Security group Organization ID.
1906
+ */
1907
+ organization?: string;
1908
+ /**
1909
+ * Security group Project ID.
1910
+ */
1911
+ project?: string;
1912
+ /**
1913
+ * List security groups with these exact tags (to filter with several tags, use commas to separate them).
1914
+ */
1915
+ tags?: string[];
1916
+ /**
1917
+ * Filter security groups with this value for project_default.
1918
+ */
1919
+ projectDefault?: boolean;
1920
+ /**
1921
+ * A positive integer lower or equal to 100 to select the number of items to return.
1922
+ */
1923
+ perPage?: number;
1924
+ /**
1925
+ * A positive integer to choose the page to return.
1926
+ */
1927
+ page?: number;
1928
+ };
1929
+ export interface ListSecurityGroupsResponse {
1930
+ /**
1931
+ * Total number of security groups.
1932
+ */
1933
+ totalCount: number;
1934
+ /**
1935
+ * List of security groups.
1936
+ */
1937
+ securityGroups: SecurityGroup[];
1938
+ }
1939
+ export type ListServerActionsRequest = {
1940
+ /**
1941
+ * Zone to target. If none is passed will use default zone from the config.
1942
+ */
1943
+ zone?: ScwZone;
1944
+ serverId: string;
1945
+ };
1946
+ export interface ListServerActionsResponse {
1947
+ actions: ServerAction[];
1948
+ }
1949
+ export type ListServerUserDataRequest = {
1950
+ /**
1951
+ * Zone to target. If none is passed will use default zone from the config.
1952
+ */
1953
+ zone?: ScwZone;
1954
+ /**
1955
+ * UUID of the Instance.
1956
+ */
1957
+ serverId: string;
1958
+ };
1959
+ export interface ListServerUserDataResponse {
1960
+ userData: string[];
1961
+ }
1962
+ export type ListServersRequest = {
1963
+ /**
1964
+ * Zone to target. If none is passed will use default zone from the config.
1965
+ */
1966
+ zone?: ScwZone;
1967
+ /**
1968
+ * A positive integer lower or equal to 100 to select the number of items to return.
1969
+ */
1970
+ perPage?: number;
1971
+ /**
1972
+ * A positive integer to choose the page to return.
1973
+ */
1974
+ page?: number;
1975
+ /**
1976
+ * List only Instances of this Organization ID.
1977
+ */
1978
+ organization?: string;
1979
+ /**
1980
+ * List only Instances of this Project ID.
1981
+ */
1982
+ project?: string;
1983
+ /**
1984
+ * Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
1985
+ */
1986
+ name?: string;
1987
+ /**
1988
+ * @deprecated List Instances by private_ip.
1989
+ */
1990
+ privateIp?: string;
1991
+ /**
1992
+ * List Instances that are not attached to a public IP.
1993
+ */
1994
+ withoutIp?: boolean;
1995
+ /**
1996
+ * List Instances by IP (both private_ip and public_ip are supported).
1997
+ */
1998
+ withIp?: string;
1999
+ /**
2000
+ * List Instances of this commercial type.
2001
+ */
2002
+ commercialType?: string;
2003
+ /**
2004
+ * List Instances in this state.
2005
+ */
2006
+ state?: ServerState;
2007
+ /**
2008
+ * List Instances with these exact tags (to filter with several tags, use commas to separate them).
2009
+ */
2010
+ tags?: string[];
2011
+ /**
2012
+ * List Instances in this Private Network.
2013
+ */
2014
+ privateNetwork?: string;
2015
+ /**
2016
+ * Define the order of the returned servers.
2017
+ */
2018
+ order?: ListServersRequestOrder;
2019
+ /**
2020
+ * List Instances from the given Private Networks (use commas to separate them).
2021
+ */
2022
+ privateNetworks?: string[];
2023
+ /**
2024
+ * List Instances associated with the given private NIC MAC address.
2025
+ */
2026
+ privateNicMacAddress?: string;
2027
+ /**
2028
+ * List Instances from these server ids (use commas to separate them).
2029
+ */
2030
+ servers?: string[];
2031
+ };
2032
+ export interface ListServersResponse {
2033
+ /**
2034
+ * Total number of Instances.
2035
+ */
2036
+ totalCount: number;
2037
+ /**
2038
+ * List of Instances.
2039
+ */
2040
+ servers: Server[];
2041
+ }
2042
+ export type ListServersTypesRequest = {
2043
+ /**
2044
+ * Zone to target. If none is passed will use default zone from the config.
2045
+ */
2046
+ zone?: ScwZone;
2047
+ perPage?: number;
2048
+ page?: number;
2049
+ };
2050
+ export interface ListServersTypesResponse {
2051
+ /**
2052
+ * Total number of Instance types.
2053
+ */
2054
+ totalCount: number;
2055
+ /**
2056
+ * List of Instance types.
2057
+ */
2058
+ servers: Record<string, ServerType>;
2059
+ }
2060
+ export type ListSnapshotsRequest = {
2061
+ /**
2062
+ * Zone to target. If none is passed will use default zone from the config.
2063
+ */
2064
+ zone?: ScwZone;
2065
+ /**
2066
+ * List snapshots only for this Organization ID.
2067
+ */
2068
+ organization?: string;
2069
+ /**
2070
+ * List snapshots only for this Project ID.
2071
+ */
2072
+ project?: string;
2073
+ /**
2074
+ * Number of snapshots returned per page (positive integer lower or equal to 100).
2075
+ */
2076
+ perPage?: number;
2077
+ /**
2078
+ * Page to be returned.
2079
+ */
2080
+ page?: number;
2081
+ /**
2082
+ * List snapshots of the requested name.
2083
+ */
2084
+ name?: string;
2085
+ /**
2086
+ * List snapshots that have the requested tag.
2087
+ */
2088
+ tags?: string;
2089
+ /**
2090
+ * List snapshots originating only from this volume.
2091
+ */
2092
+ baseVolumeId?: string;
2093
+ };
2094
+ export interface ListSnapshotsResponse {
2095
+ /**
2096
+ * Total number of snapshots.
2097
+ */
2098
+ totalCount: number;
2099
+ /**
2100
+ * List of snapshots.
2101
+ */
2102
+ snapshots: Snapshot[];
2103
+ }
2104
+ export type ListVolumesRequest = {
2105
+ /**
2106
+ * Zone to target. If none is passed will use default zone from the config.
2107
+ */
2108
+ zone?: ScwZone;
2109
+ /**
2110
+ * Filter by volume type.
2111
+ */
2112
+ volumeType?: VolumeVolumeType;
2113
+ /**
2114
+ * A positive integer lower or equal to 100 to select the number of items to return.
2115
+ */
2116
+ perPage?: number;
2117
+ /**
2118
+ * A positive integer to choose the page to return.
2119
+ */
2120
+ page?: number;
2121
+ /**
2122
+ * Filter volume by Organization ID.
2123
+ */
2124
+ organization?: string;
2125
+ /**
2126
+ * Filter volume by Project ID.
2127
+ */
2128
+ project?: string;
2129
+ /**
2130
+ * Filter volumes with these exact tags (to filter with several tags, use commas to separate them).
2131
+ */
2132
+ tags?: string[];
2133
+ /**
2134
+ * Filter volume by name (for eg. "vol" will return "myvolume" but not "data").
2135
+ */
2136
+ name?: string;
2137
+ };
2138
+ export interface ListVolumesResponse {
2139
+ /**
2140
+ * Total number of volumes.
2141
+ */
2142
+ totalCount: number;
2143
+ /**
2144
+ * List of volumes.
2145
+ */
2146
+ volumes: Volume[];
2147
+ }
2148
+ export type ListVolumesTypesRequest = {
2149
+ /**
2150
+ * Zone to target. If none is passed will use default zone from the config.
2151
+ */
2152
+ zone?: ScwZone;
2153
+ perPage?: number;
2154
+ page?: number;
2155
+ };
2156
+ export interface ListVolumesTypesResponse {
2157
+ /**
2158
+ * Total number of volume types.
2159
+ */
2160
+ totalCount: number;
2161
+ /**
2162
+ * Map of volume types.
2163
+ */
2164
+ volumes: Record<string, VolumeType>;
2165
+ }
2166
+ export interface MigrationPlan {
2167
+ /**
2168
+ * A volume which will be migrated to SBS together with the snapshots, if present.
2169
+ */
2170
+ volume?: Volume;
2171
+ /**
2172
+ * A list of snapshots which will be migrated to SBS together and with the volume, if present.
2173
+ */
2174
+ snapshots: Snapshot[];
2175
+ /**
2176
+ * A value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.
2177
+ */
2178
+ validationKey: string;
2179
+ }
2180
+ export type PlanBlockMigrationRequest = {
2181
+ /**
2182
+ * Zone to target. If none is passed will use default zone from the config.
2183
+ */
2184
+ zone?: ScwZone;
2185
+ /**
2186
+ * The volume for which the migration plan will be generated.
2187
+ *
2188
+ * One-of ('resource'): at most one of 'volumeId', 'snapshotId' could be set.
2189
+ */
2190
+ volumeId?: string;
2191
+ /**
2192
+ * The snapshot for which the migration plan will be generated.
2193
+ *
2194
+ * One-of ('resource'): at most one of 'volumeId', 'snapshotId' could be set.
2195
+ */
2196
+ snapshotId?: string;
2197
+ };
2198
+ export type ServerActionRequest = {
2199
+ /**
2200
+ * Zone to target. If none is passed will use default zone from the config.
2201
+ */
2202
+ zone?: ScwZone;
2203
+ /**
2204
+ * UUID of the Instance.
2205
+ */
2206
+ serverId: string;
2207
+ /**
2208
+ * Action to perform on the Instance.
2209
+ */
2210
+ action?: ServerAction;
2211
+ /**
2212
+ * Name of the backup you want to create.
2213
+ This field should only be specified when performing a backup action.
2214
+ */
2215
+ name?: string;
2216
+ /**
2217
+ * For each volume UUID, the snapshot parameters of the volume.
2218
+ This field should only be specified when performing a backup action.
2219
+ */
2220
+ volumes?: Record<string, ServerActionRequestVolumeBackupTemplate>;
2221
+ /**
2222
+ * Disable IPv6 on the Instance while performing migration to routed IPs.
2223
+ This field should only be specified when performing a enable_routed_ip action.
2224
+ */
2225
+ disableIpv6?: boolean;
2226
+ };
2227
+ export interface ServerActionResponse {
2228
+ task?: Task;
2229
+ }
2230
+ export interface ServerCompatibleTypes {
2231
+ /**
2232
+ * Instance compatible types.
2233
+ */
2234
+ compatibleTypes: string[];
2235
+ }
2236
+ export type SetImageRequest = {
2237
+ /**
2238
+ * Zone to target. If none is passed will use default zone from the config.
2239
+ */
2240
+ zone?: ScwZone;
2241
+ id: string;
2242
+ name: string;
2243
+ arch?: Arch;
2244
+ creationDate?: Date;
2245
+ modificationDate?: Date;
2246
+ /**
2247
+ * @deprecated
2248
+ */
2249
+ defaultBootscript?: Bootscript;
2250
+ extraVolumes?: Record<string, Volume>;
2251
+ fromServer: string;
2252
+ organization?: string;
2253
+ public: boolean;
2254
+ rootVolume?: VolumeSummary;
2255
+ state?: ImageState;
2256
+ project?: string;
2257
+ tags?: string[];
2258
+ };
2259
+ export type SetPlacementGroupRequest = {
2260
+ /**
2261
+ * Zone to target. If none is passed will use default zone from the config.
2262
+ */
2263
+ zone?: ScwZone;
2264
+ placementGroupId: string;
2265
+ name: string;
2266
+ organization?: string;
2267
+ policyMode?: PlacementGroupPolicyMode;
2268
+ policyType?: PlacementGroupPolicyType;
2269
+ project?: string;
2270
+ tags?: string[];
2271
+ };
2272
+ export interface SetPlacementGroupResponse {
2273
+ placementGroup?: PlacementGroup;
2274
+ }
2275
+ export type SetPlacementGroupServersRequest = {
2276
+ /**
2277
+ * Zone to target. If none is passed will use default zone from the config.
2278
+ */
2279
+ zone?: ScwZone;
2280
+ /**
2281
+ * UUID of the placement group you want to set.
2282
+ */
2283
+ placementGroupId: string;
2284
+ /**
2285
+ * An array of the Instances' UUIDs you want to configure.
2286
+ */
2287
+ servers: string[];
2288
+ };
2289
+ export interface SetPlacementGroupServersResponse {
2290
+ /**
2291
+ * Instances attached to the placement group.
2292
+ */
2293
+ servers: PlacementGroupServer[];
2294
+ }
2295
+ export type SetSecurityGroupRulesRequest = {
2296
+ /**
2297
+ * Zone to target. If none is passed will use default zone from the config.
2298
+ */
2299
+ zone?: ScwZone;
2300
+ /**
2301
+ * UUID of the security group to update the rules on.
2302
+ */
2303
+ securityGroupId: string;
2304
+ /**
2305
+ * List of rules to update in the security group.
2306
+ */
2307
+ rules?: SetSecurityGroupRulesRequestRule[];
2308
+ };
2309
+ export interface SetSecurityGroupRulesResponse {
2310
+ rules: SecurityGroupRule[];
2311
+ }
2312
+ export type UpdateImageRequest = {
2313
+ /**
2314
+ * Zone to target. If none is passed will use default zone from the config.
2315
+ */
2316
+ zone?: ScwZone;
2317
+ /**
2318
+ * UUID of the image.
2319
+ */
2320
+ imageId: string;
2321
+ /**
2322
+ * Name of the image.
2323
+ */
2324
+ name?: string;
2325
+ /**
2326
+ * Architecture of the image.
2327
+ */
2328
+ arch?: Arch;
2329
+ /**
2330
+ * Additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image.
2331
+ */
2332
+ extraVolumes?: Record<string, VolumeImageUpdateTemplate>;
2333
+ /**
2334
+ * Tags of the image.
2335
+ */
2336
+ tags?: string[];
2337
+ /**
2338
+ * True to set the image as public.
2339
+ */
2340
+ public?: boolean;
2341
+ };
2342
+ export interface UpdateImageResponse {
2343
+ image?: Image;
2344
+ }
2345
+ export type UpdateIpRequest = {
2346
+ /**
2347
+ * Zone to target. If none is passed will use default zone from the config.
2348
+ */
2349
+ zone?: ScwZone;
2350
+ /**
2351
+ * IP ID or IP address.
2352
+ */
2353
+ ip: string;
2354
+ /**
2355
+ * Reverse domain name.
2356
+ */
2357
+ reverse?: string | null;
2358
+ /**
2359
+ * Should have no effect.
2360
+ */
2361
+ type?: IpType;
2362
+ /**
2363
+ * An array of keywords you want to tag this IP with.
2364
+ */
2365
+ tags?: string[];
2366
+ server?: string | null;
2367
+ };
2368
+ export interface UpdateIpResponse {
2369
+ ip?: Ip;
2370
+ }
2371
+ export type UpdatePlacementGroupRequest = {
2372
+ /**
2373
+ * Zone to target. If none is passed will use default zone from the config.
2374
+ */
2375
+ zone?: ScwZone;
2376
+ /**
2377
+ * UUID of the placement group.
2378
+ */
2379
+ placementGroupId: string;
2380
+ /**
2381
+ * Name of the placement group.
2382
+ */
2383
+ name?: string;
2384
+ /**
2385
+ * Tags of the placement group.
2386
+ */
2387
+ tags?: string[];
2388
+ /**
2389
+ * Operating mode of the placement group.
2390
+ */
2391
+ policyMode?: PlacementGroupPolicyMode;
2392
+ /**
2393
+ * Policy type of the placement group.
2394
+ */
2395
+ policyType?: PlacementGroupPolicyType;
2396
+ };
2397
+ export interface UpdatePlacementGroupResponse {
2398
+ placementGroup?: PlacementGroup;
2399
+ }
2400
+ export type UpdatePlacementGroupServersRequest = {
2401
+ /**
2402
+ * Zone to target. If none is passed will use default zone from the config.
2403
+ */
2404
+ zone?: ScwZone;
2405
+ /**
2406
+ * UUID of the placement group you want to update.
2407
+ */
2408
+ placementGroupId: string;
2409
+ /**
2410
+ * An array of the Instances' UUIDs you want to configure.
2411
+ */
2412
+ servers: string[];
2413
+ };
2414
+ export interface UpdatePlacementGroupServersResponse {
2415
+ /**
2416
+ * Instances attached to the placement group.
2417
+ */
2418
+ servers: PlacementGroupServer[];
2419
+ }
2420
+ export type UpdatePrivateNICRequest = {
2421
+ /**
2422
+ * Zone to target. If none is passed will use default zone from the config.
2423
+ */
2424
+ zone?: ScwZone;
2425
+ /**
2426
+ * UUID of the Instance the private NIC will be attached to.
2427
+ */
2428
+ serverId: string;
2429
+ /**
2430
+ * Private NIC unique ID.
2431
+ */
2432
+ privateNicId: string;
2433
+ /**
2434
+ * Tags used to select private NIC/s.
2435
+ */
2436
+ tags?: string[];
2437
+ };
2438
+ export type UpdateSecurityGroupRequest = {
2439
+ /**
2440
+ * Zone to target. If none is passed will use default zone from the config.
2441
+ */
2442
+ zone?: ScwZone;
2443
+ /**
2444
+ * UUID of the security group.
2445
+ */
2446
+ securityGroupId: string;
2447
+ /**
2448
+ * Name of the security group.
2449
+ */
2450
+ name?: string;
2451
+ /**
2452
+ * Description of the security group.
2453
+ */
2454
+ description?: string;
2455
+ /**
2456
+ * True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
2457
+ */
2458
+ enableDefaultSecurity?: boolean;
2459
+ /**
2460
+ * Default inbound policy.
2461
+ */
2462
+ inboundDefaultPolicy?: SecurityGroupPolicy;
2463
+ /**
2464
+ * Tags of the security group.
2465
+ */
2466
+ tags?: string[];
2467
+ /**
2468
+ * @deprecated Please use project_default instead.
2469
+ */
2470
+ organizationDefault?: boolean;
2471
+ /**
2472
+ * True use this security group for future Instances created in this project.
2473
+ */
2474
+ projectDefault?: boolean;
2475
+ /**
2476
+ * Default outbound policy.
2477
+ */
2478
+ outboundDefaultPolicy?: SecurityGroupPolicy;
2479
+ /**
2480
+ * True to set the security group as stateful.
2481
+ */
2482
+ stateful?: boolean;
2483
+ };
2484
+ export interface UpdateSecurityGroupResponse {
2485
+ securityGroup?: SecurityGroup;
2486
+ }
2487
+ export type UpdateSecurityGroupRuleRequest = {
2488
+ /**
2489
+ * Zone to target. If none is passed will use default zone from the config.
2490
+ */
2491
+ zone?: ScwZone;
2492
+ /**
2493
+ * UUID of the security group.
2494
+ */
2495
+ securityGroupId: string;
2496
+ /**
2497
+ * UUID of the rule.
2498
+ */
2499
+ securityGroupRuleId: string;
2500
+ /**
2501
+ * Protocol family this rule applies to.
2502
+ */
2503
+ protocol?: SecurityGroupRuleProtocol;
2504
+ /**
2505
+ * Direction the rule applies to.
2506
+ */
2507
+ direction?: SecurityGroupRuleDirection;
2508
+ /**
2509
+ * Action to apply when the rule matches a packet.
2510
+ */
2511
+ action?: SecurityGroupRuleAction;
2512
+ /**
2513
+ * Range of IP addresses these rules apply to.
2514
+ */
2515
+ ipRange?: string;
2516
+ /**
2517
+ * Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.
2518
+ */
2519
+ destPortFrom?: number;
2520
+ /**
2521
+ * End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.
2522
+ */
2523
+ destPortTo?: number;
2524
+ /**
2525
+ * Position of this rule in the security group rules list.
2526
+ */
2527
+ position?: number;
2528
+ };
2529
+ export interface UpdateSecurityGroupRuleResponse {
2530
+ rule?: SecurityGroupRule;
2531
+ }
2532
+ export type UpdateServerRequest = {
2533
+ /**
2534
+ * Zone to target. If none is passed will use default zone from the config.
2535
+ */
2536
+ zone?: ScwZone;
2537
+ /**
2538
+ * UUID of the Instance.
2539
+ */
2540
+ serverId: string;
2541
+ /**
2542
+ * Name of the Instance.
2543
+ */
2544
+ name?: string;
2545
+ bootType?: BootType;
2546
+ /**
2547
+ * Tags of the Instance.
2548
+ */
2549
+ tags?: string[];
2550
+ volumes?: Record<string, VolumeServerTemplate>;
2551
+ dynamicIpRequired?: boolean;
2552
+ /**
2553
+ * @deprecated True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
2554
+ */
2555
+ routedIpEnabled?: boolean;
2556
+ /**
2557
+ * A list of reserved IP IDs to attach to the Instance.
2558
+ */
2559
+ publicIps?: string[];
2560
+ /**
2561
+ * @deprecated
2562
+ */
2563
+ enableIpv6?: boolean;
2564
+ /**
2565
+ * True to activate server protection option.
2566
+ */
2567
+ protected?: boolean;
2568
+ securityGroup?: SecurityGroupTemplate;
2569
+ /**
2570
+ * Placement group ID if Instance must be part of a placement group.
2571
+ */
2572
+ placementGroup?: string | null;
2573
+ /**
2574
+ * Instance private NICs.
2575
+ */
2576
+ privateNics?: string[];
2577
+ /**
2578
+ * Warning: This field has some restrictions:
2579
+ - Cannot be changed if the Instance is not in `stopped` state.
2580
+ - Cannot be changed if the Instance is in a placement group.
2581
+ - Cannot be changed from/to a Windows offer to/from a Linux offer.
2582
+ - Local storage requirements of the target commercial_types must be fulfilled (i.e. if an Instance has 80GB of local storage, it can be changed into a GP1-XS, which has a maximum of 150GB, but it cannot be changed into a DEV1-S, which has only 20GB).
2583
+ */
2584
+ commercialType?: string;
2585
+ /**
2586
+ * The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.
2587
+ */
2588
+ adminPasswordEncryptionSshKeyId?: string;
2589
+ };
2590
+ export interface UpdateServerResponse {
2591
+ server?: Server;
2592
+ }
2593
+ export type UpdateSnapshotRequest = {
2594
+ /**
2595
+ * Zone to target. If none is passed will use default zone from the config.
2596
+ */
2597
+ zone?: ScwZone;
2598
+ /**
2599
+ * UUID of the snapshot.
2600
+ */
2601
+ snapshotId: string;
2602
+ /**
2603
+ * Name of the snapshot.
2604
+ */
2605
+ name?: string;
2606
+ /**
2607
+ * Tags of the snapshot.
2608
+ */
2609
+ tags?: string[];
2610
+ };
2611
+ export interface UpdateSnapshotResponse {
2612
+ snapshot?: Snapshot;
2613
+ }
2614
+ export type UpdateVolumeRequest = {
2615
+ /**
2616
+ * Zone to target. If none is passed will use default zone from the config.
2617
+ */
2618
+ zone?: ScwZone;
2619
+ /**
2620
+ * UUID of the volume.
2621
+ */
2622
+ volumeId: string;
2623
+ /**
2624
+ * Volume name.
2625
+ */
2626
+ name?: string;
2627
+ /**
2628
+ * Tags of the volume.
2629
+ */
2630
+ tags?: string[];
2631
+ /**
2632
+ * Volume disk size, must be a multiple of 512.
2633
+ */
2634
+ size?: number;
2635
+ };
2636
+ export interface UpdateVolumeResponse {
2637
+ volume?: Volume;
2638
+ }