Show / Hide Table of Contents

Class TaskSpec

Spec of a task

Inheritance
object
TaskSpec
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Batch.v1.Data
Assembly: Google.Apis.Batch.v1.dll
Syntax
public class TaskSpec : IDirectResponseSchema

Properties

ComputeResource

ComputeResource requirements.

Declaration
[JsonProperty("computeResource")]
public virtual ComputeResource ComputeResource { get; set; }
Property Value
Type Description
ComputeResource

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

Environment

Environment variables to set before running the Task.

Declaration
[JsonProperty("environment")]
public virtual Environment Environment { get; set; }
Property Value
Type Description
Environment

Environments

Deprecated: please use environment(non-plural) instead.

Declaration
[JsonProperty("environments")]
public virtual IDictionary<string, string> Environments { get; set; }
Property Value
Type Description
IDictionary<string, string>

LifecyclePolicies

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

Declaration
[JsonProperty("lifecyclePolicies")]
public virtual IList<LifecyclePolicy> LifecyclePolicies { get; set; }
Property Value
Type Description
IList<LifecyclePolicy>

MaxRetryCount

Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

Declaration
[JsonProperty("maxRetryCount")]
public virtual int? MaxRetryCount { get; set; }
Property Value
Type Description
int?

MaxRunDuration

Maximum duration the task should run before being automatically retried (if enabled) or automatically failed. Format the value of this field as a time limit in seconds followed by s—for example, 3600s for 1 hour. The field accepts any value between 0 and the maximum listed for the Duration field type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, the actual maximum run time for a job will be limited to the maximum run time for a job listed at https://cloud.google.com/batch/quotas#max-job-duration.

Declaration
[JsonProperty("maxRunDuration")]
public virtual object MaxRunDuration { get; set; }
Property Value
Type Description
object

Runnables

Required. The sequence of one or more runnables (executable scripts, executable containers, and/or barriers) for each task in this task group to run. Each task runs this list of runnables in order. For a task to succeed, all of its script and container runnables each must meet at least one of the following conditions:

  • The runnable exited with a zero status. + The runnable didn't finish, but you enabled its background subfield. + The runnable exited with a non-zero status, but you enabled its ignore_exit_status subfield.
Declaration
[JsonProperty("runnables")]
public virtual IList<Runnable> Runnables { get; set; }
Property Value
Type Description
IList<Runnable>

Volumes

Volumes to mount before running Tasks using this TaskSpec.

Declaration
[JsonProperty("volumes")]
public virtual IList<Volume> Volumes { get; set; }
Property Value
Type Description
IList<Volume>

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX