/
batch-api.json
2062 lines (2062 loc) · 84.7 KB
/
batch-api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
}
}
}
},
"basePath": "",
"baseUrl": "https://batch.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Batch",
"description": "An API to manage the running of batch jobs on Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/batch/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "batch:v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://batch.mtls.googleapis.com/",
"name": "batch",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"projects": {
"resources": {
"locations": {
"methods": {
"get": {
"description": "Gets information about a location.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
"httpMethod": "GET",
"id": "batch.projects.locations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Resource name for the location.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Location"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists information about the supported locations for this service.",
"flatPath": "v1/projects/{projectsId}/locations",
"httpMethod": "GET",
"id": "batch.projects.locations.list",
"parameterOrder": [
"name"
],
"parameters": {
"filter": {
"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).",
"location": "query",
"type": "string"
},
"name": {
"description": "The resource that owns the locations collection, if applicable.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The maximum number of results to return. If not set, the service selects a default.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}/locations",
"response": {
"$ref": "ListLocationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
},
"resources": {
"jobs": {
"methods": {
"create": {
"description": "Create a Job.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs",
"httpMethod": "POST",
"id": "batch.projects.locations.jobs.create",
"parameterOrder": [
"parent"
],
"parameters": {
"jobId": {
"description": "ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be \"{parent}/jobs/{job_id}\".",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The parent resource name where the Job will be created. Pattern: \"projects/{project}/locations/{location}\"",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
},
"requestId": {
"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
"location": "query",
"type": "string"
}
},
"path": "v1/{+parent}/jobs",
"request": {
"$ref": "Job"
},
"response": {
"$ref": "Job"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"delete": {
"description": "Delete a Job.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}",
"httpMethod": "DELETE",
"id": "batch.projects.locations.jobs.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Job name.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$",
"required": true,
"type": "string"
},
"reason": {
"description": "Optional. Reason for this deletion.",
"location": "query",
"type": "string"
},
"requestId": {
"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"get": {
"description": "Get a Job specified by its resource name.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}",
"httpMethod": "GET",
"id": "batch.projects.locations.jobs.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Job name.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Job"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "List all Jobs for a project within a region.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs",
"httpMethod": "GET",
"id": "batch.projects.locations.jobs.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "List filter.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Parent path.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/jobs",
"response": {
"$ref": "ListJobsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
},
"resources": {
"taskGroups": {
"resources": {
"tasks": {
"methods": {
"get": {
"description": "Return a single Task.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks/{tasksId}",
"httpMethod": "GET",
"id": "batch.projects.locations.jobs.taskGroups.tasks.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Task name.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Task"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "List Tasks associated with a job.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks",
"httpMethod": "GET",
"id": "batch.projects.locations.jobs.taskGroups.tasks.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Page token.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. Name of a TaskGroup from which Tasks are being requested. Pattern: \"projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/tasks",
"response": {
"$ref": "ListTasksResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
}
},
"operations": {
"methods": {
"cancel": {
"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
"httpMethod": "POST",
"id": "batch.projects.locations.operations.cancel",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be cancelled.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:cancel",
"request": {
"$ref": "CancelOperationRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"delete": {
"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
"httpMethod": "DELETE",
"id": "batch.projects.locations.operations.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be deleted.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"get": {
"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
"httpMethod": "GET",
"id": "batch.projects.locations.operations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
"httpMethod": "GET",
"id": "batch.projects.locations.operations.list",
"parameterOrder": [
"name"
],
"parameters": {
"filter": {
"description": "The standard list filter.",
"location": "query",
"type": "string"
},
"name": {
"description": "The name of the operation's parent resource.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The standard list page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The standard list page token.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}/operations",
"response": {
"$ref": "ListOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
"state": {
"methods": {
"report": {
"description": "Report agent's state, e.g. agent status and tasks information",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/state:report",
"httpMethod": "POST",
"id": "batch.projects.locations.state.report",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. Format: projects/{project}/locations/{location} {project} should be a project number.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/state:report",
"request": {
"$ref": "ReportAgentStateRequest"
},
"response": {
"$ref": "ReportAgentStateResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
}
}
},
"revision": "20230509",
"rootUrl": "https://batch.googleapis.com/",
"schemas": {
"Accelerator": {
"description": "Accelerator describes Compute Engine accelerators to be attached to the VM.",
"id": "Accelerator",
"properties": {
"count": {
"description": "The number of accelerators of this type.",
"format": "int64",
"type": "string"
},
"installGpuDrivers": {
"description": "Deprecated: please use instances[0].install_gpu_drivers instead.",
"type": "boolean"
},
"type": {
"description": "The accelerator type. For example, \"nvidia-tesla-t4\". See `gcloud compute accelerator-types list`.",
"type": "string"
}
},
"type": "object"
},
"ActionCondition": {
"description": "Conditions for actions to deal with task failures.",
"id": "ActionCondition",
"properties": {
"exitCodes": {
"description": "Exit codes of a task execution. If there are more than 1 exit codes, when task executes with any of the exit code in the list, the condition is met and the action will be executed.",
"items": {
"format": "int32",
"type": "integer"
},
"type": "array"
}
},
"type": "object"
},
"AgentInfo": {
"description": "VM Agent Info.",
"id": "AgentInfo",
"properties": {
"jobId": {
"description": "The assigned Job ID",
"type": "string"
},
"reportTime": {
"description": "When the AgentInfo is generated.",
"format": "google-datetime",
"type": "string"
},
"state": {
"description": "Agent state.",
"enum": [
"AGENT_STATE_UNSPECIFIED",
"AGENT_STARTING",
"AGENT_RUNNING",
"AGENT_STOPPED"
],
"enumDescriptions": [
"Unspecified state.",
"The agent is starting on the VM instance.",
"The agent is running. The agent in the RUNNING state can never go back to the STARTING state.",
"The agent has stopped, either on request or due to a failure."
],
"type": "string"
},
"taskGroupId": {
"description": "The assigned task group ID.",
"type": "string"
},
"tasks": {
"description": "Task Info.",
"items": {
"$ref": "AgentTaskInfo"
},
"type": "array"
}
},
"type": "object"
},
"AgentMetadata": {
"description": "VM Agent Metadata.",
"id": "AgentMetadata",
"properties": {
"creationTime": {
"description": "When the VM agent started. Use agent_startup_time instead.",
"format": "google-datetime",
"type": "string"
},
"creator": {
"description": "Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key of \"created-by\".",
"type": "string"
},
"imageVersion": {
"description": "image version for the VM that this agent is installed on.",
"type": "string"
},
"instance": {
"description": "GCP instance name (go/instance-name).",
"type": "string"
},
"instanceId": {
"description": "GCP instance ID (go/instance-id).",
"format": "uint64",
"type": "string"
},
"instancePreemptionNoticeReceived": {
"description": "If the GCP instance has received preemption notice.",
"type": "boolean"
},
"osRelease": {
"additionalProperties": {
"type": "string"
},
"description": "parsed contents of /etc/os-release",
"type": "object"
},
"version": {
"description": "agent binary version running on VM",
"type": "string"
},
"zone": {
"description": "Agent zone.",
"type": "string"
}
},
"type": "object"
},
"AgentTask": {
"description": "TODO(b/182501497) The message needs to be redefined when the Agent API server updates data in storage per the backend design.",
"id": "AgentTask",
"properties": {
"intendedState": {
"description": "The intended state of the task.",
"enum": [
"INTENDED_STATE_UNSPECIFIED",
"ASSIGNED",
"CANCELLED",
"DELETED"
],
"enumDescriptions": [
"Unspecified state.",
"Assigned state (includes running and finished).",
"The agent should cancel the execution of this task.",
"Delete task from agent storage, stop reporting its state."
],
"type": "string"
},
"reachedBarrier": {
"description": "The highest barrier reached by all tasks in the task's TaskGroup.",
"format": "int64",
"type": "string"
},
"spec": {
"$ref": "TaskSpec",
"description": "Task Spec."
},
"status": {
"$ref": "TaskStatus",
"description": "Task status."
},
"task": {
"description": "Task name.",
"type": "string"
},
"taskSource": {
"description": "TaskSource represents the source of the task.",
"enum": [
"TASK_SOURCE_UNSPECIFIED",
"BATCH_INTERNAL",
"USER"
],
"enumDescriptions": [
"Unspecified task source.",
"The AgentTask from this source is generated by Batch server. E.g. all the VMActions are from this source. When Batch Agent execute AgentTask from BATCH_INTERNAL, it will log stdout/err with \"batch_agent_logs\" log name.",
"The AgentTask from this source is provided by Batch users. When Batch Agent execute AgentTask from USER, it will log stdout/err with \"batch_task_logs\" log name."
],
"type": "string"
}
},
"type": "object"
},
"AgentTaskInfo": {
"description": "Task Info",
"id": "AgentTaskInfo",
"properties": {
"runnable": {
"description": "The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined.",
"format": "int64",
"type": "string"
},
"taskId": {
"description": "ID of the Task",
"type": "string"
},
"taskStatus": {
"$ref": "TaskStatus",
"description": "The status of the Task. If we need agent specific fields we should fork the public TaskStatus into an agent specific one. Or add them below."
}
},
"type": "object"
},
"AgentTimingInfo": {
"description": "VM timing information",
"id": "AgentTimingInfo",
"properties": {
"agentStartupTime": {
"description": "Agent startup time",
"format": "google-datetime",
"type": "string"
},
"bootTime": {
"description": "Boot timestamp of the VM OS",
"format": "google-datetime",
"type": "string"
},
"scriptStartupTime": {
"description": "Startup time of the Batch VM script.",
"format": "google-datetime",
"type": "string"
}
},
"type": "object"
},
"AllocationPolicy": {
"description": "A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.",
"id": "AllocationPolicy",
"properties": {
"instances": {
"description": "Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.",
"items": {
"$ref": "InstancePolicyOrTemplate"
},
"type": "array"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with \"goog-\" or \"google-\" are reserved.",
"type": "object"
},
"location": {
"$ref": "LocationPolicy",
"description": "Location where compute resources should be allocated for the Job."
},
"network": {
"$ref": "NetworkPolicy",
"description": "The network policy."
},
"placement": {
"$ref": "PlacementPolicy",
"description": "The placement policy."
},
"serviceAccount": {
"$ref": "ServiceAccount",
"description": "Service account that VMs will run as."
}
},
"type": "object"
},
"AttachedDisk": {
"description": "A new or an existing persistent disk (PD) or a local ssd attached to a VM instance.",
"id": "AttachedDisk",
"properties": {
"deviceName": {
"description": "Device name that the guest operating system will see. It is used by Runnable.volumes field to mount disks. So please specify the device_name if you want Batch to help mount the disk, and it should match the device_name field in volumes.",
"type": "string"
},
"existingDisk": {
"description": "Name of an existing PD.",
"type": "string"
},
"newDisk": {
"$ref": "Disk"
}
},
"type": "object"
},
"Barrier": {
"description": "Barrier runnable blocks until all tasks in a taskgroup reach it.",
"id": "Barrier",
"properties": {
"name": {
"description": "Barriers are identified by their index in runnable list. Names are not required, but if present should be an identifier.",
"type": "string"
}
},
"type": "object"
},
"CancelOperationRequest": {
"description": "The request message for Operations.CancelOperation.",
"id": "CancelOperationRequest",
"properties": {},
"type": "object"
},
"ComputeResource": {
"description": "Compute resource requirements",
"id": "ComputeResource",
"properties": {
"bootDiskMib": {
"description": "Extra boot disk size in MiB for each task.",
"format": "int64",
"type": "string"
},
"cpuMilli": {
"description": "The milliCPU count.",
"format": "int64",
"type": "string"
},
"memoryMib": {
"description": "Memory in MiB.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"Container": {
"description": "Container runnable.",
"id": "Container",
"properties": {
"blockExternalNetwork": {
"description": "If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in the `container.options` field.",
"type": "boolean"
},
"commands": {
"description": "Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.",
"items": {
"type": "string"
},
"type": "array"
},
"entrypoint": {
"description": "Overrides the `ENTRYPOINT` specified in the container.",
"type": "string"
},
"imageUri": {
"description": "The URI to pull the container image from.",
"type": "string"
},
"options": {
"description": "Arbitrary additional options to include in the \"docker run\" command when running this container, e.g. \"--network host\".",
"type": "string"
},
"password": {
"description": "Optional password for logging in to a docker registry. If password matches `projects/*/secrets/*/versions/*` then Batch will read the password from the Secret Manager;",
"type": "string"
},
"username": {
"description": "Optional username for logging in to a docker registry. If username matches `projects/*/secrets/*/versions/*` then Batch will read the username from the Secret Manager.",
"type": "string"
},
"volumes": {
"description": "Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"Disk": {
"description": "A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.",
"id": "Disk",
"properties": {
"diskInterface": {
"description": "Local SSDs are available through both \"SCSI\" and \"NVMe\" interfaces. If not indicated, \"NVMe\" will be the default one for local ssds. We only support \"SCSI\" for persistent disks now.",
"type": "string"
},
"image": {
"description": "Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * \"batch-debian\": use Batch Debian images. * \"batch-centos\": use Batch CentOS images. * \"batch-cos\": use Batch Container-Optimized images.",
"type": "string"
},
"sizeGb": {
"description": "Disk size in GB. For persistent disk, this field is ignored if `data_source` is `image` or `snapshot`. For local SSD, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB. For boot disk, Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the boot_disk_mib field in task spec's compute_resource are defined, Batch will only honor this field.",
"format": "int64",
"type": "string"
},
"snapshot": {
"description": "Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.",
"type": "string"
},
"type": {
"description": "Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type \"local-ssd\". Persistent disks and boot disks use \"pd-balanced\", \"pd-extreme\", \"pd-ssd\" or \"pd-standard\".",
"type": "string"
}
},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
},
"Environment": {
"description": "An Environment describes a collection of environment variables to set when executing Tasks.",
"id": "Environment",
"properties": {
"encryptedVariables": {
"$ref": "KMSEnvMap",
"description": "An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values."
},
"secretVariables": {
"additionalProperties": {
"type": "string"
},
"description": "A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable.",
"type": "object"
},
"variables": {
"additionalProperties": {
"type": "string"
},
"description": "A map of environment variable names to values.",
"type": "object"
}
},
"type": "object"
},
"GCS": {
"description": "Represents a Google Cloud Storage volume.",
"id": "GCS",
"properties": {
"remotePath": {
"description": "Remote path, either a bucket name or a subdirectory of a bucket, e.g.: bucket_name, bucket_name/subdirectory/",
"type": "string"
}
},
"type": "object"
},
"InstancePolicy": {
"description": "InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.",
"id": "InstancePolicy",
"properties": {
"accelerators": {
"description": "The accelerators attached to each VM instance.",
"items": {
"$ref": "Accelerator"