From d2969cfa9c103a2105d67b800d9e0ec92b9e70c5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 24 May 2023 18:26:58 +0000 Subject: [PATCH] feat(batch): update the api #### batch:v1 The following keys were added: - schemas.AllocationPolicy.properties.placement.$ref (Total Keys: 1) - schemas.PlacementPolicy (Total Keys: 5) - schemas.Runnable.properties.labels (Total Keys: 2) - schemas.TaskGroup.properties.schedulingPolicy.type (Total Keys: 1) --- docs/dyn/batch_v1.projects.locations.html | 4 +- .../dyn/batch_v1.projects.locations.jobs.html | 48 +++++++++++++++--- .../batch_v1.projects.locations.state.html | 3 ++ .../discovery_cache/documents/batch.v1.json | 49 +++++++++++++++++-- 4 files changed, 90 insertions(+), 14 deletions(-) diff --git a/docs/dyn/batch_v1.projects.locations.html b/docs/dyn/batch_v1.projects.locations.html index 1c2c7418889..36390ac55bc 100644 --- a/docs/dyn/batch_v1.projects.locations.html +++ b/docs/dyn/batch_v1.projects.locations.html @@ -121,7 +121,7 @@

Method Details

Returns: An object of the form: - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", @@ -153,7 +153,7 @@

Method Details

{ # The response message for Locations.ListLocations. "locations": [ # A list of locations that matches the specified filter in the request. - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", diff --git a/docs/dyn/batch_v1.projects.locations.jobs.html b/docs/dyn/batch_v1.projects.locations.jobs.html index 0f2da4f56cb..129d97a9f54 100644 --- a/docs/dyn/batch_v1.projects.locations.jobs.html +++ b/docs/dyn/batch_v1.projects.locations.jobs.html @@ -169,6 +169,10 @@

Method Details

}, ], }, + "placement": { # PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy. # The placement policy. + "collocation": "A String", # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED. + "maxDistance": "A String", # When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented + }, "serviceAccount": { # Carries information about a Google Cloud service account. # Service account that VMs will run as. "email": "A String", # Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here. "scopes": [ # List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. @@ -233,14 +237,15 @@

Method Details

}, }, "taskGroups": [ # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - { # A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters. + { # A TaskGroup defines one or more Tasks that all share the same TaskSpec. "name": "A String", # Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". "parallelism": "A String", # Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER. "permissiveSsh": True or False, # When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. "requireHostsFile": True or False, # When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. + "schedulingPolicy": "A String", # Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. "taskCount": "A String", # Number of Tasks in the TaskGroup. Default is 1. "taskCountPerNode": "A String", # Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. - "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries. + "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). { # An Environment describes a collection of environment variables to set when executing Tasks. "encryptedVariables": { # An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. "cipherText": "A String", # The value of the cipherText response from the `encrypt` method. @@ -321,6 +326,9 @@

Method Details

}, }, "ignoreExitStatus": True or False, # Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. + "labels": { # Labels for this Runnable. + "a_key": "A String", + }, "script": { # Script runnable. # Script runnable. "path": "A String", # Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. "text": "A String", # Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. @@ -418,6 +426,10 @@

Method Details

}, ], }, + "placement": { # PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy. # The placement policy. + "collocation": "A String", # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED. + "maxDistance": "A String", # When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented + }, "serviceAccount": { # Carries information about a Google Cloud service account. # Service account that VMs will run as. "email": "A String", # Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here. "scopes": [ # List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. @@ -482,14 +494,15 @@

Method Details

}, }, "taskGroups": [ # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - { # A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters. + { # A TaskGroup defines one or more Tasks that all share the same TaskSpec. "name": "A String", # Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". "parallelism": "A String", # Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER. "permissiveSsh": True or False, # When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. "requireHostsFile": True or False, # When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. + "schedulingPolicy": "A String", # Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. "taskCount": "A String", # Number of Tasks in the TaskGroup. Default is 1. "taskCountPerNode": "A String", # Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. - "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries. + "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). { # An Environment describes a collection of environment variables to set when executing Tasks. "encryptedVariables": { # An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. "cipherText": "A String", # The value of the cipherText response from the `encrypt` method. @@ -570,6 +583,9 @@

Method Details

}, }, "ignoreExitStatus": True or False, # Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. + "labels": { # Labels for this Runnable. + "a_key": "A String", + }, "script": { # Script runnable. # Script runnable. "path": "A String", # Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. "text": "A String", # Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. @@ -709,6 +725,10 @@

