Google Cloud Run V2 Client - Class TaskTemplate (0.9.3)

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

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
Name Description
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 array<Google\Cloud\Run\V2\Volume>

A list of Volumes to make available to containers.

↳ 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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setContainers

Holds the single container that defines the unit of execution for this task.

Parameter
Name Description
var array<Google\Cloud\Run\V2\Container>
Returns
Type Description
$this

getVolumes

A list of Volumes to make available to containers.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setVolumes

A list of Volumes to make available to containers.

Parameter
Name Description
var array<Google\Cloud\Run\V2\Volume>
Returns
Type Description
$this

getMaxRetries

Number of retries allowed per Task, before marking this Task failed.

Defaults to 3.

Returns
Type Description
int

hasMaxRetries

setMaxRetries

Number of retries allowed per Task, before marking this Task failed.

Defaults to 3.

Parameter
Name Description
var int
Returns
Type Description
$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.

Returns
Type Description
Google\Protobuf\Duration|null

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.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getExecutionEnvironment

The execution environment being used to host this Task.

Returns
Type Description
int

setExecutionEnvironment

The execution environment being used to host this Task.

Parameter
Name Description
var int
Returns
Type Description
$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

Returns
Type Description
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

Parameter
Name Description
var string
Returns
Type Description
$this

getVpcAccess

VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

Returns
Type Description
Google\Cloud\Run\V2\VpcAccess|null

hasVpcAccess

clearVpcAccess

setVpcAccess

VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

Parameter
Name Description
var Google\Cloud\Run\V2\VpcAccess
Returns
Type Description
$this

getRetries

Returns
Type Description
string