Cloud Run Admin v2 API - Class TaskTemplate (2.4.0)

public sealed class TaskTemplate : IMessage<TaskTemplate>, IEquatable<TaskTemplate>, IDeepCloneable<TaskTemplate>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Run Admin v2 API class TaskTemplate.

TaskTemplate describes the data a task should have when created from a template.

Inheritance

object > TaskTemplate

Namespace

Google.Cloud.Run.V2

Assembly

Google.Cloud.Run.V2.dll

Constructors

TaskTemplate()

public TaskTemplate()

TaskTemplate(TaskTemplate)

public TaskTemplate(TaskTemplate other)
Parameter
NameDescription
otherTaskTemplate

Properties

Containers

public RepeatedField<Container> Containers { get; }

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

Property Value
TypeDescription
RepeatedFieldContainer

EncryptionKey

public string EncryptionKey { get; set; }

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

Property Value
TypeDescription
string

EncryptionKeyAsCryptoKeyName

public CryptoKeyName EncryptionKeyAsCryptoKeyName { get; set; }

CryptoKeyName-typed view over the EncryptionKey resource name property.

Property Value
TypeDescription
CryptoKeyName

ExecutionEnvironment

public ExecutionEnvironment ExecutionEnvironment { get; set; }

The execution environment being used to host this Task.

Property Value
TypeDescription
ExecutionEnvironment

HasMaxRetries

public bool HasMaxRetries { get; }

Gets whether the "max_retries" field is set

Property Value
TypeDescription
bool

MaxRetries

public int MaxRetries { get; set; }

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

Property Value
TypeDescription
int

RetriesCase

public TaskTemplate.RetriesOneofCase RetriesCase { get; }
Property Value
TypeDescription
TaskTemplateRetriesOneofCase

ServiceAccount

public string ServiceAccount { get; set; }

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.

Property Value
TypeDescription
string

Timeout

public Duration Timeout { get; set; }

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.

Property Value
TypeDescription
Duration

Volumes

public RepeatedField<Volume> Volumes { get; }

A list of Volumes to make available to containers.

Property Value
TypeDescription
RepeatedFieldVolume

VpcAccess

public VpcAccess VpcAccess { get; set; }

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

Property Value
TypeDescription
VpcAccess