@toshicloud/sdk 0.3.0 → 0.3.1

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,2135 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, DurationJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Token, TokenJson } from "./tokens_pb.js";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file toshi/workspace/v1/hosts.proto.
7
+ */
8
+ export declare const file_toshi_workspace_v1_hosts: GenFile;
9
+ /**
10
+ * @generated from message toshi.workspace.v1.ListHostsRequest
11
+ */
12
+ export type ListHostsRequest = Message<"toshi.workspace.v1.ListHostsRequest"> & {
13
+ /**
14
+ * Hosts in any of these states; empty matches every state.
15
+ *
16
+ * @generated from field: repeated toshi.workspace.v1.HostState states = 1;
17
+ */
18
+ states: HostState[];
19
+ /**
20
+ * Leave out revoked hosts.
21
+ *
22
+ * @generated from field: bool exclude_revoked = 2;
23
+ */
24
+ excludeRevoked: boolean;
25
+ /**
26
+ * The most hosts in one page; zero lets the server choose.
27
+ *
28
+ * @generated from field: int32 page_size = 3;
29
+ */
30
+ pageSize: number;
31
+ /**
32
+ * From an earlier response's next_page_token; empty for the first page.
33
+ *
34
+ * @generated from field: string page_token = 4;
35
+ */
36
+ pageToken: string;
37
+ };
38
+ /**
39
+ * @generated from message toshi.workspace.v1.ListHostsRequest
40
+ */
41
+ export type ListHostsRequestJson = {
42
+ /**
43
+ * Hosts in any of these states; empty matches every state.
44
+ *
45
+ * @generated from field: repeated toshi.workspace.v1.HostState states = 1;
46
+ */
47
+ states?: HostStateJson[];
48
+ /**
49
+ * Leave out revoked hosts.
50
+ *
51
+ * @generated from field: bool exclude_revoked = 2;
52
+ */
53
+ excludeRevoked?: boolean;
54
+ /**
55
+ * The most hosts in one page; zero lets the server choose.
56
+ *
57
+ * @generated from field: int32 page_size = 3;
58
+ */
59
+ pageSize?: number;
60
+ /**
61
+ * From an earlier response's next_page_token; empty for the first page.
62
+ *
63
+ * @generated from field: string page_token = 4;
64
+ */
65
+ pageToken?: string;
66
+ };
67
+ /**
68
+ * Describes the message toshi.workspace.v1.ListHostsRequest.
69
+ * Use `create(ListHostsRequestSchema)` to create a new message.
70
+ */
71
+ export declare const ListHostsRequestSchema: GenMessage<ListHostsRequest, {
72
+ jsonType: ListHostsRequestJson;
73
+ }>;
74
+ /**
75
+ * @generated from message toshi.workspace.v1.ListHostsResponse
76
+ */
77
+ export type ListHostsResponse = Message<"toshi.workspace.v1.ListHostsResponse"> & {
78
+ /**
79
+ * @generated from field: repeated toshi.workspace.v1.Host hosts = 1;
80
+ */
81
+ hosts: Host[];
82
+ /**
83
+ * The control plane's reaper.long_offline_after: a host whose last heartbeat
84
+ * is older, and that is offline, has long_offline set.
85
+ *
86
+ * @generated from field: google.protobuf.Duration long_offline_after = 2;
87
+ */
88
+ longOfflineAfter?: Duration | undefined;
89
+ /**
90
+ * Empty on the last page.
91
+ *
92
+ * @generated from field: string next_page_token = 3;
93
+ */
94
+ nextPageToken: string;
95
+ };
96
+ /**
97
+ * @generated from message toshi.workspace.v1.ListHostsResponse
98
+ */
99
+ export type ListHostsResponseJson = {
100
+ /**
101
+ * @generated from field: repeated toshi.workspace.v1.Host hosts = 1;
102
+ */
103
+ hosts?: HostJson[];
104
+ /**
105
+ * The control plane's reaper.long_offline_after: a host whose last heartbeat
106
+ * is older, and that is offline, has long_offline set.
107
+ *
108
+ * @generated from field: google.protobuf.Duration long_offline_after = 2;
109
+ */
110
+ longOfflineAfter?: DurationJson;
111
+ /**
112
+ * Empty on the last page.
113
+ *
114
+ * @generated from field: string next_page_token = 3;
115
+ */
116
+ nextPageToken?: string;
117
+ };
118
+ /**
119
+ * Describes the message toshi.workspace.v1.ListHostsResponse.
120
+ * Use `create(ListHostsResponseSchema)` to create a new message.
121
+ */
122
+ export declare const ListHostsResponseSchema: GenMessage<ListHostsResponse, {
123
+ jsonType: ListHostsResponseJson;
124
+ }>;
125
+ /**
126
+ * @generated from message toshi.workspace.v1.ListHostStorageRequest
127
+ */
128
+ export type ListHostStorageRequest = Message<"toshi.workspace.v1.ListHostStorageRequest"> & {
129
+ /**
130
+ * The host whose volumes to list.
131
+ *
132
+ * @generated from field: string host_id = 1;
133
+ */
134
+ hostId: string;
135
+ /**
136
+ * The most volumes in one page; zero lets the server choose.
137
+ *
138
+ * @generated from field: int32 page_size = 2;
139
+ */
140
+ pageSize: number;
141
+ /**
142
+ * From an earlier response's next_page_token; empty for the first page.
143
+ *
144
+ * @generated from field: string page_token = 3;
145
+ */
146
+ pageToken: string;
147
+ };
148
+ /**
149
+ * @generated from message toshi.workspace.v1.ListHostStorageRequest
150
+ */
151
+ export type ListHostStorageRequestJson = {
152
+ /**
153
+ * The host whose volumes to list.
154
+ *
155
+ * @generated from field: string host_id = 1;
156
+ */
157
+ hostId?: string;
158
+ /**
159
+ * The most volumes in one page; zero lets the server choose.
160
+ *
161
+ * @generated from field: int32 page_size = 2;
162
+ */
163
+ pageSize?: number;
164
+ /**
165
+ * From an earlier response's next_page_token; empty for the first page.
166
+ *
167
+ * @generated from field: string page_token = 3;
168
+ */
169
+ pageToken?: string;
170
+ };
171
+ /**
172
+ * Describes the message toshi.workspace.v1.ListHostStorageRequest.
173
+ * Use `create(ListHostStorageRequestSchema)` to create a new message.
174
+ */
175
+ export declare const ListHostStorageRequestSchema: GenMessage<ListHostStorageRequest, {
176
+ jsonType: ListHostStorageRequestJson;
177
+ }>;
178
+ /**
179
+ * @generated from message toshi.workspace.v1.ListHostStorageResponse
180
+ */
181
+ export type ListHostStorageResponse = Message<"toshi.workspace.v1.ListHostStorageResponse"> & {
182
+ /**
183
+ * @generated from field: repeated toshi.workspace.v1.HostVolume volumes = 1;
184
+ */
185
+ volumes: HostVolume[];
186
+ /**
187
+ * Empty on the last page.
188
+ *
189
+ * @generated from field: string next_page_token = 2;
190
+ */
191
+ nextPageToken: string;
192
+ };
193
+ /**
194
+ * @generated from message toshi.workspace.v1.ListHostStorageResponse
195
+ */
196
+ export type ListHostStorageResponseJson = {
197
+ /**
198
+ * @generated from field: repeated toshi.workspace.v1.HostVolume volumes = 1;
199
+ */
200
+ volumes?: HostVolumeJson[];
201
+ /**
202
+ * Empty on the last page.
203
+ *
204
+ * @generated from field: string next_page_token = 2;
205
+ */
206
+ nextPageToken?: string;
207
+ };
208
+ /**
209
+ * Describes the message toshi.workspace.v1.ListHostStorageResponse.
210
+ * Use `create(ListHostStorageResponseSchema)` to create a new message.
211
+ */
212
+ export declare const ListHostStorageResponseSchema: GenMessage<ListHostStorageResponse, {
213
+ jsonType: ListHostStorageResponseJson;
214
+ }>;
215
+ /**
216
+ * @generated from message toshi.workspace.v1.ListHostAlertsRequest
217
+ */
218
+ export type ListHostAlertsRequest = Message<"toshi.workspace.v1.ListHostAlertsRequest"> & {
219
+ /**
220
+ * The most alerts in one page; zero lets the server choose.
221
+ *
222
+ * @generated from field: int32 page_size = 1;
223
+ */
224
+ pageSize: number;
225
+ /**
226
+ * From an earlier response's next_page_token; empty for the first page.
227
+ *
228
+ * @generated from field: string page_token = 2;
229
+ */
230
+ pageToken: string;
231
+ };
232
+ /**
233
+ * @generated from message toshi.workspace.v1.ListHostAlertsRequest
234
+ */
235
+ export type ListHostAlertsRequestJson = {
236
+ /**
237
+ * The most alerts in one page; zero lets the server choose.
238
+ *
239
+ * @generated from field: int32 page_size = 1;
240
+ */
241
+ pageSize?: number;
242
+ /**
243
+ * From an earlier response's next_page_token; empty for the first page.
244
+ *
245
+ * @generated from field: string page_token = 2;
246
+ */
247
+ pageToken?: string;
248
+ };
249
+ /**
250
+ * Describes the message toshi.workspace.v1.ListHostAlertsRequest.
251
+ * Use `create(ListHostAlertsRequestSchema)` to create a new message.
252
+ */
253
+ export declare const ListHostAlertsRequestSchema: GenMessage<ListHostAlertsRequest, {
254
+ jsonType: ListHostAlertsRequestJson;
255
+ }>;
256
+ /**
257
+ * @generated from message toshi.workspace.v1.ListHostAlertsResponse
258
+ */
259
+ export type ListHostAlertsResponse = Message<"toshi.workspace.v1.ListHostAlertsResponse"> & {
260
+ /**
261
+ * @generated from field: repeated toshi.workspace.v1.HostAlert alerts = 1;
262
+ */
263
+ alerts: HostAlert[];
264
+ /**
265
+ * Empty on the last page.
266
+ *
267
+ * @generated from field: string next_page_token = 2;
268
+ */
269
+ nextPageToken: string;
270
+ };
271
+ /**
272
+ * @generated from message toshi.workspace.v1.ListHostAlertsResponse
273
+ */
274
+ export type ListHostAlertsResponseJson = {
275
+ /**
276
+ * @generated from field: repeated toshi.workspace.v1.HostAlert alerts = 1;
277
+ */
278
+ alerts?: HostAlertJson[];
279
+ /**
280
+ * Empty on the last page.
281
+ *
282
+ * @generated from field: string next_page_token = 2;
283
+ */
284
+ nextPageToken?: string;
285
+ };
286
+ /**
287
+ * Describes the message toshi.workspace.v1.ListHostAlertsResponse.
288
+ * Use `create(ListHostAlertsResponseSchema)` to create a new message.
289
+ */
290
+ export declare const ListHostAlertsResponseSchema: GenMessage<ListHostAlertsResponse, {
291
+ jsonType: ListHostAlertsResponseJson;
292
+ }>;
293
+ /**
294
+ * @generated from message toshi.workspace.v1.SetHostStateRequest
295
+ */
296
+ export type SetHostStateRequest = Message<"toshi.workspace.v1.SetHostStateRequest"> & {
297
+ /**
298
+ * @generated from field: string id = 1;
299
+ */
300
+ id: string;
301
+ /**
302
+ * HOST_STATE_DRAINING or HOST_STATE_ONLINE.
303
+ *
304
+ * @generated from field: toshi.workspace.v1.HostState state = 2;
305
+ */
306
+ state: HostState;
307
+ };
308
+ /**
309
+ * @generated from message toshi.workspace.v1.SetHostStateRequest
310
+ */
311
+ export type SetHostStateRequestJson = {
312
+ /**
313
+ * @generated from field: string id = 1;
314
+ */
315
+ id?: string;
316
+ /**
317
+ * HOST_STATE_DRAINING or HOST_STATE_ONLINE.
318
+ *
319
+ * @generated from field: toshi.workspace.v1.HostState state = 2;
320
+ */
321
+ state?: HostStateJson;
322
+ };
323
+ /**
324
+ * Describes the message toshi.workspace.v1.SetHostStateRequest.
325
+ * Use `create(SetHostStateRequestSchema)` to create a new message.
326
+ */
327
+ export declare const SetHostStateRequestSchema: GenMessage<SetHostStateRequest, {
328
+ jsonType: SetHostStateRequestJson;
329
+ }>;
330
+ /**
331
+ * @generated from message toshi.workspace.v1.SetHostStateResponse
332
+ */
333
+ export type SetHostStateResponse = Message<"toshi.workspace.v1.SetHostStateResponse"> & {
334
+ /**
335
+ * The host as stored after the change.
336
+ *
337
+ * @generated from field: toshi.workspace.v1.Host host = 1;
338
+ */
339
+ host?: Host | undefined;
340
+ };
341
+ /**
342
+ * @generated from message toshi.workspace.v1.SetHostStateResponse
343
+ */
344
+ export type SetHostStateResponseJson = {
345
+ /**
346
+ * The host as stored after the change.
347
+ *
348
+ * @generated from field: toshi.workspace.v1.Host host = 1;
349
+ */
350
+ host?: HostJson;
351
+ };
352
+ /**
353
+ * Describes the message toshi.workspace.v1.SetHostStateResponse.
354
+ * Use `create(SetHostStateResponseSchema)` to create a new message.
355
+ */
356
+ export declare const SetHostStateResponseSchema: GenMessage<SetHostStateResponse, {
357
+ jsonType: SetHostStateResponseJson;
358
+ }>;
359
+ /**
360
+ * @generated from message toshi.workspace.v1.RetireHostRequest
361
+ */
362
+ export type RetireHostRequest = Message<"toshi.workspace.v1.RetireHostRequest"> & {
363
+ /**
364
+ * @generated from field: string id = 1;
365
+ */
366
+ id: string;
367
+ };
368
+ /**
369
+ * @generated from message toshi.workspace.v1.RetireHostRequest
370
+ */
371
+ export type RetireHostRequestJson = {
372
+ /**
373
+ * @generated from field: string id = 1;
374
+ */
375
+ id?: string;
376
+ };
377
+ /**
378
+ * Describes the message toshi.workspace.v1.RetireHostRequest.
379
+ * Use `create(RetireHostRequestSchema)` to create a new message.
380
+ */
381
+ export declare const RetireHostRequestSchema: GenMessage<RetireHostRequest, {
382
+ jsonType: RetireHostRequestJson;
383
+ }>;
384
+ /**
385
+ * @generated from message toshi.workspace.v1.RetireHostResponse
386
+ */
387
+ export type RetireHostResponse = Message<"toshi.workspace.v1.RetireHostResponse"> & {};
388
+ /**
389
+ * @generated from message toshi.workspace.v1.RetireHostResponse
390
+ */
391
+ export type RetireHostResponseJson = {};
392
+ /**
393
+ * Describes the message toshi.workspace.v1.RetireHostResponse.
394
+ * Use `create(RetireHostResponseSchema)` to create a new message.
395
+ */
396
+ export declare const RetireHostResponseSchema: GenMessage<RetireHostResponse, {
397
+ jsonType: RetireHostResponseJson;
398
+ }>;
399
+ /**
400
+ * CreateCloudHostRequest names the cloud host to register.
401
+ *
402
+ * @generated from message toshi.workspace.v1.CreateCloudHostRequest
403
+ */
404
+ export type CreateCloudHostRequest = Message<"toshi.workspace.v1.CreateCloudHostRequest"> & {
405
+ /**
406
+ * The host name; it becomes the host id the same way enrollment does.
407
+ *
408
+ * @generated from field: string name = 1;
409
+ */
410
+ name: string;
411
+ /**
412
+ * The cloud provider: "aws" (the default) or "gcp".
413
+ *
414
+ * @generated from field: string cloud = 2;
415
+ */
416
+ cloud: string;
417
+ /**
418
+ * The AWS region the instances run in (AWS).
419
+ *
420
+ * @generated from field: string region = 3;
421
+ */
422
+ region: string;
423
+ /**
424
+ * The role in the workspace's account the control plane assumes (AWS).
425
+ *
426
+ * @generated from field: string role_arn = 4;
427
+ */
428
+ roleArn: string;
429
+ /**
430
+ * The image the instances boot: an AMI (AWS), or a GCE image or family
431
+ * (an image name, family/NAME, or a projects/... path).
432
+ *
433
+ * @generated from field: string image = 5;
434
+ */
435
+ image: string;
436
+ /**
437
+ * The subnet (AWS) or subnetwork (GCP, a name in the zone's region or
438
+ * regions/R/subnetworks/S) to launch into; empty means a default subnet
439
+ * or the default network.
440
+ *
441
+ * @generated from field: string subnet_id = 6;
442
+ */
443
+ subnetId: string;
444
+ /**
445
+ * The security groups of the instances; empty means the VPC default.
446
+ *
447
+ * @generated from field: repeated string security_group_ids = 7;
448
+ */
449
+ securityGroupIds: string[];
450
+ /**
451
+ * Maps a runner size to an instance type, overriding the defaults.
452
+ *
453
+ * @generated from field: map<string, string> instance_types = 8;
454
+ */
455
+ instanceTypes: {
456
+ [key: string]: string;
457
+ };
458
+ /**
459
+ * The most vCPUs the host runs at once; 0 means 64.
460
+ *
461
+ * @generated from field: int32 max_vcpus = 9;
462
+ */
463
+ maxVcpus: number;
464
+ /**
465
+ * Launches spot instances, moving an interrupted job onto on demand once.
466
+ *
467
+ * @generated from field: bool spot = 10;
468
+ */
469
+ spot: boolean;
470
+ /**
471
+ * The most instances the host runs at once; 0 means no limit.
472
+ *
473
+ * @generated from field: int32 max_instances = 11;
474
+ */
475
+ maxInstances: number;
476
+ /**
477
+ * The most instance-minutes the host runs per UTC day; 0 means no limit.
478
+ *
479
+ * @generated from field: int32 max_instance_minutes_per_day = 12;
480
+ */
481
+ maxInstanceMinutesPerDay: number;
482
+ /**
483
+ * The public addresses the host's instances reach the internet from, when
484
+ * the subnet sends their traffic through fixed ones (a NAT gateway's
485
+ * Elastic IP); empty means each instance's own public address.
486
+ *
487
+ * @generated from field: repeated string egress_ips = 13;
488
+ */
489
+ egressIps: string[];
490
+ /**
491
+ * Register the host as an ordinary own host instead of an overflow host:
492
+ * it then takes the workspace's jobs without waiting for the plan's
493
+ * overflow_after. False, the default, makes an overflow host.
494
+ *
495
+ * @generated from field: bool no_overflow = 14;
496
+ */
497
+ noOverflow: boolean;
498
+ /**
499
+ * The GCP project and zone the instances run in (GCP).
500
+ *
501
+ * @generated from field: string project = 15;
502
+ */
503
+ project: string;
504
+ /**
505
+ * @generated from field: string zone = 16;
506
+ */
507
+ zone: string;
508
+ /**
509
+ * The workspace's service account the control plane impersonates (GCP).
510
+ *
511
+ * @generated from field: string service_account = 17;
512
+ */
513
+ serviceAccount: string;
514
+ /**
515
+ * Where the instances reach the internet: "public" (the default: each
516
+ * instance gets its own public address) or "nat" (no public address; the
517
+ * subnet routes through the workspace's NAT gateway or Cloud NAT, whose
518
+ * addresses become the host's egress set).
519
+ *
520
+ * @generated from field: string egress = 18;
521
+ */
522
+ egress: string;
523
+ };
524
+ /**
525
+ * CreateCloudHostRequest names the cloud host to register.
526
+ *
527
+ * @generated from message toshi.workspace.v1.CreateCloudHostRequest
528
+ */
529
+ export type CreateCloudHostRequestJson = {
530
+ /**
531
+ * The host name; it becomes the host id the same way enrollment does.
532
+ *
533
+ * @generated from field: string name = 1;
534
+ */
535
+ name?: string;
536
+ /**
537
+ * The cloud provider: "aws" (the default) or "gcp".
538
+ *
539
+ * @generated from field: string cloud = 2;
540
+ */
541
+ cloud?: string;
542
+ /**
543
+ * The AWS region the instances run in (AWS).
544
+ *
545
+ * @generated from field: string region = 3;
546
+ */
547
+ region?: string;
548
+ /**
549
+ * The role in the workspace's account the control plane assumes (AWS).
550
+ *
551
+ * @generated from field: string role_arn = 4;
552
+ */
553
+ roleArn?: string;
554
+ /**
555
+ * The image the instances boot: an AMI (AWS), or a GCE image or family
556
+ * (an image name, family/NAME, or a projects/... path).
557
+ *
558
+ * @generated from field: string image = 5;
559
+ */
560
+ image?: string;
561
+ /**
562
+ * The subnet (AWS) or subnetwork (GCP, a name in the zone's region or
563
+ * regions/R/subnetworks/S) to launch into; empty means a default subnet
564
+ * or the default network.
565
+ *
566
+ * @generated from field: string subnet_id = 6;
567
+ */
568
+ subnetId?: string;
569
+ /**
570
+ * The security groups of the instances; empty means the VPC default.
571
+ *
572
+ * @generated from field: repeated string security_group_ids = 7;
573
+ */
574
+ securityGroupIds?: string[];
575
+ /**
576
+ * Maps a runner size to an instance type, overriding the defaults.
577
+ *
578
+ * @generated from field: map<string, string> instance_types = 8;
579
+ */
580
+ instanceTypes?: {
581
+ [key: string]: string;
582
+ };
583
+ /**
584
+ * The most vCPUs the host runs at once; 0 means 64.
585
+ *
586
+ * @generated from field: int32 max_vcpus = 9;
587
+ */
588
+ maxVcpus?: number;
589
+ /**
590
+ * Launches spot instances, moving an interrupted job onto on demand once.
591
+ *
592
+ * @generated from field: bool spot = 10;
593
+ */
594
+ spot?: boolean;
595
+ /**
596
+ * The most instances the host runs at once; 0 means no limit.
597
+ *
598
+ * @generated from field: int32 max_instances = 11;
599
+ */
600
+ maxInstances?: number;
601
+ /**
602
+ * The most instance-minutes the host runs per UTC day; 0 means no limit.
603
+ *
604
+ * @generated from field: int32 max_instance_minutes_per_day = 12;
605
+ */
606
+ maxInstanceMinutesPerDay?: number;
607
+ /**
608
+ * The public addresses the host's instances reach the internet from, when
609
+ * the subnet sends their traffic through fixed ones (a NAT gateway's
610
+ * Elastic IP); empty means each instance's own public address.
611
+ *
612
+ * @generated from field: repeated string egress_ips = 13;
613
+ */
614
+ egressIps?: string[];
615
+ /**
616
+ * Register the host as an ordinary own host instead of an overflow host:
617
+ * it then takes the workspace's jobs without waiting for the plan's
618
+ * overflow_after. False, the default, makes an overflow host.
619
+ *
620
+ * @generated from field: bool no_overflow = 14;
621
+ */
622
+ noOverflow?: boolean;
623
+ /**
624
+ * The GCP project and zone the instances run in (GCP).
625
+ *
626
+ * @generated from field: string project = 15;
627
+ */
628
+ project?: string;
629
+ /**
630
+ * @generated from field: string zone = 16;
631
+ */
632
+ zone?: string;
633
+ /**
634
+ * The workspace's service account the control plane impersonates (GCP).
635
+ *
636
+ * @generated from field: string service_account = 17;
637
+ */
638
+ serviceAccount?: string;
639
+ /**
640
+ * Where the instances reach the internet: "public" (the default: each
641
+ * instance gets its own public address) or "nat" (no public address; the
642
+ * subnet routes through the workspace's NAT gateway or Cloud NAT, whose
643
+ * addresses become the host's egress set).
644
+ *
645
+ * @generated from field: string egress = 18;
646
+ */
647
+ egress?: string;
648
+ };
649
+ /**
650
+ * Describes the message toshi.workspace.v1.CreateCloudHostRequest.
651
+ * Use `create(CreateCloudHostRequestSchema)` to create a new message.
652
+ */
653
+ export declare const CreateCloudHostRequestSchema: GenMessage<CreateCloudHostRequest, {
654
+ jsonType: CreateCloudHostRequestJson;
655
+ }>;
656
+ /**
657
+ * CreateCloudHostResponse carries the host, the trust external id and the
658
+ * principal the role must allow.
659
+ *
660
+ * @generated from message toshi.workspace.v1.CreateCloudHostResponse
661
+ */
662
+ export type CreateCloudHostResponse = Message<"toshi.workspace.v1.CreateCloudHostResponse"> & {
663
+ /**
664
+ * @generated from field: toshi.workspace.v1.Host host = 1;
665
+ */
666
+ host?: Host | undefined;
667
+ /**
668
+ * The external ID the role's trust policy requires.
669
+ *
670
+ * @generated from field: string external_id = 2;
671
+ */
672
+ externalId: string;
673
+ /**
674
+ * The AWS principal the workspace's role must trust (AWS).
675
+ *
676
+ * @generated from field: string principal_arn = 3;
677
+ */
678
+ principalArn: string;
679
+ /**
680
+ * @generated from field: toshi.workspace.v1.CloudHost cloud_host = 4;
681
+ */
682
+ cloudHost?: CloudHost | undefined;
683
+ /**
684
+ * The Google principal the workspace's service account must let create
685
+ * tokens for it, with roles/iam.serviceAccountTokenCreator (GCP).
686
+ *
687
+ * @generated from field: string gcp_principal = 5;
688
+ */
689
+ gcpPrincipal: string;
690
+ };
691
+ /**
692
+ * CreateCloudHostResponse carries the host, the trust external id and the
693
+ * principal the role must allow.
694
+ *
695
+ * @generated from message toshi.workspace.v1.CreateCloudHostResponse
696
+ */
697
+ export type CreateCloudHostResponseJson = {
698
+ /**
699
+ * @generated from field: toshi.workspace.v1.Host host = 1;
700
+ */
701
+ host?: HostJson;
702
+ /**
703
+ * The external ID the role's trust policy requires.
704
+ *
705
+ * @generated from field: string external_id = 2;
706
+ */
707
+ externalId?: string;
708
+ /**
709
+ * The AWS principal the workspace's role must trust (AWS).
710
+ *
711
+ * @generated from field: string principal_arn = 3;
712
+ */
713
+ principalArn?: string;
714
+ /**
715
+ * @generated from field: toshi.workspace.v1.CloudHost cloud_host = 4;
716
+ */
717
+ cloudHost?: CloudHostJson;
718
+ /**
719
+ * The Google principal the workspace's service account must let create
720
+ * tokens for it, with roles/iam.serviceAccountTokenCreator (GCP).
721
+ *
722
+ * @generated from field: string gcp_principal = 5;
723
+ */
724
+ gcpPrincipal?: string;
725
+ };
726
+ /**
727
+ * Describes the message toshi.workspace.v1.CreateCloudHostResponse.
728
+ * Use `create(CreateCloudHostResponseSchema)` to create a new message.
729
+ */
730
+ export declare const CreateCloudHostResponseSchema: GenMessage<CreateCloudHostResponse, {
731
+ jsonType: CreateCloudHostResponseJson;
732
+ }>;
733
+ /**
734
+ * @generated from message toshi.workspace.v1.CheckCloudHostRequest
735
+ */
736
+ export type CheckCloudHostRequest = Message<"toshi.workspace.v1.CheckCloudHostRequest"> & {
737
+ /**
738
+ * @generated from field: string host_id = 1;
739
+ */
740
+ hostId: string;
741
+ };
742
+ /**
743
+ * @generated from message toshi.workspace.v1.CheckCloudHostRequest
744
+ */
745
+ export type CheckCloudHostRequestJson = {
746
+ /**
747
+ * @generated from field: string host_id = 1;
748
+ */
749
+ hostId?: string;
750
+ };
751
+ /**
752
+ * Describes the message toshi.workspace.v1.CheckCloudHostRequest.
753
+ * Use `create(CheckCloudHostRequestSchema)` to create a new message.
754
+ */
755
+ export declare const CheckCloudHostRequestSchema: GenMessage<CheckCloudHostRequest, {
756
+ jsonType: CheckCloudHostRequestJson;
757
+ }>;
758
+ /**
759
+ * @generated from message toshi.workspace.v1.CheckCloudHostResponse
760
+ */
761
+ export type CheckCloudHostResponse = Message<"toshi.workspace.v1.CheckCloudHostResponse"> & {
762
+ /**
763
+ * One row per check, in the order they ran.
764
+ *
765
+ * @generated from field: repeated toshi.workspace.v1.CloudHostCheck checks = 1;
766
+ */
767
+ checks: CloudHostCheck[];
768
+ };
769
+ /**
770
+ * @generated from message toshi.workspace.v1.CheckCloudHostResponse
771
+ */
772
+ export type CheckCloudHostResponseJson = {
773
+ /**
774
+ * One row per check, in the order they ran.
775
+ *
776
+ * @generated from field: repeated toshi.workspace.v1.CloudHostCheck checks = 1;
777
+ */
778
+ checks?: CloudHostCheckJson[];
779
+ };
780
+ /**
781
+ * Describes the message toshi.workspace.v1.CheckCloudHostResponse.
782
+ * Use `create(CheckCloudHostResponseSchema)` to create a new message.
783
+ */
784
+ export declare const CheckCloudHostResponseSchema: GenMessage<CheckCloudHostResponse, {
785
+ jsonType: CheckCloudHostResponseJson;
786
+ }>;
787
+ /**
788
+ * CreateEnrollmentTokenRequest says how the token's hosts register.
789
+ *
790
+ * @generated from message toshi.workspace.v1.CreateEnrollmentTokenRequest
791
+ */
792
+ export type CreateEnrollmentTokenRequest = Message<"toshi.workspace.v1.CreateEnrollmentTokenRequest"> & {
793
+ /**
794
+ * Hosts that enroll with the token register as overflow hosts.
795
+ *
796
+ * @generated from field: bool overflow = 1;
797
+ */
798
+ overflow: boolean;
799
+ };
800
+ /**
801
+ * CreateEnrollmentTokenRequest says how the token's hosts register.
802
+ *
803
+ * @generated from message toshi.workspace.v1.CreateEnrollmentTokenRequest
804
+ */
805
+ export type CreateEnrollmentTokenRequestJson = {
806
+ /**
807
+ * Hosts that enroll with the token register as overflow hosts.
808
+ *
809
+ * @generated from field: bool overflow = 1;
810
+ */
811
+ overflow?: boolean;
812
+ };
813
+ /**
814
+ * Describes the message toshi.workspace.v1.CreateEnrollmentTokenRequest.
815
+ * Use `create(CreateEnrollmentTokenRequestSchema)` to create a new message.
816
+ */
817
+ export declare const CreateEnrollmentTokenRequestSchema: GenMessage<CreateEnrollmentTokenRequest, {
818
+ jsonType: CreateEnrollmentTokenRequestJson;
819
+ }>;
820
+ /**
821
+ * CreateEnrollmentTokenResponse carries the new token and its value.
822
+ *
823
+ * @generated from message toshi.workspace.v1.CreateEnrollmentTokenResponse
824
+ */
825
+ export type CreateEnrollmentTokenResponse = Message<"toshi.workspace.v1.CreateEnrollmentTokenResponse"> & {
826
+ /**
827
+ * @generated from field: toshi.workspace.v1.Token token = 1;
828
+ */
829
+ token?: Token | undefined;
830
+ /**
831
+ * The new token. It is returned only here.
832
+ *
833
+ * @generated from field: string value = 2;
834
+ */
835
+ value: string;
836
+ };
837
+ /**
838
+ * CreateEnrollmentTokenResponse carries the new token and its value.
839
+ *
840
+ * @generated from message toshi.workspace.v1.CreateEnrollmentTokenResponse
841
+ */
842
+ export type CreateEnrollmentTokenResponseJson = {
843
+ /**
844
+ * @generated from field: toshi.workspace.v1.Token token = 1;
845
+ */
846
+ token?: TokenJson;
847
+ /**
848
+ * The new token. It is returned only here.
849
+ *
850
+ * @generated from field: string value = 2;
851
+ */
852
+ value?: string;
853
+ };
854
+ /**
855
+ * Describes the message toshi.workspace.v1.CreateEnrollmentTokenResponse.
856
+ * Use `create(CreateEnrollmentTokenResponseSchema)` to create a new message.
857
+ */
858
+ export declare const CreateEnrollmentTokenResponseSchema: GenMessage<CreateEnrollmentTokenResponse, {
859
+ jsonType: CreateEnrollmentTokenResponseJson;
860
+ }>;
861
+ /**
862
+ * Host is a machine that runs VMs for Toshi.
863
+ *
864
+ * @generated from message toshi.workspace.v1.Host
865
+ */
866
+ export type Host = Message<"toshi.workspace.v1.Host"> & {
867
+ /**
868
+ * @generated from field: string id = 1;
869
+ */
870
+ id: string;
871
+ /**
872
+ * @generated from field: string name = 2;
873
+ */
874
+ name: string;
875
+ /**
876
+ * The guest operating systems the host can run.
877
+ *
878
+ * @generated from field: repeated string os = 3;
879
+ */
880
+ os: string[];
881
+ /**
882
+ * @generated from field: int32 cpus = 4;
883
+ */
884
+ cpus: number;
885
+ /**
886
+ * @generated from field: int32 memory_mib = 5;
887
+ */
888
+ memoryMib: number;
889
+ /**
890
+ * @generated from field: map<string, string> labels = 6;
891
+ */
892
+ labels: {
893
+ [key: string]: string;
894
+ };
895
+ /**
896
+ * @generated from field: toshi.workspace.v1.HostState state = 7;
897
+ */
898
+ state: HostState;
899
+ /**
900
+ * When the host's agent last reported in; unset if it never did.
901
+ *
902
+ * @generated from field: google.protobuf.Timestamp last_seen_at = 8;
903
+ */
904
+ lastSeenAt?: Timestamp | undefined;
905
+ /**
906
+ * Memory not used by VMs, in MiB, from the host's last heartbeat.
907
+ *
908
+ * @generated from field: int64 free_memory_mib = 9;
909
+ */
910
+ freeMemoryMib: bigint;
911
+ /**
912
+ * Warm pools whose refill the host holds, from its last heartbeat.
913
+ *
914
+ * @generated from field: repeated toshi.workspace.v1.HeldRefill held_refills = 10;
915
+ */
916
+ heldRefills: HeldRefill[];
917
+ /**
918
+ * The host's agent is draining before a stop: it takes no new jobs. On an
919
+ * offline host: the host was draining when it went offline.
920
+ *
921
+ * @generated from field: bool stopping = 11;
922
+ */
923
+ stopping: boolean;
924
+ /**
925
+ * The cloud the host runs in when it is a cloud host ("aws"); empty
926
+ * otherwise.
927
+ *
928
+ * @generated from field: string cloud = 12;
929
+ */
930
+ cloud: string;
931
+ /**
932
+ * An overflow host takes a job only when no other host the job may use has
933
+ * room and the job has queued for its plan's overflow_after.
934
+ *
935
+ * @generated from field: bool overflow = 13;
936
+ */
937
+ overflow: boolean;
938
+ /**
939
+ * The host's public egress addresses.
940
+ *
941
+ * @generated from field: toshi.workspace.v1.HostEgress egress = 14;
942
+ */
943
+ egress?: HostEgress | undefined;
944
+ /**
945
+ * The version the host's agent reported when it last registered; empty when unknown.
946
+ *
947
+ * @generated from field: string agent_version = 15;
948
+ */
949
+ agentVersion: string;
950
+ /**
951
+ * Whether agent_version is inside the promise between this control plane and its agents.
952
+ *
953
+ * @generated from field: toshi.workspace.v1.AgentVersionStatus agent_version_status = 16;
954
+ */
955
+ agentVersionStatus: AgentVersionStatus;
956
+ /**
957
+ * Why agent_version is outside the promise; empty unless agent_version_status is SKEW.
958
+ *
959
+ * @generated from field: string agent_version_skew = 17;
960
+ */
961
+ agentVersionSkew: string;
962
+ /**
963
+ * True when the host is offline and its last heartbeat is older than the
964
+ * control plane's reaper.long_offline_after.
965
+ *
966
+ * @generated from field: bool long_offline = 18;
967
+ */
968
+ longOffline: boolean;
969
+ /**
970
+ * Why the control plane refused the host's last heartbeat: the field that
971
+ * was refused, with its size and the limit when it was over one, or that
972
+ * it holds a control character. Empty once a
973
+ * heartbeat of the host is taken. ListHosts sets it. The control plane
974
+ * keeps it in memory: after its restart the field is empty until the
975
+ * host's next heartbeat.
976
+ *
977
+ * @generated from field: string heartbeat_refusal = 19;
978
+ */
979
+ heartbeatRefusal: string;
980
+ /**
981
+ * When that heartbeat was refused; unset when heartbeat_refusal is empty.
982
+ *
983
+ * @generated from field: google.protobuf.Timestamp heartbeat_refused_at = 20;
984
+ */
985
+ heartbeatRefusedAt?: Timestamp | undefined;
986
+ /**
987
+ * The host's tier: "container" for a container tier host,
988
+ * which runs its owner's jobs in Sysbox containers that share its kernel;
989
+ * empty for a host that runs each job in a VM.
990
+ *
991
+ * @generated from field: string tier = 21;
992
+ */
993
+ tier: string;
994
+ /**
995
+ * When the operator revoked the host; unset for a host that is
996
+ * not revoked. A revoked host is offline for good and never registers
997
+ * again under its ID.
998
+ *
999
+ * @generated from field: google.protobuf.Timestamp revoked_at = 22;
1000
+ */
1001
+ revokedAt?: Timestamp | undefined;
1002
+ /**
1003
+ * The memory limit, in MiB, the host's agent reported at its last answered
1004
+ * heartbeat (toshi.agent.v1.MemoryLimit). 0 when it reports none or a
1005
+ * limit of 0, as an agent without a limit, one whose cgroup stopped
1006
+ * limiting, or one that predates the report does.
1007
+ *
1008
+ * @generated from field: int64 memory_limit_mib = 23;
1009
+ */
1010
+ memoryLimitMib: bigint;
1011
+ /**
1012
+ * Where that limit comes from: "memory_limit_mib" when the operator set it
1013
+ * in the agent configuration, or "cgroup:<dir>" for the cgroup memory.max
1014
+ * the agent discovered. Empty when memory_limit_mib is 0.
1015
+ *
1016
+ * @generated from field: string memory_limit_source = 24;
1017
+ */
1018
+ memoryLimitSource: string;
1019
+ /**
1020
+ * The minimum agent release the control plane admits when
1021
+ * agent_version_status is BELOW_MINIMUM; empty otherwise.
1022
+ *
1023
+ * @generated from field: string agent_version_minimum = 25;
1024
+ */
1025
+ agentVersionMinimum: string;
1026
+ };
1027
+ /**
1028
+ * Host is a machine that runs VMs for Toshi.
1029
+ *
1030
+ * @generated from message toshi.workspace.v1.Host
1031
+ */
1032
+ export type HostJson = {
1033
+ /**
1034
+ * @generated from field: string id = 1;
1035
+ */
1036
+ id?: string;
1037
+ /**
1038
+ * @generated from field: string name = 2;
1039
+ */
1040
+ name?: string;
1041
+ /**
1042
+ * The guest operating systems the host can run.
1043
+ *
1044
+ * @generated from field: repeated string os = 3;
1045
+ */
1046
+ os?: string[];
1047
+ /**
1048
+ * @generated from field: int32 cpus = 4;
1049
+ */
1050
+ cpus?: number;
1051
+ /**
1052
+ * @generated from field: int32 memory_mib = 5;
1053
+ */
1054
+ memoryMib?: number;
1055
+ /**
1056
+ * @generated from field: map<string, string> labels = 6;
1057
+ */
1058
+ labels?: {
1059
+ [key: string]: string;
1060
+ };
1061
+ /**
1062
+ * @generated from field: toshi.workspace.v1.HostState state = 7;
1063
+ */
1064
+ state?: HostStateJson;
1065
+ /**
1066
+ * When the host's agent last reported in; unset if it never did.
1067
+ *
1068
+ * @generated from field: google.protobuf.Timestamp last_seen_at = 8;
1069
+ */
1070
+ lastSeenAt?: TimestampJson;
1071
+ /**
1072
+ * Memory not used by VMs, in MiB, from the host's last heartbeat.
1073
+ *
1074
+ * @generated from field: int64 free_memory_mib = 9;
1075
+ */
1076
+ freeMemoryMib?: string;
1077
+ /**
1078
+ * Warm pools whose refill the host holds, from its last heartbeat.
1079
+ *
1080
+ * @generated from field: repeated toshi.workspace.v1.HeldRefill held_refills = 10;
1081
+ */
1082
+ heldRefills?: HeldRefillJson[];
1083
+ /**
1084
+ * The host's agent is draining before a stop: it takes no new jobs. On an
1085
+ * offline host: the host was draining when it went offline.
1086
+ *
1087
+ * @generated from field: bool stopping = 11;
1088
+ */
1089
+ stopping?: boolean;
1090
+ /**
1091
+ * The cloud the host runs in when it is a cloud host ("aws"); empty
1092
+ * otherwise.
1093
+ *
1094
+ * @generated from field: string cloud = 12;
1095
+ */
1096
+ cloud?: string;
1097
+ /**
1098
+ * An overflow host takes a job only when no other host the job may use has
1099
+ * room and the job has queued for its plan's overflow_after.
1100
+ *
1101
+ * @generated from field: bool overflow = 13;
1102
+ */
1103
+ overflow?: boolean;
1104
+ /**
1105
+ * The host's public egress addresses.
1106
+ *
1107
+ * @generated from field: toshi.workspace.v1.HostEgress egress = 14;
1108
+ */
1109
+ egress?: HostEgressJson;
1110
+ /**
1111
+ * The version the host's agent reported when it last registered; empty when unknown.
1112
+ *
1113
+ * @generated from field: string agent_version = 15;
1114
+ */
1115
+ agentVersion?: string;
1116
+ /**
1117
+ * Whether agent_version is inside the promise between this control plane and its agents.
1118
+ *
1119
+ * @generated from field: toshi.workspace.v1.AgentVersionStatus agent_version_status = 16;
1120
+ */
1121
+ agentVersionStatus?: AgentVersionStatusJson;
1122
+ /**
1123
+ * Why agent_version is outside the promise; empty unless agent_version_status is SKEW.
1124
+ *
1125
+ * @generated from field: string agent_version_skew = 17;
1126
+ */
1127
+ agentVersionSkew?: string;
1128
+ /**
1129
+ * True when the host is offline and its last heartbeat is older than the
1130
+ * control plane's reaper.long_offline_after.
1131
+ *
1132
+ * @generated from field: bool long_offline = 18;
1133
+ */
1134
+ longOffline?: boolean;
1135
+ /**
1136
+ * Why the control plane refused the host's last heartbeat: the field that
1137
+ * was refused, with its size and the limit when it was over one, or that
1138
+ * it holds a control character. Empty once a
1139
+ * heartbeat of the host is taken. ListHosts sets it. The control plane
1140
+ * keeps it in memory: after its restart the field is empty until the
1141
+ * host's next heartbeat.
1142
+ *
1143
+ * @generated from field: string heartbeat_refusal = 19;
1144
+ */
1145
+ heartbeatRefusal?: string;
1146
+ /**
1147
+ * When that heartbeat was refused; unset when heartbeat_refusal is empty.
1148
+ *
1149
+ * @generated from field: google.protobuf.Timestamp heartbeat_refused_at = 20;
1150
+ */
1151
+ heartbeatRefusedAt?: TimestampJson;
1152
+ /**
1153
+ * The host's tier: "container" for a container tier host,
1154
+ * which runs its owner's jobs in Sysbox containers that share its kernel;
1155
+ * empty for a host that runs each job in a VM.
1156
+ *
1157
+ * @generated from field: string tier = 21;
1158
+ */
1159
+ tier?: string;
1160
+ /**
1161
+ * When the operator revoked the host; unset for a host that is
1162
+ * not revoked. A revoked host is offline for good and never registers
1163
+ * again under its ID.
1164
+ *
1165
+ * @generated from field: google.protobuf.Timestamp revoked_at = 22;
1166
+ */
1167
+ revokedAt?: TimestampJson;
1168
+ /**
1169
+ * The memory limit, in MiB, the host's agent reported at its last answered
1170
+ * heartbeat (toshi.agent.v1.MemoryLimit). 0 when it reports none or a
1171
+ * limit of 0, as an agent without a limit, one whose cgroup stopped
1172
+ * limiting, or one that predates the report does.
1173
+ *
1174
+ * @generated from field: int64 memory_limit_mib = 23;
1175
+ */
1176
+ memoryLimitMib?: string;
1177
+ /**
1178
+ * Where that limit comes from: "memory_limit_mib" when the operator set it
1179
+ * in the agent configuration, or "cgroup:<dir>" for the cgroup memory.max
1180
+ * the agent discovered. Empty when memory_limit_mib is 0.
1181
+ *
1182
+ * @generated from field: string memory_limit_source = 24;
1183
+ */
1184
+ memoryLimitSource?: string;
1185
+ /**
1186
+ * The minimum agent release the control plane admits when
1187
+ * agent_version_status is BELOW_MINIMUM; empty otherwise.
1188
+ *
1189
+ * @generated from field: string agent_version_minimum = 25;
1190
+ */
1191
+ agentVersionMinimum?: string;
1192
+ };
1193
+ /**
1194
+ * Describes the message toshi.workspace.v1.Host.
1195
+ * Use `create(HostSchema)` to create a new message.
1196
+ */
1197
+ export declare const HostSchema: GenMessage<Host, {
1198
+ jsonType: HostJson;
1199
+ }>;
1200
+ /**
1201
+ * HeldRefill is one warm pool whose refill a host holds.
1202
+ *
1203
+ * @generated from message toshi.workspace.v1.HeldRefill
1204
+ */
1205
+ export type HeldRefill = Message<"toshi.workspace.v1.HeldRefill"> & {
1206
+ /**
1207
+ * @generated from field: string size = 1;
1208
+ */
1209
+ size: string;
1210
+ /**
1211
+ * "memory" or "cpus".
1212
+ *
1213
+ * @generated from field: string reason = 2;
1214
+ */
1215
+ reason: string;
1216
+ };
1217
+ /**
1218
+ * HeldRefill is one warm pool whose refill a host holds.
1219
+ *
1220
+ * @generated from message toshi.workspace.v1.HeldRefill
1221
+ */
1222
+ export type HeldRefillJson = {
1223
+ /**
1224
+ * @generated from field: string size = 1;
1225
+ */
1226
+ size?: string;
1227
+ /**
1228
+ * "memory" or "cpus".
1229
+ *
1230
+ * @generated from field: string reason = 2;
1231
+ */
1232
+ reason?: string;
1233
+ };
1234
+ /**
1235
+ * Describes the message toshi.workspace.v1.HeldRefill.
1236
+ * Use `create(HeldRefillSchema)` to create a new message.
1237
+ */
1238
+ export declare const HeldRefillSchema: GenMessage<HeldRefill, {
1239
+ jsonType: HeldRefillJson;
1240
+ }>;
1241
+ /**
1242
+ * HostEgress is the public addresses a host's jobs reach the internet from.
1243
+ *
1244
+ * @generated from message toshi.workspace.v1.HostEgress
1245
+ */
1246
+ export type HostEgress = Message<"toshi.workspace.v1.HostEgress"> & {
1247
+ /**
1248
+ * IPv4 or IPv6 addresses or CIDR prefixes, sorted; empty unless source is
1249
+ * EGRESS_SOURCE_CONFIGURED or EGRESS_SOURCE_DISCOVERED.
1250
+ *
1251
+ * @generated from field: repeated string ips = 1;
1252
+ */
1253
+ ips: string[];
1254
+ /**
1255
+ * @generated from field: toshi.workspace.v1.EgressSource source = 2;
1256
+ */
1257
+ source: EgressSource;
1258
+ /**
1259
+ * When the addresses last changed; unset when they never did.
1260
+ *
1261
+ * @generated from field: google.protobuf.Timestamp changed_at = 3;
1262
+ */
1263
+ changedAt?: Timestamp | undefined;
1264
+ };
1265
+ /**
1266
+ * HostEgress is the public addresses a host's jobs reach the internet from.
1267
+ *
1268
+ * @generated from message toshi.workspace.v1.HostEgress
1269
+ */
1270
+ export type HostEgressJson = {
1271
+ /**
1272
+ * IPv4 or IPv6 addresses or CIDR prefixes, sorted; empty unless source is
1273
+ * EGRESS_SOURCE_CONFIGURED or EGRESS_SOURCE_DISCOVERED.
1274
+ *
1275
+ * @generated from field: repeated string ips = 1;
1276
+ */
1277
+ ips?: string[];
1278
+ /**
1279
+ * @generated from field: toshi.workspace.v1.EgressSource source = 2;
1280
+ */
1281
+ source?: EgressSourceJson;
1282
+ /**
1283
+ * When the addresses last changed; unset when they never did.
1284
+ *
1285
+ * @generated from field: google.protobuf.Timestamp changed_at = 3;
1286
+ */
1287
+ changedAt?: TimestampJson;
1288
+ };
1289
+ /**
1290
+ * Describes the message toshi.workspace.v1.HostEgress.
1291
+ * Use `create(HostEgressSchema)` to create a new message.
1292
+ */
1293
+ export declare const HostEgressSchema: GenMessage<HostEgress, {
1294
+ jsonType: HostEgressJson;
1295
+ }>;
1296
+ /**
1297
+ * HostVolume is one volume a host holds.
1298
+ *
1299
+ * @generated from message toshi.workspace.v1.HostVolume
1300
+ */
1301
+ export type HostVolume = Message<"toshi.workspace.v1.HostVolume"> & {
1302
+ /**
1303
+ * The volume's id.
1304
+ *
1305
+ * @generated from field: string volume_id = 1;
1306
+ */
1307
+ volumeId: string;
1308
+ /**
1309
+ * The name of the project the volume belongs to.
1310
+ *
1311
+ * @generated from field: string project = 2;
1312
+ */
1313
+ project: string;
1314
+ /**
1315
+ * The id of the project the volume belongs to.
1316
+ *
1317
+ * @generated from field: string project_id = 3;
1318
+ */
1319
+ projectId: string;
1320
+ /**
1321
+ * The volume's name.
1322
+ *
1323
+ * @generated from field: string name = 4;
1324
+ */
1325
+ name: string;
1326
+ /**
1327
+ * The volume's mode name: cache, seed, state or artifact.
1328
+ *
1329
+ * @generated from field: string mode = 5;
1330
+ */
1331
+ mode: string;
1332
+ /**
1333
+ * The most the volume holds, in bytes.
1334
+ *
1335
+ * @generated from field: int64 size_cap_bytes = 6;
1336
+ */
1337
+ sizeCapBytes: bigint;
1338
+ /**
1339
+ * The host keeps the volume's warm copy.
1340
+ *
1341
+ * @generated from field: bool warm_copy = 7;
1342
+ */
1343
+ warmCopy: boolean;
1344
+ /**
1345
+ * The open claim of a job on this host; empty when none.
1346
+ *
1347
+ * @generated from field: string claim_id = 8;
1348
+ */
1349
+ claimId: string;
1350
+ /**
1351
+ * The claiming job.
1352
+ *
1353
+ * @generated from field: string job_id = 9;
1354
+ */
1355
+ jobId: string;
1356
+ /**
1357
+ * When the claim was taken.
1358
+ *
1359
+ * @generated from field: google.protobuf.Timestamp claimed_at = 10;
1360
+ */
1361
+ claimedAt?: Timestamp | undefined;
1362
+ };
1363
+ /**
1364
+ * HostVolume is one volume a host holds.
1365
+ *
1366
+ * @generated from message toshi.workspace.v1.HostVolume
1367
+ */
1368
+ export type HostVolumeJson = {
1369
+ /**
1370
+ * The volume's id.
1371
+ *
1372
+ * @generated from field: string volume_id = 1;
1373
+ */
1374
+ volumeId?: string;
1375
+ /**
1376
+ * The name of the project the volume belongs to.
1377
+ *
1378
+ * @generated from field: string project = 2;
1379
+ */
1380
+ project?: string;
1381
+ /**
1382
+ * The id of the project the volume belongs to.
1383
+ *
1384
+ * @generated from field: string project_id = 3;
1385
+ */
1386
+ projectId?: string;
1387
+ /**
1388
+ * The volume's name.
1389
+ *
1390
+ * @generated from field: string name = 4;
1391
+ */
1392
+ name?: string;
1393
+ /**
1394
+ * The volume's mode name: cache, seed, state or artifact.
1395
+ *
1396
+ * @generated from field: string mode = 5;
1397
+ */
1398
+ mode?: string;
1399
+ /**
1400
+ * The most the volume holds, in bytes.
1401
+ *
1402
+ * @generated from field: int64 size_cap_bytes = 6;
1403
+ */
1404
+ sizeCapBytes?: string;
1405
+ /**
1406
+ * The host keeps the volume's warm copy.
1407
+ *
1408
+ * @generated from field: bool warm_copy = 7;
1409
+ */
1410
+ warmCopy?: boolean;
1411
+ /**
1412
+ * The open claim of a job on this host; empty when none.
1413
+ *
1414
+ * @generated from field: string claim_id = 8;
1415
+ */
1416
+ claimId?: string;
1417
+ /**
1418
+ * The claiming job.
1419
+ *
1420
+ * @generated from field: string job_id = 9;
1421
+ */
1422
+ jobId?: string;
1423
+ /**
1424
+ * When the claim was taken.
1425
+ *
1426
+ * @generated from field: google.protobuf.Timestamp claimed_at = 10;
1427
+ */
1428
+ claimedAt?: TimestampJson;
1429
+ };
1430
+ /**
1431
+ * Describes the message toshi.workspace.v1.HostVolume.
1432
+ * Use `create(HostVolumeSchema)` to create a new message.
1433
+ */
1434
+ export declare const HostVolumeSchema: GenMessage<HostVolume, {
1435
+ jsonType: HostVolumeJson;
1436
+ }>;
1437
+ /**
1438
+ * HostAlert is one active alert of the workspace's hosts.
1439
+ *
1440
+ * @generated from message toshi.workspace.v1.HostAlert
1441
+ */
1442
+ export type HostAlert = Message<"toshi.workspace.v1.HostAlert"> & {
1443
+ /**
1444
+ * kind is the alert, such as "runner_exits_without_job".
1445
+ *
1446
+ * @generated from field: string kind = 1;
1447
+ */
1448
+ kind: string;
1449
+ /**
1450
+ * raised_at is when it was raised; since is the first event it counts.
1451
+ *
1452
+ * @generated from field: google.protobuf.Timestamp raised_at = 2;
1453
+ */
1454
+ raisedAt?: Timestamp | undefined;
1455
+ /**
1456
+ * @generated from field: google.protobuf.Timestamp since = 3;
1457
+ */
1458
+ since?: Timestamp | undefined;
1459
+ /**
1460
+ * count is the events counted from since, and reasons the same events by
1461
+ * reason; top_reason has the most.
1462
+ *
1463
+ * @generated from field: int64 count = 4;
1464
+ */
1465
+ count: bigint;
1466
+ /**
1467
+ * @generated from field: map<string, int64> reasons = 5;
1468
+ */
1469
+ reasons: {
1470
+ [key: string]: bigint;
1471
+ };
1472
+ /**
1473
+ * @generated from field: string top_reason = 6;
1474
+ */
1475
+ topReason: string;
1476
+ /**
1477
+ * message says the same in one line.
1478
+ *
1479
+ * @generated from field: string message = 7;
1480
+ */
1481
+ message: string;
1482
+ };
1483
+ /**
1484
+ * HostAlert is one active alert of the workspace's hosts.
1485
+ *
1486
+ * @generated from message toshi.workspace.v1.HostAlert
1487
+ */
1488
+ export type HostAlertJson = {
1489
+ /**
1490
+ * kind is the alert, such as "runner_exits_without_job".
1491
+ *
1492
+ * @generated from field: string kind = 1;
1493
+ */
1494
+ kind?: string;
1495
+ /**
1496
+ * raised_at is when it was raised; since is the first event it counts.
1497
+ *
1498
+ * @generated from field: google.protobuf.Timestamp raised_at = 2;
1499
+ */
1500
+ raisedAt?: TimestampJson;
1501
+ /**
1502
+ * @generated from field: google.protobuf.Timestamp since = 3;
1503
+ */
1504
+ since?: TimestampJson;
1505
+ /**
1506
+ * count is the events counted from since, and reasons the same events by
1507
+ * reason; top_reason has the most.
1508
+ *
1509
+ * @generated from field: int64 count = 4;
1510
+ */
1511
+ count?: string;
1512
+ /**
1513
+ * @generated from field: map<string, int64> reasons = 5;
1514
+ */
1515
+ reasons?: {
1516
+ [key: string]: string;
1517
+ };
1518
+ /**
1519
+ * @generated from field: string top_reason = 6;
1520
+ */
1521
+ topReason?: string;
1522
+ /**
1523
+ * message says the same in one line.
1524
+ *
1525
+ * @generated from field: string message = 7;
1526
+ */
1527
+ message?: string;
1528
+ };
1529
+ /**
1530
+ * Describes the message toshi.workspace.v1.HostAlert.
1531
+ * Use `create(HostAlertSchema)` to create a new message.
1532
+ */
1533
+ export declare const HostAlertSchema: GenMessage<HostAlert, {
1534
+ jsonType: HostAlertJson;
1535
+ }>;
1536
+ /**
1537
+ * CloudHost is the AWS account behind a workspace-owned host the control plane
1538
+ * drives.
1539
+ *
1540
+ * @generated from message toshi.workspace.v1.CloudHost
1541
+ */
1542
+ export type CloudHost = Message<"toshi.workspace.v1.CloudHost"> & {
1543
+ /**
1544
+ * The host row this cloud host belongs to.
1545
+ *
1546
+ * @generated from field: string host_id = 1;
1547
+ */
1548
+ hostId: string;
1549
+ /**
1550
+ * The cloud provider: "aws" or "gcp".
1551
+ *
1552
+ * @generated from field: string cloud = 2;
1553
+ */
1554
+ cloud: string;
1555
+ /**
1556
+ * The region the instances run in; on GCP the zone's region.
1557
+ *
1558
+ * @generated from field: string region = 3;
1559
+ */
1560
+ region: string;
1561
+ /**
1562
+ * The role in the workspace's account the control plane assumes (AWS).
1563
+ *
1564
+ * @generated from field: string role_arn = 4;
1565
+ */
1566
+ roleArn: string;
1567
+ /**
1568
+ * The external ID the role's trust policy requires (AWS), or the project
1569
+ * metadata must name (GCP); generated by Toshi.
1570
+ *
1571
+ * @generated from field: string external_id = 5;
1572
+ */
1573
+ externalId: string;
1574
+ /**
1575
+ * The image the instances boot: an AMI, or a GCE image path.
1576
+ *
1577
+ * @generated from field: string image = 6;
1578
+ */
1579
+ image: string;
1580
+ /**
1581
+ * The subnet (AWS) or subnetwork (GCP) to launch into; empty means a
1582
+ * default subnet or the default network.
1583
+ *
1584
+ * @generated from field: string subnet_id = 7;
1585
+ */
1586
+ subnetId: string;
1587
+ /**
1588
+ * The security groups of the instances; empty means the VPC default.
1589
+ *
1590
+ * @generated from field: repeated string security_group_ids = 8;
1591
+ */
1592
+ securityGroupIds: string[];
1593
+ /**
1594
+ * Maps a runner size to an instance type, overriding the defaults.
1595
+ *
1596
+ * @generated from field: map<string, string> instance_types = 9;
1597
+ */
1598
+ instanceTypes: {
1599
+ [key: string]: string;
1600
+ };
1601
+ /**
1602
+ * The most vCPUs the host runs at once.
1603
+ *
1604
+ * @generated from field: int32 max_vcpus = 10;
1605
+ */
1606
+ maxVcpus: number;
1607
+ /**
1608
+ * @generated from field: google.protobuf.Timestamp created_at = 11;
1609
+ */
1610
+ createdAt?: Timestamp | undefined;
1611
+ /**
1612
+ * Launches spot instances, moving an interrupted job onto on demand once.
1613
+ *
1614
+ * @generated from field: bool spot = 12;
1615
+ */
1616
+ spot: boolean;
1617
+ /**
1618
+ * The most instances the host runs at once; 0 means no limit.
1619
+ *
1620
+ * @generated from field: int32 max_instances = 13;
1621
+ */
1622
+ maxInstances: number;
1623
+ /**
1624
+ * The most instance-minutes the host runs per UTC day; 0 means no limit.
1625
+ *
1626
+ * @generated from field: int32 max_instance_minutes_per_day = 14;
1627
+ */
1628
+ maxInstanceMinutesPerDay: number;
1629
+ /**
1630
+ * The GCP project and zone the instances run in.
1631
+ *
1632
+ * @generated from field: string project = 15;
1633
+ */
1634
+ project: string;
1635
+ /**
1636
+ * @generated from field: string zone = 16;
1637
+ */
1638
+ zone: string;
1639
+ /**
1640
+ * The workspace's service account the control plane impersonates (GCP).
1641
+ *
1642
+ * @generated from field: string service_account = 17;
1643
+ */
1644
+ serviceAccount: string;
1645
+ /**
1646
+ * Where the instances reach the internet: "public" (each gets its own
1647
+ * public address) or "nat" (none: the workspace's NAT carries the traffic).
1648
+ *
1649
+ * @generated from field: string egress = 18;
1650
+ */
1651
+ egress: string;
1652
+ };
1653
+ /**
1654
+ * CloudHost is the AWS account behind a workspace-owned host the control plane
1655
+ * drives.
1656
+ *
1657
+ * @generated from message toshi.workspace.v1.CloudHost
1658
+ */
1659
+ export type CloudHostJson = {
1660
+ /**
1661
+ * The host row this cloud host belongs to.
1662
+ *
1663
+ * @generated from field: string host_id = 1;
1664
+ */
1665
+ hostId?: string;
1666
+ /**
1667
+ * The cloud provider: "aws" or "gcp".
1668
+ *
1669
+ * @generated from field: string cloud = 2;
1670
+ */
1671
+ cloud?: string;
1672
+ /**
1673
+ * The region the instances run in; on GCP the zone's region.
1674
+ *
1675
+ * @generated from field: string region = 3;
1676
+ */
1677
+ region?: string;
1678
+ /**
1679
+ * The role in the workspace's account the control plane assumes (AWS).
1680
+ *
1681
+ * @generated from field: string role_arn = 4;
1682
+ */
1683
+ roleArn?: string;
1684
+ /**
1685
+ * The external ID the role's trust policy requires (AWS), or the project
1686
+ * metadata must name (GCP); generated by Toshi.
1687
+ *
1688
+ * @generated from field: string external_id = 5;
1689
+ */
1690
+ externalId?: string;
1691
+ /**
1692
+ * The image the instances boot: an AMI, or a GCE image path.
1693
+ *
1694
+ * @generated from field: string image = 6;
1695
+ */
1696
+ image?: string;
1697
+ /**
1698
+ * The subnet (AWS) or subnetwork (GCP) to launch into; empty means a
1699
+ * default subnet or the default network.
1700
+ *
1701
+ * @generated from field: string subnet_id = 7;
1702
+ */
1703
+ subnetId?: string;
1704
+ /**
1705
+ * The security groups of the instances; empty means the VPC default.
1706
+ *
1707
+ * @generated from field: repeated string security_group_ids = 8;
1708
+ */
1709
+ securityGroupIds?: string[];
1710
+ /**
1711
+ * Maps a runner size to an instance type, overriding the defaults.
1712
+ *
1713
+ * @generated from field: map<string, string> instance_types = 9;
1714
+ */
1715
+ instanceTypes?: {
1716
+ [key: string]: string;
1717
+ };
1718
+ /**
1719
+ * The most vCPUs the host runs at once.
1720
+ *
1721
+ * @generated from field: int32 max_vcpus = 10;
1722
+ */
1723
+ maxVcpus?: number;
1724
+ /**
1725
+ * @generated from field: google.protobuf.Timestamp created_at = 11;
1726
+ */
1727
+ createdAt?: TimestampJson;
1728
+ /**
1729
+ * Launches spot instances, moving an interrupted job onto on demand once.
1730
+ *
1731
+ * @generated from field: bool spot = 12;
1732
+ */
1733
+ spot?: boolean;
1734
+ /**
1735
+ * The most instances the host runs at once; 0 means no limit.
1736
+ *
1737
+ * @generated from field: int32 max_instances = 13;
1738
+ */
1739
+ maxInstances?: number;
1740
+ /**
1741
+ * The most instance-minutes the host runs per UTC day; 0 means no limit.
1742
+ *
1743
+ * @generated from field: int32 max_instance_minutes_per_day = 14;
1744
+ */
1745
+ maxInstanceMinutesPerDay?: number;
1746
+ /**
1747
+ * The GCP project and zone the instances run in.
1748
+ *
1749
+ * @generated from field: string project = 15;
1750
+ */
1751
+ project?: string;
1752
+ /**
1753
+ * @generated from field: string zone = 16;
1754
+ */
1755
+ zone?: string;
1756
+ /**
1757
+ * The workspace's service account the control plane impersonates (GCP).
1758
+ *
1759
+ * @generated from field: string service_account = 17;
1760
+ */
1761
+ serviceAccount?: string;
1762
+ /**
1763
+ * Where the instances reach the internet: "public" (each gets its own
1764
+ * public address) or "nat" (none: the workspace's NAT carries the traffic).
1765
+ *
1766
+ * @generated from field: string egress = 18;
1767
+ */
1768
+ egress?: string;
1769
+ };
1770
+ /**
1771
+ * Describes the message toshi.workspace.v1.CloudHost.
1772
+ * Use `create(CloudHostSchema)` to create a new message.
1773
+ */
1774
+ export declare const CloudHostSchema: GenMessage<CloudHost, {
1775
+ jsonType: CloudHostJson;
1776
+ }>;
1777
+ /**
1778
+ * CloudHostCheck is the outcome of one cloud host check.
1779
+ *
1780
+ * @generated from message toshi.workspace.v1.CloudHostCheck
1781
+ */
1782
+ export type CloudHostCheck = Message<"toshi.workspace.v1.CloudHostCheck"> & {
1783
+ /**
1784
+ * What was checked, for example "assume role" or "ec2:RunInstances".
1785
+ *
1786
+ * @generated from field: string name = 1;
1787
+ */
1788
+ name: string;
1789
+ /**
1790
+ * @generated from field: toshi.workspace.v1.CloudHostCheckStatus status = 2;
1791
+ */
1792
+ status: CloudHostCheckStatus;
1793
+ /**
1794
+ * What was found, or what to fix. It never holds credentials.
1795
+ *
1796
+ * @generated from field: string detail = 3;
1797
+ */
1798
+ detail: string;
1799
+ };
1800
+ /**
1801
+ * CloudHostCheck is the outcome of one cloud host check.
1802
+ *
1803
+ * @generated from message toshi.workspace.v1.CloudHostCheck
1804
+ */
1805
+ export type CloudHostCheckJson = {
1806
+ /**
1807
+ * What was checked, for example "assume role" or "ec2:RunInstances".
1808
+ *
1809
+ * @generated from field: string name = 1;
1810
+ */
1811
+ name?: string;
1812
+ /**
1813
+ * @generated from field: toshi.workspace.v1.CloudHostCheckStatus status = 2;
1814
+ */
1815
+ status?: CloudHostCheckStatusJson;
1816
+ /**
1817
+ * What was found, or what to fix. It never holds credentials.
1818
+ *
1819
+ * @generated from field: string detail = 3;
1820
+ */
1821
+ detail?: string;
1822
+ };
1823
+ /**
1824
+ * Describes the message toshi.workspace.v1.CloudHostCheck.
1825
+ * Use `create(CloudHostCheckSchema)` to create a new message.
1826
+ */
1827
+ export declare const CloudHostCheckSchema: GenMessage<CloudHostCheck, {
1828
+ jsonType: CloudHostCheckJson;
1829
+ }>;
1830
+ /**
1831
+ * HostState says whether a host takes new jobs.
1832
+ *
1833
+ * @generated from enum toshi.workspace.v1.HostState
1834
+ */
1835
+ export declare enum HostState {
1836
+ /**
1837
+ * @generated from enum value: HOST_STATE_UNSPECIFIED = 0;
1838
+ */
1839
+ UNSPECIFIED = 0,
1840
+ /**
1841
+ * The host takes new jobs.
1842
+ *
1843
+ * @generated from enum value: HOST_STATE_ONLINE = 1;
1844
+ */
1845
+ ONLINE = 1,
1846
+ /**
1847
+ * The host finishes the jobs it has and takes no new ones.
1848
+ *
1849
+ * @generated from enum value: HOST_STATE_DRAINING = 2;
1850
+ */
1851
+ DRAINING = 2,
1852
+ /**
1853
+ * The host is not reachable.
1854
+ *
1855
+ * @generated from enum value: HOST_STATE_OFFLINE = 3;
1856
+ */
1857
+ OFFLINE = 3
1858
+ }
1859
+ /**
1860
+ * HostState says whether a host takes new jobs.
1861
+ *
1862
+ * @generated from enum toshi.workspace.v1.HostState
1863
+ */
1864
+ export type HostStateJson = "HOST_STATE_UNSPECIFIED" | "HOST_STATE_ONLINE" | "HOST_STATE_DRAINING" | "HOST_STATE_OFFLINE";
1865
+ /**
1866
+ * Describes the enum toshi.workspace.v1.HostState.
1867
+ */
1868
+ export declare const HostStateSchema: GenEnum<HostState, HostStateJson>;
1869
+ /**
1870
+ * EgressSource says where a host's egress addresses come from.
1871
+ *
1872
+ * @generated from enum toshi.workspace.v1.EgressSource
1873
+ */
1874
+ export declare enum EgressSource {
1875
+ /**
1876
+ * The host never reported them: its agent predates egress reporting.
1877
+ *
1878
+ * @generated from enum value: EGRESS_SOURCE_UNSPECIFIED = 0;
1879
+ */
1880
+ UNSPECIFIED = 0,
1881
+ /**
1882
+ * Set by the operator: network.egress_ips on the agent, or egress_ips on
1883
+ * a cloud host.
1884
+ *
1885
+ * @generated from enum value: EGRESS_SOURCE_CONFIGURED = 1;
1886
+ */
1887
+ CONFIGURED = 1,
1888
+ /**
1889
+ * Found by the agent through an HTTPS echo service, re-checked hourly.
1890
+ *
1891
+ * @generated from enum value: EGRESS_SOURCE_DISCOVERED = 2;
1892
+ */
1893
+ DISCOVERED = 2,
1894
+ /**
1895
+ * The agent has neither addresses set nor an echo service that answered.
1896
+ *
1897
+ * @generated from enum value: EGRESS_SOURCE_UNKNOWN = 3;
1898
+ */
1899
+ UNKNOWN = 3,
1900
+ /**
1901
+ * A cloud host without egress_ips: each job's instance has its own public
1902
+ * address.
1903
+ *
1904
+ * @generated from enum value: EGRESS_SOURCE_PER_JOB = 4;
1905
+ */
1906
+ PER_JOB = 4
1907
+ }
1908
+ /**
1909
+ * EgressSource says where a host's egress addresses come from.
1910
+ *
1911
+ * @generated from enum toshi.workspace.v1.EgressSource
1912
+ */
1913
+ export type EgressSourceJson = "EGRESS_SOURCE_UNSPECIFIED" | "EGRESS_SOURCE_CONFIGURED" | "EGRESS_SOURCE_DISCOVERED" | "EGRESS_SOURCE_UNKNOWN" | "EGRESS_SOURCE_PER_JOB";
1914
+ /**
1915
+ * Describes the enum toshi.workspace.v1.EgressSource.
1916
+ */
1917
+ export declare const EgressSourceSchema: GenEnum<EgressSource, EgressSourceJson>;
1918
+ /**
1919
+ * AgentVersionStatus says whether a host's agent matches the control plane's
1920
+ * version promise.
1921
+ *
1922
+ * @generated from enum toshi.workspace.v1.AgentVersionStatus
1923
+ */
1924
+ export declare enum AgentVersionStatus {
1925
+ /**
1926
+ * @generated from enum value: AGENT_VERSION_STATUS_UNSPECIFIED = 0;
1927
+ */
1928
+ UNSPECIFIED = 0,
1929
+ /**
1930
+ * Either side is not a release (snapshot, dev, or empty).
1931
+ *
1932
+ * @generated from enum value: AGENT_VERSION_STATUS_UNKNOWN = 1;
1933
+ */
1934
+ UNKNOWN = 1,
1935
+ /**
1936
+ * The agent version is inside the promise.
1937
+ *
1938
+ * @generated from enum value: AGENT_VERSION_STATUS_OK = 2;
1939
+ */
1940
+ OK = 2,
1941
+ /**
1942
+ * The agent version is outside the promise.
1943
+ *
1944
+ * @generated from enum value: AGENT_VERSION_STATUS_SKEW = 3;
1945
+ */
1946
+ SKEW = 3,
1947
+ /**
1948
+ * The agent version is below the minimum the control plane admits
1949
+ * (agent_auth.minimum_agent_version), or is not a release while
1950
+ * a minimum is set: the host is refused at its next Register. It outranks
1951
+ * the other statuses. A revoked host never has it, nor does a cloud host,
1952
+ * which has no agent: its driver runs in the control plane.
1953
+ *
1954
+ * @generated from enum value: AGENT_VERSION_STATUS_BELOW_MINIMUM = 4;
1955
+ */
1956
+ BELOW_MINIMUM = 4
1957
+ }
1958
+ /**
1959
+ * AgentVersionStatus says whether a host's agent matches the control plane's
1960
+ * version promise.
1961
+ *
1962
+ * @generated from enum toshi.workspace.v1.AgentVersionStatus
1963
+ */
1964
+ export type AgentVersionStatusJson = "AGENT_VERSION_STATUS_UNSPECIFIED" | "AGENT_VERSION_STATUS_UNKNOWN" | "AGENT_VERSION_STATUS_OK" | "AGENT_VERSION_STATUS_SKEW" | "AGENT_VERSION_STATUS_BELOW_MINIMUM";
1965
+ /**
1966
+ * Describes the enum toshi.workspace.v1.AgentVersionStatus.
1967
+ */
1968
+ export declare const AgentVersionStatusSchema: GenEnum<AgentVersionStatus, AgentVersionStatusJson>;
1969
+ /**
1970
+ * CloudHostCheckStatus is how a cloud host check came out.
1971
+ *
1972
+ * @generated from enum toshi.workspace.v1.CloudHostCheckStatus
1973
+ */
1974
+ export declare enum CloudHostCheckStatus {
1975
+ /**
1976
+ * @generated from enum value: CLOUD_HOST_CHECK_STATUS_UNSPECIFIED = 0;
1977
+ */
1978
+ UNSPECIFIED = 0,
1979
+ /**
1980
+ * @generated from enum value: CLOUD_HOST_CHECK_STATUS_OK = 1;
1981
+ */
1982
+ OK = 1,
1983
+ /**
1984
+ * Works, but something deserves a look.
1985
+ *
1986
+ * @generated from enum value: CLOUD_HOST_CHECK_STATUS_WARN = 2;
1987
+ */
1988
+ WARN = 2,
1989
+ /**
1990
+ * Fails: jobs on the host would fail too.
1991
+ *
1992
+ * @generated from enum value: CLOUD_HOST_CHECK_STATUS_FAIL = 3;
1993
+ */
1994
+ FAIL = 3,
1995
+ /**
1996
+ * Not run, because an earlier check failed or nothing could be tested.
1997
+ *
1998
+ * @generated from enum value: CLOUD_HOST_CHECK_STATUS_SKIPPED = 4;
1999
+ */
2000
+ SKIPPED = 4
2001
+ }
2002
+ /**
2003
+ * CloudHostCheckStatus is how a cloud host check came out.
2004
+ *
2005
+ * @generated from enum toshi.workspace.v1.CloudHostCheckStatus
2006
+ */
2007
+ export type CloudHostCheckStatusJson = "CLOUD_HOST_CHECK_STATUS_UNSPECIFIED" | "CLOUD_HOST_CHECK_STATUS_OK" | "CLOUD_HOST_CHECK_STATUS_WARN" | "CLOUD_HOST_CHECK_STATUS_FAIL" | "CLOUD_HOST_CHECK_STATUS_SKIPPED";
2008
+ /**
2009
+ * Describes the enum toshi.workspace.v1.CloudHostCheckStatus.
2010
+ */
2011
+ export declare const CloudHostCheckStatusSchema: GenEnum<CloudHostCheckStatus, CloudHostCheckStatusJson>;
2012
+ /**
2013
+ * HostService manages the workspace's own hosts: the machines it enrolled
2014
+ * and the cloud hosts the control plane drives in its cloud account. A host
2015
+ * of another workspace, and a shared host, is NOT_FOUND.
2016
+ *
2017
+ * A workspace's API token acts on its own workspace; a dashboard session
2018
+ * names one of its workspaces in the Toshi-Workspace header. A
2019
+ * token limited to a project or an environment is refused with
2020
+ * PERMISSION_DENIED: these calls act in the whole workspace. A suspended
2021
+ * workspace reads its hosts, and every other call is refused for it with
2022
+ * FAILED_PRECONDITION.
2023
+ *
2024
+ * @generated from service toshi.workspace.v1.HostService
2025
+ */
2026
+ export declare const HostService: GenService<{
2027
+ /**
2028
+ * ListHosts returns the workspace's hosts that match the filter, ordered
2029
+ * by ID.
2030
+ *
2031
+ * A page holds 100 hosts when page_size is zero, and 1000 at most.
2032
+ *
2033
+ * @generated from rpc toshi.workspace.v1.HostService.ListHosts
2034
+ */
2035
+ listHosts: {
2036
+ methodKind: "unary";
2037
+ input: typeof ListHostsRequestSchema;
2038
+ output: typeof ListHostsResponseSchema;
2039
+ };
2040
+ /**
2041
+ * ListHostStorage returns the workspace's volumes a host holds, ordered by
2042
+ * volume ID: those it keeps the warm copy of, and those a host job
2043
+ * assigned to it has claimed. An unknown host fails with NOT_FOUND.
2044
+ *
2045
+ * A page holds 100 volumes when page_size is zero, and 1000 at most.
2046
+ *
2047
+ * @generated from rpc toshi.workspace.v1.HostService.ListHostStorage
2048
+ */
2049
+ listHostStorage: {
2050
+ methodKind: "unary";
2051
+ input: typeof ListHostStorageRequestSchema;
2052
+ output: typeof ListHostStorageResponseSchema;
2053
+ };
2054
+ /**
2055
+ * ListHostAlerts returns the active alerts of the workspace's hosts:
2056
+ * memory_held, egress_changed and agent_version_skew, one per kind,
2057
+ * ordered by kind.
2058
+ *
2059
+ * A page holds 100 alerts when page_size is zero, and 1000 at most.
2060
+ *
2061
+ * @generated from rpc toshi.workspace.v1.HostService.ListHostAlerts
2062
+ */
2063
+ listHostAlerts: {
2064
+ methodKind: "unary";
2065
+ input: typeof ListHostAlertsRequestSchema;
2066
+ output: typeof ListHostAlertsResponseSchema;
2067
+ };
2068
+ /**
2069
+ * SetHostState drains a host or puts it back in service. Only
2070
+ * HOST_STATE_DRAINING and HOST_STATE_ONLINE are accepted. An unknown ID
2071
+ * fails with NOT_FOUND.
2072
+ *
2073
+ * @generated from rpc toshi.workspace.v1.HostService.SetHostState
2074
+ */
2075
+ setHostState: {
2076
+ methodKind: "unary";
2077
+ input: typeof SetHostStateRequestSchema;
2078
+ output: typeof SetHostStateResponseSchema;
2079
+ };
2080
+ /**
2081
+ * RetireHost removes a host that holds no assigned, starting or running
2082
+ * host job; otherwise it fails with FAILED_PRECONDITION (drain it first).
2083
+ * Its agent, if still running, registers again with its enrollment
2084
+ * token.
2085
+ *
2086
+ * @generated from rpc toshi.workspace.v1.HostService.RetireHost
2087
+ */
2088
+ retireHost: {
2089
+ methodKind: "unary";
2090
+ input: typeof RetireHostRequestSchema;
2091
+ output: typeof RetireHostResponseSchema;
2092
+ };
2093
+ /**
2094
+ * CreateCloudHost registers a cloud host the control plane drives in the
2095
+ * workspace's AWS or Google Cloud account. When cloud hosts are not
2096
+ * configured on the control plane the call fails with
2097
+ * FAILED_PRECONDITION, as it does for a workspace that is not active, and
2098
+ * a workspace at its plan's own-host limit fails with RESOURCE_EXHAUSTED.
2099
+ *
2100
+ * @generated from rpc toshi.workspace.v1.HostService.CreateCloudHost
2101
+ */
2102
+ createCloudHost: {
2103
+ methodKind: "unary";
2104
+ input: typeof CreateCloudHostRequestSchema;
2105
+ output: typeof CreateCloudHostResponseSchema;
2106
+ };
2107
+ /**
2108
+ * CheckCloudHost checks a cloud host's setup without launching anything:
2109
+ * the role can be assumed, the image is visible, the subnet routes to the
2110
+ * internet, and the role's policy allows each action Toshi calls, through
2111
+ * dry-run calls. A host that is not a cloud host fails with NOT_FOUND;
2112
+ * cloud hosts not configured on the control plane fails with
2113
+ * FAILED_PRECONDITION.
2114
+ *
2115
+ * @generated from rpc toshi.workspace.v1.HostService.CheckCloudHost
2116
+ */
2117
+ checkCloudHost: {
2118
+ methodKind: "unary";
2119
+ input: typeof CheckCloudHostRequestSchema;
2120
+ output: typeof CheckCloudHostResponseSchema;
2121
+ };
2122
+ /**
2123
+ * CreateEnrollmentToken makes an enrollment token for the workspace and
2124
+ * returns it with its value; a host that registers with it is owned by
2125
+ * the workspace. The token does not expire and the other tokens are
2126
+ * untouched. A closed workspace fails with FAILED_PRECONDITION.
2127
+ *
2128
+ * @generated from rpc toshi.workspace.v1.HostService.CreateEnrollmentToken
2129
+ */
2130
+ createEnrollmentToken: {
2131
+ methodKind: "unary";
2132
+ input: typeof CreateEnrollmentTokenRequestSchema;
2133
+ output: typeof CreateEnrollmentTokenResponseSchema;
2134
+ };
2135
+ }>;