TaskTemplate class

Inner template.template block — the per-Task template. Holds at least one JobContainer plus optional VPC access, volumes, retries, timeout.

Annotations
  • @immutable

Constructors

TaskTemplate({required List<JobContainer> containers, TfArg<String>? serviceAccount, TfArg<String>? timeout, TfArg<int>? maxRetries, TfArg<JobExecutionEnvironment>? executionEnvironment, TfArg<String>? encryptionKey, TfArg<bool>? gpuZonalRedundancyDisabled, JobVpcAccess? vpcAccess, List<JobVolume>? volumes, JobNodeSelector? nodeSelector})
const

Properties

containers List<JobContainer>
One or more containers (≥1).
final
encryptionKey → TfArg<String>?
CMEK key name to encrypt the Task's container image.
final
executionEnvironment → TfArg<JobExecutionEnvironment>?
gen1 (legacy gVisor) or gen2 (default; larger CPU tiers + GCSFuse).
final
gpuZonalRedundancyDisabled → TfArg<bool>?
Disables GPU zonal redundancy for this Task.
final
hashCode int
The hash code for this object.
no setterinherited
maxRetries → TfArg<int>?
Maximum retry attempts per Task. Defaults to 3.
final
nodeSelector JobNodeSelector?
GPU accelerator pin.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceAccount → TfArg<String>?
Service account email the Task runs as. Defaults to the project default compute SA.
final
timeout → TfArg<String>?
Per-Task timeout duration ("3.5s" form). Defaults to a 10-minute ceiling (API default).
final
volumes List<JobVolume>?
Volumes available to all containers in the Task.
final
vpcAccess JobVpcAccess?
VPC connector or direct VPC egress configuration.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArgMap() Map<String, Object?>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited