next-lxd 1.0.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.
@@ -0,0 +1,1087 @@
1
+ export interface LxdBaseResponse<T> {
2
+ type: string;
3
+ status: string;
4
+ status_code: number;
5
+ operation: string;
6
+ error_code: number;
7
+ error: string;
8
+ metadata: T;
9
+ }
10
+
11
+ export type LxdServerResponse = LxdBaseResponse<LxdServerMetadata>;
12
+
13
+ export interface LxdServerMetadata {
14
+ config: Record<string, string>;
15
+ api_extensions: string[];
16
+ api_status: string;
17
+ api_version: string;
18
+ auth: string;
19
+ public: boolean;
20
+ auth_methods: string[];
21
+ auth_user_name: string;
22
+ auth_user_method: string;
23
+ environment: LxdEnvironment;
24
+ }
25
+
26
+ export interface LxdEnvironment {
27
+ addresses: string[];
28
+ architectures: string[];
29
+ certificate: string;
30
+ certificate_fingerprint: string;
31
+ driver: string;
32
+ driver_version: string;
33
+ firewall: string;
34
+ kernel: string;
35
+ kernel_architecture: string;
36
+ kernel_features: Record<string, unknown>;
37
+ kernel_version: string;
38
+ lxc_features: Record<string, unknown>;
39
+ os_name: string;
40
+ os_version: string;
41
+ project: string;
42
+ server: string;
43
+ server_clustered: boolean;
44
+ server_event_mode: string;
45
+ server_name: string;
46
+ server_pid: number;
47
+ server_version: string;
48
+ storage: string;
49
+ storage_version: string;
50
+ storage_supported_drivers: Record<string, unknown>[];
51
+ }
52
+
53
+ export type LxdInstancesResponse = LxdBaseResponse<string[]>;
54
+
55
+ export type LxdInstanceResponse = LxdBaseResponse<LxdInstance>;
56
+
57
+ export interface LxdInstance {
58
+ architecture: string;
59
+ config: Record<string, string>;
60
+ devices: Record<string, Record<string, string>>;
61
+ ephemeral: boolean;
62
+ profiles: string[];
63
+ stateful: boolean;
64
+ description: string;
65
+ created_at: string;
66
+ expanded_config: Record<string, string>;
67
+ expanded_devices: Record<string, Record<string, string>>;
68
+ name: string;
69
+ status: string;
70
+ status_code: number;
71
+ last_used_at: string;
72
+ location: string;
73
+ type: string;
74
+ project: string;
75
+ }
76
+
77
+ export type LxdOperationResponse = LxdBaseResponse<LxdOperation>;
78
+
79
+ export interface LxdOperation {
80
+ id: string;
81
+ class: string;
82
+ description: string;
83
+ created_at: string;
84
+ updated_at: string;
85
+ status: string;
86
+ status_code: number;
87
+ resources: Record<string, string[]>;
88
+ metadata: Record<string, any>;
89
+ may_cancel: boolean;
90
+ err: string;
91
+ location: string;
92
+ }
93
+
94
+ export interface LxdInstanceCreateSource {
95
+ type: 'image' | 'migration' | 'copy' | 'none';
96
+ alias?: string;
97
+ fingerprint?: string;
98
+ server?: string;
99
+ protocol?: string;
100
+ certificate?: string;
101
+ mode?: 'pull' | 'push';
102
+ operation?: string;
103
+ secrets?: Record<string, string>;
104
+ base?: {
105
+ fingerprint: string;
106
+ };
107
+ }
108
+
109
+ export interface LxdInstanceCreateRequest {
110
+ name: string;
111
+ source: LxdInstanceCreateSource;
112
+ architecture?: string;
113
+ profiles?: string[];
114
+ ephemeral?: boolean;
115
+ config?: Record<string, string>;
116
+ devices?: Record<string, Record<string, string>>;
117
+ type?: 'container' | 'virtual-machine';
118
+ }
119
+
120
+ export interface LxdInstancePutRequest {
121
+ architecture?: string;
122
+ config?: Record<string, string>;
123
+ devices?: Record<string, Record<string, string>>;
124
+ ephemeral?: boolean;
125
+ profiles?: string[];
126
+ stateful?: boolean;
127
+ description?: string;
128
+ }
129
+
130
+ export type LxdInstanceDeleteResponse = LxdBaseResponse<LxdInstanceDeleteMetadata>;
131
+
132
+ export interface LxdInstanceDeleteMetadata {
133
+ class: string;
134
+ created_at: string;
135
+ description: string;
136
+ err: string;
137
+ id: string;
138
+ location: string;
139
+ may_cancel: boolean;
140
+ metadata: {
141
+ command: string[];
142
+ environment: Record<string, any>;
143
+ };
144
+ requestor: {
145
+ address: string;
146
+ protocol: string;
147
+ username: string;
148
+ };
149
+ resources: {
150
+ containers: string[];
151
+ instances: string[];
152
+ };
153
+ status: string;
154
+ status_code: number;
155
+ updated_at: string;
156
+ }
157
+
158
+ export type LxdInstanceConsoleResponse = LxdBaseResponse<LxdInstanceConsoleOperation>;
159
+
160
+ export interface LxdInstanceConsoleOperation {
161
+ id: string;
162
+ class: 'websocket';
163
+ description: string;
164
+ created_at: string;
165
+ updated_at: string;
166
+ status: string;
167
+ status_code: number;
168
+ resources: {
169
+ containers?: string[];
170
+ instances: string[];
171
+ };
172
+ metadata: LxdInstanceConsoleMetadata;
173
+ may_cancel: boolean;
174
+ err: string;
175
+ location: string;
176
+ requestor?: {
177
+ address: string;
178
+ protocol: string;
179
+ username: string;
180
+ };
181
+ }
182
+
183
+ export interface LxdInstanceConsoleMetadata {
184
+ command?: string[];
185
+ environment?: Record<string, string>;
186
+ fds: Record<string, string>;
187
+ interactive: boolean;
188
+ }
189
+
190
+ export interface LxdInstanceExecRequest {
191
+ command: string[];
192
+ cwd?: string;
193
+ environment?: Record<string, string>;
194
+ group?: number;
195
+ height?: number;
196
+ interactive?: boolean;
197
+ 'record-output'?: boolean;
198
+ user?: number;
199
+ 'wait-for-websocket'?: boolean;
200
+ width?: number;
201
+ }
202
+
203
+ export interface LxdInstanceExecResponse {
204
+ type: 'async';
205
+ status: string;
206
+ status_code: number;
207
+ operation: string;
208
+ metadata: {
209
+ id: string;
210
+ class: 'websocket';
211
+ description: string;
212
+ status: string;
213
+ status_code: number;
214
+ metadata: {
215
+ command: string[];
216
+ environment: Record<string, string>;
217
+ interactive: boolean;
218
+ fds: Record<string, string>;
219
+ };
220
+ };
221
+ }
222
+
223
+ export interface InstanceCreateRequest {
224
+ architecture?: string;
225
+ config?: Record<string, string>;
226
+ description?: string;
227
+ devices?: Record<string, Device>;
228
+ ephemeral?: boolean;
229
+ instance_type?: string;
230
+ name: string;
231
+ profiles?: string[];
232
+ restore?: string;
233
+ source: Source;
234
+ start?: boolean;
235
+ stateful?: boolean;
236
+ type?: string;
237
+ }
238
+
239
+ export interface Device {
240
+ path?: string;
241
+ pool?: string;
242
+ type: string;
243
+ [key: string]: unknown;
244
+ }
245
+
246
+ export interface Source {
247
+ type: string;
248
+ alias?: string;
249
+ fingerprint?: string;
250
+ server?: string;
251
+ protocol?: string;
252
+ mode?: string;
253
+ certificate?: string;
254
+ secret?: string;
255
+ secrets?: Record<string, string>;
256
+ operation?: string;
257
+ project?: string;
258
+ source?: string;
259
+ properties?: Record<string, string>;
260
+ conversion_options?: string[];
261
+ source_disk_size?: number;
262
+ allow_inconsistent?: boolean;
263
+ container_only?: boolean;
264
+ instance_only?: boolean;
265
+ live?: boolean;
266
+ refresh?: boolean;
267
+ override_snapshot_profiles?: boolean;
268
+ "base-image"?: string;
269
+ }
270
+
271
+ export interface LxdImage {
272
+ access_entitlements?: string[];
273
+ aliases?: LxdImageAlias[];
274
+ architecture: string;
275
+ auto_update: boolean;
276
+ cached: boolean;
277
+ created_at: string;
278
+ expires_at: string;
279
+ filename: string;
280
+ fingerprint: string;
281
+ last_used_at: string;
282
+ profiles?: string[];
283
+ project?: string;
284
+ properties?: Record<string, string>;
285
+ public: boolean;
286
+ size: number;
287
+ type?: string;
288
+ update_source?: LxdImageSource;
289
+ uploaded_at: string;
290
+ }
291
+
292
+ export interface LxdImageAlias {
293
+ description?: string;
294
+ name: string;
295
+ }
296
+
297
+ export interface LxdImagePut {
298
+ auto_update?: boolean;
299
+ expires_at?: string;
300
+ profiles?: string[];
301
+ properties?: Record<string, string>;
302
+ public?: boolean;
303
+ }
304
+
305
+ export interface LxdImageSource {
306
+ alias?: string;
307
+ certificate?: string;
308
+ image_type?: string;
309
+ protocol?: string;
310
+ server?: string;
311
+ }
312
+
313
+ export interface LxdImagesPostSource {
314
+ alias?: string;
315
+ certificate?: string;
316
+ fingerprint?: string;
317
+ image_type?: string;
318
+ mode?: string;
319
+ name?: string;
320
+ project?: string;
321
+ protocol?: string;
322
+ secret?: string;
323
+ server?: string;
324
+ type?: string;
325
+ url?: string;
326
+ }
327
+
328
+ export interface LxdImagesPost {
329
+ aliases?: LxdImageAlias[];
330
+ auto_update?: boolean;
331
+ compression_algorithm?: string;
332
+ expires_at?: string;
333
+ filename?: string;
334
+ profiles?: string[];
335
+ properties?: Record<string, string>;
336
+ public?: boolean;
337
+ source?: LxdImagesPostSource;
338
+ }
339
+
340
+ export interface LxdImageAliasesEntry {
341
+ access_entitlements?: string[];
342
+ description?: string;
343
+ name: string;
344
+ target: string;
345
+ type?: string;
346
+ }
347
+
348
+ export interface LxdImageAliasesEntryPut {
349
+ description?: string;
350
+ target?: string;
351
+ }
352
+
353
+ export interface LxdImageAliasesPost {
354
+ access_entitlements?: string[];
355
+ description?: string;
356
+ name: string;
357
+ target: string;
358
+ type?: string;
359
+ }
360
+
361
+ export interface LxdImageAliasesEntryPost {
362
+ name: string;
363
+ }
364
+
365
+ export interface LxdImageExportPost {
366
+ aliases?: LxdImageAlias[];
367
+ certificate?: string;
368
+ profiles?: string[];
369
+ project?: string;
370
+ secret?: string;
371
+ target?: string;
372
+ }
373
+
374
+ export interface LxdNetwork {
375
+ access_entitlements?: string[];
376
+ config?: Record<string, string>;
377
+ description?: string;
378
+ locations?: string[];
379
+ managed: boolean;
380
+ name: string;
381
+ project?: string;
382
+ status?: string;
383
+ type: string;
384
+ used_by?: string[];
385
+ }
386
+
387
+ export interface LxdNetworkPut {
388
+ config?: Record<string, string>;
389
+ description?: string;
390
+ }
391
+
392
+ export interface LxdNetworksPost {
393
+ config?: Record<string, string>;
394
+ description?: string;
395
+ name: string;
396
+ type: string;
397
+ }
398
+
399
+ export interface LxdNetworkACL {
400
+ access_entitlements?: string[];
401
+ config?: Record<string, string>;
402
+ description?: string;
403
+ egress?: LxdNetworkACLRule[];
404
+ ingress?: LxdNetworkACLRule[];
405
+ name: string;
406
+ project?: string;
407
+ used_by?: string[];
408
+ }
409
+
410
+ export interface LxdNetworkACLPut {
411
+ config?: Record<string, string>;
412
+ description?: string;
413
+ egress?: LxdNetworkACLRule[];
414
+ ingress?: LxdNetworkACLRule[];
415
+ }
416
+
417
+ export interface LxdNetworkACLsPost {
418
+ config?: Record<string, string>;
419
+ description?: string;
420
+ egress?: LxdNetworkACLRule[];
421
+ ingress?: LxdNetworkACLRule[];
422
+ name: string;
423
+ }
424
+
425
+ export interface LxdNetworkACLRule {
426
+ action: string;
427
+ description?: string;
428
+ destination?: string;
429
+ destination_port?: string;
430
+ icmp_code?: string;
431
+ icmp_type?: string;
432
+ protocol?: string;
433
+ source?: string;
434
+ source_port?: string;
435
+ state?: string;
436
+ }
437
+
438
+ export interface LxdNetworkForward {
439
+ config?: Record<string, string>;
440
+ description?: string;
441
+ listen_address: string;
442
+ location?: string;
443
+ ports?: LxdNetworkForwardPort[];
444
+ }
445
+
446
+ export interface LxdNetworkForwardPut {
447
+ config?: Record<string, string>;
448
+ description?: string;
449
+ ports?: LxdNetworkForwardPort[];
450
+ }
451
+
452
+ export interface LxdNetworkForwardsPost {
453
+ config?: Record<string, string>;
454
+ description?: string;
455
+ listen_address: string;
456
+ ports?: LxdNetworkForwardPort[];
457
+ }
458
+
459
+ export interface LxdNetworkForwardPort {
460
+ description?: string;
461
+ listen_port?: string;
462
+ protocol?: string;
463
+ target_address?: string;
464
+ target_port?: string;
465
+ }
466
+
467
+ export interface LxdNetworkLease {
468
+ address?: string;
469
+ hostname?: string;
470
+ hwaddr?: string;
471
+ location?: string;
472
+ project?: string;
473
+ type?: string;
474
+ }
475
+
476
+ export interface LxdNetworkLoadBalancer {
477
+ backends?: LxdNetworkLoadBalancerBackend[];
478
+ config?: Record<string, string>;
479
+ description?: string;
480
+ listen_address: string;
481
+ location?: string;
482
+ ports?: LxdNetworkLoadBalancerPort[];
483
+ }
484
+
485
+ export interface LxdNetworkLoadBalancerPut {
486
+ backends?: LxdNetworkLoadBalancerBackend[];
487
+ config?: Record<string, string>;
488
+ description?: string;
489
+ ports?: LxdNetworkLoadBalancerPort[];
490
+ }
491
+
492
+ export interface LxdNetworkLoadBalancersPost {
493
+ backends?: LxdNetworkLoadBalancerBackend[];
494
+ config?: Record<string, string>;
495
+ description?: string;
496
+ listen_address: string;
497
+ ports?: LxdNetworkLoadBalancerPort[];
498
+ }
499
+
500
+ export interface LxdNetworkLoadBalancerBackend {
501
+ description?: string;
502
+ name?: string;
503
+ target_address?: string;
504
+ target_port?: string;
505
+ }
506
+
507
+ export interface LxdNetworkLoadBalancerPort {
508
+ description?: string;
509
+ listen_port?: string;
510
+ protocol?: string;
511
+ target_backend?: string[];
512
+ }
513
+
514
+ export interface LxdNetworkPeer {
515
+ config?: Record<string, string>;
516
+ description?: string;
517
+ name: string;
518
+ status?: string;
519
+ target_network?: string;
520
+ target_project?: string;
521
+ used_by?: string[];
522
+ }
523
+
524
+ export interface LxdNetworkPeerPut {
525
+ config?: Record<string, string>;
526
+ description?: string;
527
+ }
528
+
529
+ export interface LxdNetworkAllocations {
530
+ addresses?: string;
531
+ hwaddr?: string;
532
+ nat?: boolean;
533
+ network?: string;
534
+ type?: string;
535
+ used_by?: string;
536
+ }
537
+
538
+ export interface LxdProfile {
539
+ config?: Record<string, string>;
540
+ description?: string;
541
+ devices?: Record<string, Record<string, string>>;
542
+ name: string;
543
+ used_by?: string[];
544
+ }
545
+
546
+ export interface LxdProfilePut {
547
+ config?: Record<string, string>;
548
+ description?: string;
549
+ devices?: Record<string, Record<string, string>>;
550
+ }
551
+
552
+ export interface LxdProfilesPost {
553
+ config?: Record<string, string>;
554
+ description?: string;
555
+ devices?: Record<string, Record<string, string>>;
556
+ name: string;
557
+ }
558
+
559
+ export interface LxdProfilePost {
560
+ name: string;
561
+ }
562
+
563
+ export interface LxdProject {
564
+ config?: Record<string, string>;
565
+ description?: string;
566
+ name: string;
567
+ used_by?: string[];
568
+ }
569
+
570
+ export interface LxdProjectPut {
571
+ config?: Record<string, string>;
572
+ description?: string;
573
+ }
574
+
575
+ export interface LxdProjectsPost {
576
+ config?: Record<string, string>;
577
+ description?: string;
578
+ name: string;
579
+ }
580
+
581
+ export interface LxdProjectPost {
582
+ name: string;
583
+ }
584
+
585
+ export interface LxdProjectState {
586
+ resources?: Record<string, { limit?: number; usage?: number }>;
587
+ }
588
+
589
+ export interface LxdStoragePool {
590
+ config?: Record<string, string>;
591
+ description?: string;
592
+ driver: string;
593
+ locations?: string[];
594
+ name: string;
595
+ source?: string;
596
+ status?: string;
597
+ }
598
+
599
+ export interface LxdStoragePoolPut {
600
+ config?: Record<string, string>;
601
+ description?: string;
602
+ }
603
+
604
+ export interface LxdStoragePoolsPost {
605
+ config?: Record<string, string>;
606
+ description?: string;
607
+ driver: string;
608
+ name: string;
609
+ }
610
+
611
+ export interface LxdStorageVolume {
612
+ access_entitlements?: string[];
613
+ config?: Record<string, string>;
614
+ content_type?: string;
615
+ created_at?: string;
616
+ description?: string;
617
+ location?: string;
618
+ name: string;
619
+ pool?: string;
620
+ project?: string;
621
+ type: string;
622
+ used_by?: string[];
623
+ }
624
+
625
+ export interface LxdStorageVolumePut {
626
+ config?: Record<string, string>;
627
+ description?: string;
628
+ restore?: string;
629
+ }
630
+
631
+ export interface LxdStorageVolumesPost {
632
+ config?: Record<string, string>;
633
+ content_type?: string;
634
+ description?: string;
635
+ name: string;
636
+ restore?: string;
637
+ source?: LxdStorageVolumeSource;
638
+ type: string;
639
+ }
640
+
641
+ export interface LxdStorageVolumePost {
642
+ migration?: boolean;
643
+ name?: string;
644
+ pool?: string;
645
+ project?: string;
646
+ source?: LxdStorageVolumeSource;
647
+ target?: Record<string, unknown>;
648
+ volume_only?: boolean;
649
+ }
650
+
651
+ export interface LxdStorageVolumeSource {
652
+ certificate?: string;
653
+ location?: string;
654
+ mode?: string;
655
+ name?: string;
656
+ operation?: string;
657
+ pool?: string;
658
+ project?: string;
659
+ refresh?: boolean;
660
+ secrets?: Record<string, string>;
661
+ type?: string;
662
+ volume_only?: boolean;
663
+ }
664
+
665
+ export interface LxdStorageVolumeSnapshot {
666
+ config?: Record<string, string>;
667
+ content_type?: string;
668
+ created_at?: string;
669
+ description?: string;
670
+ expires_at?: string;
671
+ name: string;
672
+ }
673
+
674
+ export interface LxdStorageVolumeSnapshotsPost {
675
+ description?: string;
676
+ expires_at?: string;
677
+ name?: string;
678
+ }
679
+
680
+ export interface LxdStorageVolumeSnapshotPut {
681
+ description?: string;
682
+ expires_at?: string;
683
+ }
684
+
685
+ export interface LxdStorageVolumeSnapshotPost {
686
+ migration?: boolean;
687
+ name?: string;
688
+ target?: Record<string, unknown>;
689
+ }
690
+
691
+ export interface LxdStorageVolumeState {
692
+ usage?: { inodes_used?: number; space_used?: number };
693
+ }
694
+
695
+ export interface LxdCluster {
696
+ enabled: boolean;
697
+ member_config?: LxdClusterMemberConfigKey[];
698
+ server_name?: string;
699
+ }
700
+
701
+ export interface LxdClusterPut {
702
+ cluster_address?: string;
703
+ cluster_certificate?: string;
704
+ cluster_password?: string;
705
+ cluster_token?: string;
706
+ enabled?: boolean;
707
+ member_config?: LxdClusterMemberConfigKey[];
708
+ server_address?: string;
709
+ server_name?: string;
710
+ }
711
+
712
+ export interface LxdClusterCertificatePut {
713
+ cluster_certificate?: string;
714
+ cluster_certificate_key?: string;
715
+ }
716
+
717
+ export interface LxdClusterMember {
718
+ architecture?: string;
719
+ config?: Record<string, string>;
720
+ database?: boolean;
721
+ description?: string;
722
+ failure_domain?: string;
723
+ groups?: string[];
724
+ message?: string;
725
+ roles?: string[];
726
+ server_name: string;
727
+ status: string;
728
+ url?: string;
729
+ }
730
+
731
+ export interface LxdClusterMemberPut {
732
+ config?: Record<string, string>;
733
+ description?: string;
734
+ failure_domain?: string;
735
+ groups?: string[];
736
+ roles?: string[];
737
+ }
738
+
739
+ export interface LxdClusterMemberPost {
740
+ server_name: string;
741
+ }
742
+
743
+ export interface LxdClusterMembersPost {
744
+ server_name: string;
745
+ }
746
+
747
+ export interface LxdClusterMemberConfigKey {
748
+ description?: string;
749
+ entity?: string;
750
+ key?: string;
751
+ name?: string;
752
+ value?: string;
753
+ }
754
+
755
+ export interface LxdClusterMemberJoinToken {
756
+ addresses?: string[];
757
+ expires_at?: string;
758
+ fingerprint?: string;
759
+ secret?: string;
760
+ server_name?: string;
761
+ }
762
+
763
+ export interface LxdClusterMemberState {
764
+ storage_pools?: Record<string, unknown>;
765
+ sysinfo?: {
766
+ buffered_ram?: number;
767
+ free_ram?: number;
768
+ free_swap?: number;
769
+ load_averages?: number[];
770
+ logical_cpus?: number;
771
+ processes?: number;
772
+ shared_ram?: number;
773
+ total_ram?: number;
774
+ total_swap?: number;
775
+ uptime?: number;
776
+ };
777
+ }
778
+
779
+ export interface LxdClusterMemberStatePost {
780
+ action?: string;
781
+ mode?: string;
782
+ }
783
+
784
+ export interface LxdClusterGroup {
785
+ description?: string;
786
+ members?: string[];
787
+ name: string;
788
+ used_by?: string[];
789
+ }
790
+
791
+ export interface LxdClusterGroupPut {
792
+ description?: string;
793
+ members?: string[];
794
+ }
795
+
796
+ export interface LxdClusterGroupPost {
797
+ name: string;
798
+ }
799
+
800
+ export interface LxdClusterGroupsPost {
801
+ description?: string;
802
+ members?: string[];
803
+ name: string;
804
+ }
805
+
806
+ export interface LxdCertificate {
807
+ certificate?: string;
808
+ fingerprint: string;
809
+ name?: string;
810
+ projects?: string[];
811
+ restricted?: boolean;
812
+ type?: string;
813
+ }
814
+
815
+ export interface LxdCertificatePut {
816
+ name?: string;
817
+ projects?: string[];
818
+ restricted?: boolean;
819
+ type?: string;
820
+ }
821
+
822
+ export interface LxdCertificatesPost {
823
+ certificate?: string;
824
+ name?: string;
825
+ password?: string;
826
+ projects?: string[];
827
+ restricted?: boolean;
828
+ token?: boolean;
829
+ trust_token?: string;
830
+ type?: string;
831
+ }
832
+
833
+ export interface LxdCertificateAddToken {
834
+ addresses?: string[];
835
+ client_name?: string;
836
+ expires_at?: string;
837
+ fingerprint?: string;
838
+ secret?: string;
839
+ type?: string;
840
+ }
841
+
842
+ export interface LxdEvent {
843
+ location?: string;
844
+ metadata?: unknown;
845
+ project?: string;
846
+ timestamp?: string;
847
+ type?: string;
848
+ }
849
+
850
+ export interface LxdWarning {
851
+ count: number;
852
+ entity_url?: string;
853
+ first_seen_at?: string;
854
+ last_message?: string;
855
+ last_seen_at?: string;
856
+ location?: string;
857
+ project?: string;
858
+ severity?: string;
859
+ status: string;
860
+ type?: string;
861
+ uuid: string;
862
+ }
863
+
864
+ export interface LxdWarningPut {
865
+ status: string;
866
+ }
867
+
868
+ export type LxdImagesResponse = LxdBaseResponse<string[]>;
869
+ export type LxdImageResponse = LxdBaseResponse<LxdImage>;
870
+ export type LxdImageAliasesResponse = LxdBaseResponse<string[]>;
871
+ export type LxdImageAliasResponse = LxdBaseResponse<LxdImageAliasesEntry>;
872
+
873
+ export type LxdNetworksResponse = LxdBaseResponse<string[]>;
874
+ export type LxdNetworkResponse = LxdBaseResponse<LxdNetwork>;
875
+ export type LxdNetworkACLsResponse = LxdBaseResponse<string[]>;
876
+ export type LxdNetworkACLResponse = LxdBaseResponse<LxdNetworkACL>;
877
+ export type LxdNetworkForwardsResponse = LxdBaseResponse<string[]>;
878
+ export type LxdNetworkForwardResponse = LxdBaseResponse<LxdNetworkForward>;
879
+ export type LxdNetworkLeasesResponse = LxdBaseResponse<LxdNetworkLease[]>;
880
+ export type LxdNetworkLoadBalancersResponse = LxdBaseResponse<string[]>;
881
+ export type LxdNetworkLoadBalancerResponse = LxdBaseResponse<LxdNetworkLoadBalancer>;
882
+ export type LxdNetworkPeersResponse = LxdBaseResponse<string[]>;
883
+ export type LxdNetworkPeerResponse = LxdBaseResponse<LxdNetworkPeer>;
884
+ export type LxdNetworkAllocationsResponse = LxdBaseResponse<LxdNetworkAllocations[]>;
885
+
886
+ export type LxdProfilesResponse = LxdBaseResponse<string[]>;
887
+ export type LxdProfileResponse = LxdBaseResponse<LxdProfile>;
888
+
889
+ export type LxdProjectsResponse = LxdBaseResponse<string[]>;
890
+ export type LxdProjectResponse = LxdBaseResponse<LxdProject>;
891
+ export type LxdProjectStateResponse = LxdBaseResponse<LxdProjectState>;
892
+
893
+ export type LxdStoragePoolsResponse = LxdBaseResponse<string[]>;
894
+ export type LxdStoragePoolResponse = LxdBaseResponse<LxdStoragePool>;
895
+ export type LxdStoragePoolResourcesResponse = LxdBaseResponse<{ space?: { total?: number; used?: number }; inodes?: { total?: number; used?: number } }>;
896
+ export type LxdStorageVolumesResponse = LxdBaseResponse<string[]>;
897
+ export type LxdStorageVolumeResponse = LxdBaseResponse<LxdStorageVolume>;
898
+ export type LxdStorageVolumeSnapshotsResponse = LxdBaseResponse<string[]>;
899
+ export type LxdStorageVolumeSnapshotResponse = LxdBaseResponse<LxdStorageVolumeSnapshot>;
900
+ export type LxdStorageVolumeStateResponse = LxdBaseResponse<LxdStorageVolumeState>;
901
+
902
+ export type LxdClusterResponse = LxdBaseResponse<LxdCluster>;
903
+ export type LxdClusterMembersResponse = LxdBaseResponse<string[]>;
904
+ export type LxdClusterMemberResponse = LxdBaseResponse<LxdClusterMember>;
905
+ export type LxdClusterMemberStateResponse = LxdBaseResponse<LxdClusterMemberState>;
906
+ export type LxdClusterGroupsResponse = LxdBaseResponse<string[]>;
907
+ export type LxdClusterGroupResponse = LxdBaseResponse<LxdClusterGroup>;
908
+
909
+ export type LxdCertificatesResponse = LxdBaseResponse<string[]>;
910
+ export type LxdCertificateResponse = LxdBaseResponse<LxdCertificate>;
911
+
912
+ export type LxdOperationsResponse = LxdBaseResponse<Record<string, string[]>>;
913
+
914
+ export type LxdWarningsResponse = LxdBaseResponse<string[]>;
915
+ export type LxdWarningResponse = LxdBaseResponse<LxdWarning>;
916
+
917
+ // Instance snapshot types
918
+ export type LxdInstanceSnapshotsResponse = LxdBaseResponse<string[]>;
919
+ export type LxdInstanceSnapshotResponse = LxdBaseResponse<LxdInstanceSnapshot>;
920
+
921
+ export interface LxdInstanceSnapshot {
922
+ architecture?: string;
923
+ config?: Record<string, string>;
924
+ created_at: string;
925
+ devices?: Record<string, Record<string, string>>;
926
+ ephemeral?: boolean;
927
+ expanded_config?: Record<string, string>;
928
+ expanded_devices?: Record<string, Record<string, string>>;
929
+ expires_at?: string;
930
+ last_used_at?: string;
931
+ name: string;
932
+ profiles?: string[];
933
+ size?: number;
934
+ stateful?: boolean;
935
+ }
936
+
937
+ export interface LxdInstanceSnapshotsPost {
938
+ expires_at?: string;
939
+ name?: string;
940
+ stateful?: boolean;
941
+ }
942
+
943
+ export interface LxdInstanceSnapshotPut {
944
+ expires_at?: string;
945
+ }
946
+
947
+ export interface LxdInstanceSnapshotPost {
948
+ live?: boolean;
949
+ migration?: boolean;
950
+ name?: string;
951
+ target?: Record<string, unknown>;
952
+ }
953
+
954
+ // Instance backup types
955
+ export type LxdInstanceBackupsResponse = LxdBaseResponse<string[]>;
956
+ export type LxdInstanceBackupResponse = LxdBaseResponse<LxdInstanceBackup>;
957
+
958
+ export interface LxdInstanceBackup {
959
+ container_only?: boolean;
960
+ created_at?: string;
961
+ expires_at?: string;
962
+ instance_only?: boolean;
963
+ name: string;
964
+ optimized_storage?: boolean;
965
+ }
966
+
967
+ export interface LxdInstanceBackupsPost {
968
+ compression_algorithm?: string;
969
+ container_only?: boolean;
970
+ expires_at?: string;
971
+ instance_only?: boolean;
972
+ name?: string;
973
+ optimized_storage?: boolean;
974
+ }
975
+
976
+ export interface LxdInstanceBackupPost {
977
+ name: string;
978
+ }
979
+
980
+ // Instance state types
981
+ export type LxdInstanceStateResponse = LxdBaseResponse<LxdInstanceState>;
982
+
983
+ export interface LxdInstanceCPU {
984
+ usage?: number;
985
+ }
986
+
987
+ export interface LxdInstanceDisk {
988
+ total?: number;
989
+ usage?: number;
990
+ }
991
+
992
+ export interface LxdInstanceMemory {
993
+ swap_usage?: number;
994
+ swap_usage_peak?: number;
995
+ total?: number;
996
+ usage?: number;
997
+ usage_peak?: number;
998
+ }
999
+
1000
+ export interface LxdInstanceNetworkAddress {
1001
+ address?: string;
1002
+ family?: string;
1003
+ netmask?: string;
1004
+ scope?: string;
1005
+ }
1006
+
1007
+ export interface LxdInstanceNetworkCounters {
1008
+ bytes_received?: number;
1009
+ bytes_sent?: number;
1010
+ errors_received?: number;
1011
+ errors_sent?: number;
1012
+ packets_dropped_inbound?: number;
1013
+ packets_dropped_outbound?: number;
1014
+ packets_received?: number;
1015
+ packets_sent?: number;
1016
+ }
1017
+
1018
+ export interface LxdInstanceStateNetwork {
1019
+ addresses?: LxdInstanceNetworkAddress[];
1020
+ counters?: LxdInstanceNetworkCounters;
1021
+ host_name?: string;
1022
+ hwaddr?: string;
1023
+ mtu?: number;
1024
+ state?: string;
1025
+ type?: string;
1026
+ }
1027
+
1028
+ export interface LxdInstanceState {
1029
+ cpu?: LxdInstanceCPU;
1030
+ disk?: Record<string, LxdInstanceDisk>;
1031
+ memory?: LxdInstanceMemory;
1032
+ network?: Record<string, LxdInstanceStateNetwork>;
1033
+ pid?: number;
1034
+ processes?: number;
1035
+ status?: string;
1036
+ status_code?: number;
1037
+ }
1038
+
1039
+ export interface LxdInstanceStatePut {
1040
+ action: string;
1041
+ force?: boolean;
1042
+ stateful?: boolean;
1043
+ timeout?: number;
1044
+ }
1045
+
1046
+ // Instance rename/migrate/rebuild types
1047
+ export interface LxdInstancePost {
1048
+ name?: string;
1049
+ migration?: boolean;
1050
+ live?: boolean;
1051
+ instance_only?: boolean;
1052
+ container_only?: boolean;
1053
+ allow_inconsistent?: boolean;
1054
+ pool?: string;
1055
+ project?: string;
1056
+ target?: Record<string, unknown>;
1057
+ config?: Record<string, string>;
1058
+ devices?: Record<string, Record<string, string>>;
1059
+ profiles?: string[];
1060
+ }
1061
+
1062
+ export interface LxdInstanceRebuildPost {
1063
+ source?: LxdInstanceSource;
1064
+ }
1065
+
1066
+ export interface LxdInstanceSource {
1067
+ type: string;
1068
+ alias?: string;
1069
+ certificate?: string;
1070
+ fingerprint?: string;
1071
+ image_type?: string;
1072
+ mode?: string;
1073
+ name?: string;
1074
+ project?: string;
1075
+ protocol?: string;
1076
+ secret?: string;
1077
+ server?: string;
1078
+ source?: string;
1079
+ url?: string;
1080
+ live?: boolean;
1081
+ instance_only?: boolean;
1082
+ refresh?: boolean;
1083
+ secrets?: Record<string, string>;
1084
+ properties?: Record<string, string>;
1085
+ base_image?: string;
1086
+ allow_inconsistent?: boolean;
1087
+ }