Reference documentation and code samples for the Google Cloud Run V2 Client class TaskTemplate.
TaskTemplate describes the data a task should have when created from a template.
Generated from protobuf message google.cloud.run.v2.TaskTemplate
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ containers
array< Google\Cloud\Run\V2\Container
>
Holds the single container that defines the unit of execution for this task.
↳ volumes
↳ max_retries
int
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
↳ timeout
Google\Protobuf\Duration
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.
↳ service_account
string
Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
↳ execution_environment
int
The execution environment being used to host this Task.
↳ encryption_key
string
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
↳ vpc_access
Google\Cloud\Run\V2\VpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
getContainers
Holds the single container that defines the unit of execution for this task.
setContainers
Holds the single container that defines the unit of execution for this task.
$this
getVolumes
A list of Volumes to make available to containers.
setVolumes
A list of Volumes to make available to containers.
$this
getMaxRetries
Number of retries allowed per Task, before marking this Task failed.
Defaults to 3.
int
hasMaxRetries
setMaxRetries
Number of retries allowed per Task, before marking this Task failed.
Defaults to 3.
var
int
$this
getTimeout
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
Defaults to 600 seconds.
hasTimeout
clearTimeout
setTimeout
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
Defaults to 600 seconds.
$this
getServiceAccount
Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
string
setServiceAccount
Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
var
string
$this
getExecutionEnvironment
The execution environment being used to host this Task.
int
setExecutionEnvironment
The execution environment being used to host this Task.
var
int
$this
getEncryptionKey
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
string
setEncryptionKey
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
var
string
$this
getVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
hasVpcAccess
clearVpcAccess
setVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
$this
getRetries
string