public sealed class TaskSpec : IMessage<TaskSpec>, IEquatable<TaskSpec>, IDeepCloneable<TaskSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1 API class TaskSpec.
Spec of a task
Namespace
Google.Cloud.Batch.V1Assembly
Google.Cloud.Batch.V1.dll
Constructors
TaskSpec()
public TaskSpec()
TaskSpec(TaskSpec)
public TaskSpec(TaskSpec other)
Parameter | |
---|---|
Name | Description |
other |
TaskSpec |
Properties
ComputeResource
public ComputeResource ComputeResource { get; set; }
ComputeResource requirements.
Property Value | |
---|---|
Type | Description |
ComputeResource |
Environment
public Environment Environment { get; set; }
Environment variables to set before running the Task.
Property Value | |
---|---|
Type | Description |
Environment |
Environments
[Obsolete]
public MapField<string, string> Environments { get; }
Deprecated: please use environment(non-plural) instead.
Property Value | |
---|---|
Type | Description |
MapFieldstringstring |
LifecyclePolicies
public RepeatedField<LifecyclePolicy> LifecyclePolicies { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedFieldLifecyclePolicy |
MaxRetryCount
public int MaxRetryCount { get; set; }
Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
Property Value | |
---|---|
Type | Description |
int |
MaxRunDuration
public Duration MaxRunDuration { get; set; }
Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. The valid value range for max_run_duration in seconds is [0, 315576000000.999999999],
Property Value | |
---|---|
Type | Description |
Duration |
Runnables
public RepeatedField<Runnable> Runnables { get; }
The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag.
Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.
Property Value | |
---|---|
Type | Description |
RepeatedFieldRunnable |
Volumes
public RepeatedField<Volume> Volumes { get; }
Volumes to mount before running Tasks using this TaskSpec.
Property Value | |
---|---|
Type | Description |
RepeatedFieldVolume |