Method Details

}, ], }, + "placement": { # PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy. # The placement policy. + "collocation": "A String", # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED. + "maxDistance": "A String", # When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented + }, "serviceAccount": { # Carries information about a Google Cloud service account. # Service account that VMs will run as. "email": "A String", # Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here. "scopes": [ # List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. @@ -773,14 +793,15 @@

Method Details

}, }, "taskGroups": [ # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - { # A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters. + { # A TaskGroup defines one or more Tasks that all share the same TaskSpec. "name": "A String", # Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". "parallelism": "A String", # Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER. "permissiveSsh": True or False, # When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. "requireHostsFile": True or False, # When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. + "schedulingPolicy": "A String", # Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. "taskCount": "A String", # Number of Tasks in the TaskGroup. Default is 1. "taskCountPerNode": "A String", # Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. - "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries. + "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). { # An Environment describes a collection of environment variables to set when executing Tasks. "encryptedVariables": { # An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. "cipherText": "A String", # The value of the cipherText response from the `encrypt` method. @@ -861,6 +882,9 @@

Method Details

}, }, "ignoreExitStatus": True or False, # Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. + "labels": { # Labels for this Runnable. + "a_key": "A String", + }, "script": { # Script runnable. # Script runnable. "path": "A String", # Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. "text": "A String", # Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. @@ -968,6 +992,10 @@

Method Details

}, ], }, + "placement": { # PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy. # The placement policy. + "collocation": "A String", # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED. + "maxDistance": "A String", # When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented + }, "serviceAccount": { # Carries information about a Google Cloud service account. # Service account that VMs will run as. "email": "A String", # Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here. "scopes": [ # List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. @@ -1032,14 +1060,15 @@

Method Details

}, }, "taskGroups": [ # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - { # A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters. + { # A TaskGroup defines one or more Tasks that all share the same TaskSpec. "name": "A String", # Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". "parallelism": "A String", # Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER. "permissiveSsh": True or False, # When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. "requireHostsFile": True or False, # When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. + "schedulingPolicy": "A String", # Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. "taskCount": "A String", # Number of Tasks in the TaskGroup. Default is 1. "taskCountPerNode": "A String", # Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. - "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries. + "taskEnvironments": [ # An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). { # An Environment describes a collection of environment variables to set when executing Tasks. "encryptedVariables": { # An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. "cipherText": "A String", # The value of the cipherText response from the `encrypt` method. @@ -1120,6 +1149,9 @@

Method Details

}, }, "ignoreExitStatus": True or False, # Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. + "labels": { # Labels for this Runnable. + "a_key": "A String", + }, "script": { # Script runnable. # Script runnable. "path": "A String", # Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. "text": "A String", # Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. diff --git a/docs/dyn/batch_v1.projects.locations.state.html b/docs/dyn/batch_v1.projects.locations.state.html index de17923445f..438eda56f0c 100644 --- a/docs/dyn/batch_v1.projects.locations.state.html +++ b/docs/dyn/batch_v1.projects.locations.state.html @@ -224,6 +224,9 @@

Method Details

}, }, "ignoreExitStatus": True or False, # Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. + "labels": { # Labels for this Runnable. + "a_key": "A String", + }, "script": { # Script runnable. # Script runnable. "path": "A String", # Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. "text": "A String", # Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. diff --git a/googleapiclient/discovery_cache/documents/batch.v1.json b/googleapiclient/discovery_cache/documents/batch.v1.json index 66858954cbf..10d2a25be6e 100644 --- a/googleapiclient/discovery_cache/documents/batch.v1.json +++ b/googleapiclient/discovery_cache/documents/batch.v1.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230329", + "revision": "20230509", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -807,6 +807,10 @@ "$ref": "NetworkPolicy", "description": "The network policy." }, + "placement": { + "$ref": "PlacementPolicy", + "description": "The placement policy." + }, "serviceAccount": { "$ref": "ServiceAccount", "description": "Service account that VMs will run as." @@ -1347,7 +1351,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -1610,6 +1614,22 @@ }, "type": "object" }, + "PlacementPolicy": { + "description": "PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy.", + "id": "PlacementPolicy", + "properties": { + "collocation": { + "description": "UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED.", + "type": "string" + }, + "maxDistance": { + "description": "When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ReportAgentStateRequest": { "description": "Request to report agent's state. The Request itself implies the agent is healthy.", "id": "ReportAgentStateRequest", @@ -1681,6 +1701,13 @@ "description": "Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.", "type": "boolean" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels for this Runnable.", + "type": "object" + }, "script": { "$ref": "Script", "description": "Script runnable." @@ -1827,7 +1854,7 @@ "type": "object" }, "TaskGroup": { - "description": "A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters.", + "description": "A TaskGroup defines one or more Tasks that all share the same TaskSpec.", "id": "TaskGroup", "properties": { "name": { @@ -1848,6 +1875,20 @@ "description": "When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.", "type": "boolean" }, + "schedulingPolicy": { + "description": "Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.", + "enum": [ + "SCHEDULING_POLICY_UNSPECIFIED", + "AS_SOON_AS_POSSIBLE", + "IN_ORDER" + ], + "enumDescriptions": [ + "Unspecified.", + "Run Tasks as soon as resources are available. Tasks might be executed in parallel depending on parallelism and task_count values.", + "Run Tasks sequentially with increased task index." + ], + "type": "string" + }, "taskCount": { "description": "Number of Tasks in the TaskGroup. Default is 1.", "format": "int64", @@ -1859,7 +1900,7 @@ "type": "string" }, "taskEnvironments": { - "description": "An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries.", + "description": "An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).", "items": { "$ref": "Environment" },