@@ -284,12 +284,14 @@ message JobNotification {
284284message AllocationPolicy {
285285 message LocationPolicy {
286286 // A list of allowed location names represented by internal URLs.
287+ //
287288 // Each location can be a region or a zone.
288289 // Only one region or multiple zones in one region is supported now.
289290 // For example,
290291 // ["regions/us-central1"] allow VMs in any zones in region us-central1.
291292 // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
292293 // in zones us-central1-a and us-central1-c.
294+ //
293295 // All locations end up in different regions would cause errors.
294296 // For example,
295297 // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
@@ -305,25 +307,29 @@ message AllocationPolicy {
305307
306308 // A new persistent disk or a local ssd.
307309 // A VM can only have one local SSD setting but multiple local SSD partitions.
308- // https://cloud.google.com/compute/docs/disks#pdspecs.
310+ // See https://cloud.google.com/compute/docs/disks#pdspecs and
309311 // https://cloud.google.com/compute/docs/disks#localssds.
310312 message Disk {
311313 // A data source from which a PD will be created.
312314 oneof data_source {
313315 // Name of a public or custom image used as the data source.
314316 // For example, the following are all valid URLs:
315- // (1) Specify the image by its family name:
317+ //
318+ // * Specify the image by its family name:
316319 // projects/{project}/global/images/family/{image_family}
317- // (2) Specify the image version:
320+ // * Specify the image version:
318321 // projects/{project}/global/images/{image_version}
322+ //
319323 // You can also use Batch customized image in short names.
320324 // The following image values are supported for a boot disk:
321- // "batch-debian": use Batch Debian images.
322- // "batch-centos": use Batch CentOS images.
323- // "batch-cos": use Batch Container-Optimized images.
325+ //
326+ // * "batch-debian": use Batch Debian images.
327+ // * "batch-centos": use Batch CentOS images.
328+ // * "batch-cos": use Batch Container-Optimized images.
324329 string image = 4 ;
325330
326331 // Name of a snapshot used as the data source.
332+ // Snapshot is not supported as boot disk now.
327333 string snapshot = 5 ;
328334 }
329335
@@ -334,6 +340,7 @@ message AllocationPolicy {
334340 string type = 1 ;
335341
336342 // Disk size in GB.
343+ //
337344 // For persistent disk, this field is ignored if `data_source` is `image` or
338345 // `snapshot`.
339346 // For local SSD, size_gb should be a multiple of 375GB,
@@ -391,7 +398,7 @@ message AllocationPolicy {
391398
392399 // The minimum CPU platform.
393400 // See
394- // ` https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform` .
401+ // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
395402 // Not yet implemented.
396403 string min_cpu_platform = 3 ;
397404
@@ -401,15 +408,17 @@ message AllocationPolicy {
401408 // The accelerators attached to each VM instance.
402409 repeated Accelerator accelerators = 5 ;
403410
404- // Book disk to be created and attached to each VM by this InstancePolicy.
411+ // Boot disk to be created and attached to each VM by this InstancePolicy.
405412 // Boot disk will be deleted when the VM is deleted.
413+ // Batch API now only supports booting from image.
406414 Disk boot_disk = 8 ;
407415
408416 // Non-boot disks to be attached for each VM created by this InstancePolicy.
409417 // New disks will be deleted when the VM is deleted.
410418 repeated AttachedDisk disks = 6 ;
411419
412- // If specified, VMs will be allocated only inside the matching reservation.
420+ // If specified, VMs will consume only the specified reservation.
421+ // If not specified (default), VMs will consume any applicable reservation.
413422 string reservation = 7 ;
414423 }
415424
@@ -436,18 +445,22 @@ message AllocationPolicy {
436445 message NetworkInterface {
437446 // The URL of an existing network resource.
438447 // You can specify the network as a full or partial URL.
448+ //
439449 // For example, the following are all valid URLs:
440- // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
441- // projects/{project}/global/networks/{network}
442- // global/networks/{network}
450+ //
451+ // * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
452+ // * projects/{project}/global/networks/{network}
453+ // * global/networks/{network}
443454 string network = 1 ;
444455
445456 // The URL of an existing subnetwork resource in the network.
446457 // You can specify the subnetwork as a full or partial URL.
458+ //
447459 // For example, the following are all valid URLs:
448- // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
449- // projects/{project}/regions/{region}/subnetworks/{subnetwork}
450- // regions/{region}/subnetworks/{subnetwork}
460+ //
461+ // * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
462+ // * projects/{project}/regions/{region}/subnetworks/{subnetwork}
463+ // * regions/{region}/subnetworks/{subnetwork}
451464 string subnetwork = 2 ;
452465
453466 // Default is false (with an external IP address). Required if
@@ -466,6 +479,23 @@ message AllocationPolicy {
466479 repeated NetworkInterface network_interfaces = 1 ;
467480 }
468481
482+ // PlacementPolicy describes a group placement policy for the VMs controlled
483+ // by this AllocationPolicy.
484+ message PlacementPolicy {
485+ // UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
486+ // want VMs to be located close to each other for low network latency
487+ // between the VMs. No placement policy will be generated when collocation
488+ // is UNSPECIFIED.
489+ string collocation = 1 ;
490+
491+ // When specified, causes the job to fail if more than max_distance logical
492+ // switches are required between VMs. Batch uses the most compact possible
493+ // placement of VMs even when max_distance is not specified. An explicit
494+ // max_distance makes that level of compactness a strict requirement.
495+ // Not yet implemented
496+ int64 max_distance = 2 ;
497+ }
498+
469499 // Compute Engine VM instance provisioning model.
470500 enum ProvisioningModel {
471501 // Unspecified.
@@ -519,6 +549,9 @@ message AllocationPolicy {
519549
520550 // The network policy.
521551 NetworkPolicy network = 7 ;
552+
553+ // The placement policy.
554+ PlacementPolicy placement = 10 ;
522555}
523556
524557// A TaskGroup contains one or multiple Tasks that share the same
@@ -535,7 +568,15 @@ message TaskGroup {
535568 SCHEDULING_POLICY_UNSPECIFIED = 0 ;
536569
537570 // Run Tasks as soon as resources are available.
571+ //
572+ // Tasks might be executed in parallel depending on parallelism and
573+ // task_count values.
538574 AS_SOON_AS_POSSIBLE = 1 ;
575+
576+ // Run Tasks sequentially with increased task index.
577+ //
578+ // Not yet implemented.
579+ IN_ORDER = 2 ;
539580 }
540581
541582 // Output only. TaskGroup name.
@@ -548,14 +589,16 @@ message TaskGroup {
548589 TaskSpec task_spec = 3 [(google.api.field_behavior ) = REQUIRED ];
549590
550591 // Number of Tasks in the TaskGroup.
551- // default is 1
592+ // Default is 1.
552593 int64 task_count = 4 ;
553594
554595 // Max number of tasks that can run in parallel.
555596 // Default to min(task_count, 1000).
597+ // Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
556598 int64 parallelism = 5 ;
557599
558600 // Scheduling policy for Tasks in the TaskGroup.
601+ // The default value is AS_SOON_AS_POSSIBLE.
559602 SchedulingPolicy scheduling_policy = 6 ;
560603
561604 // Compute resource allocation for the TaskGroup.
0 commit comments