Cloud Run Admin v2 API - Class Task (2.19.0) Stay organized with collections Save and categorize content based on your preferences.
public sealed class Task : IMessage<Task>, IEquatable<Task>, IDeepCloneable<Task>, IBufferMessage, IMessageReference documentation and code samples for the Cloud Run Admin v2 API class Task.
Task represents a single run of a container to completion.
Namespace
Google.Cloud.Run.V2Assembly
Google.Cloud.Run.V2.dll
Constructors
Task()
public Task()Task(Task)
public Task(Task other)| Parameter | |
|---|---|
| Name | Description |
other | Task |
Properties
Annotations
public MapField<string, string> Annotations { get; }Output only. Unstructured key value map that maybe set by external tools to store and arbitrary metadata.They are not queryable and should be preservedwhen modifying objects.
| Property Value | |
|---|---|
| Type | Description |
MapFieldstringstring | |
CompletionTime
public Timestamp CompletionTime { get; set; }Output only. Represents time when the Task was completed. It is notguaranteed to be set in happens-before order across separate operations.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
Conditions
public RepeatedField<Condition> Conditions { get; }Output only. The Condition of this Task, containing its readiness status,and detailed error information in case it did not reach the desired state.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldCondition | |
Containers
public RepeatedField<Container> Containers { get; }Holds the single container that defines the unit of execution for thistask.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldContainer | |
CreateTime
public Timestamp CreateTime { get; set; }Output only. Represents time when the task was created by the system.It is not guaranteed to be set in happens-before order across separateoperations.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
DeleteTime
public Timestamp DeleteTime { get; set; }Output only. For a deleted resource, the deletion time. It is onlypopulated as a response to a Delete request.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
EncryptionKey
public string EncryptionKey { get; set; }Output only. A reference to a customer managed encryption key (CMEK) to useto encrypt this container image. For more information, go tohttps://cloud.google.com/run/docs/securing/using-cmek
| Property Value | |
|---|---|
| Type | Description |
string | |
EncryptionKeyAsCryptoKeyName
public CryptoKeyName EncryptionKeyAsCryptoKeyName { get; set; }CryptoKeyName-typed view over theEncryptionKey resource name property.
| Property Value | |
|---|---|
| Type | Description |
CryptoKeyName | |
Etag
public string Etag { get; set; }Output only. A system-generated fingerprint for this version of theresource. May be used to detect modification conflict during updates.
| Property Value | |
|---|---|
| Type | Description |
string | |
Execution
public string Execution { get; set; }Output only. The name of the parent Execution.
| Property Value | |
|---|---|
| Type | Description |
string | |
ExecutionAsExecutionName
public ExecutionName ExecutionAsExecutionName { get; set; }ExecutionName-typed view over theExecution resource name property.
| Property Value | |
|---|---|
| Type | Description |
ExecutionName | |
ExecutionEnvironment
public ExecutionEnvironment ExecutionEnvironment { get; set; }The execution environment being used to host this Task.
| Property Value | |
|---|---|
| Type | Description |
ExecutionEnvironment | |
ExpireTime
public Timestamp ExpireTime { get; set; }Output only. For a deleted resource, the time after which it will bepermamently deleted. It is only populated as a response to a Deleterequest.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
Generation
public long Generation { get; set; }Output only. A number that monotonically increases every time the usermodifies the desired state.
| Property Value | |
|---|---|
| Type | Description |
long | |
GpuZonalRedundancyDisabled
public bool GpuZonalRedundancyDisabled { get; set; }Optional. Output only. True if GPU zonal redundancy is disabled on thistask.
| Property Value | |
|---|---|
| Type | Description |
bool | |
HasGpuZonalRedundancyDisabled
public bool HasGpuZonalRedundancyDisabled { get; }Gets whether the "gpu_zonal_redundancy_disabled" field is set
| Property Value | |
|---|---|
| Type | Description |
bool | |
Index
public int Index { get; set; }Output only. Index of the Task, unique per execution, and beginning at 0.
| Property Value | |
|---|---|
| Type | Description |
int | |
Job
public string Job { get; set; }Output only. The name of the parent Job.
| Property Value | |
|---|---|
| Type | Description |
string | |
JobAsJobName
public JobName JobAsJobName { get; set; }| Property Value | |
|---|---|
| Type | Description |
JobName | |
Labels
public MapField<string, string> Labels { get; }Output only. Unstructured key value map that can be used to organize andcategorize objects. User-provided labels are shared with Google's billingsystem, so they can be used to filter, or break down billing charges byteam, component, environment, state, etc. For more information, visithttps://cloud.google.com/resource-manager/docs/creating-managing-labels orhttps://cloud.google.com/run/docs/configuring/labels
| Property Value | |
|---|---|
| Type | Description |
MapFieldstringstring | |
LastAttemptResult
public TaskAttemptResult LastAttemptResult { get; set; }Output only. Result of the last attempt of this Task.
| Property Value | |
|---|---|
| Type | Description |
TaskAttemptResult | |
LogUri
public string LogUri { get; set; }Output only. URI where logs for this execution can be found in CloudConsole.
| Property Value | |
|---|---|
| Type | Description |
string | |
MaxRetries
public int MaxRetries { get; set; }Number of retries allowed per Task, before marking this Task failed.
| Property Value | |
|---|---|
| Type | Description |
int | |
Name
public string Name { get; set; }Output only. The unique name of this Task.
| Property Value | |
|---|---|
| Type | Description |
string | |
NodeSelector
public NodeSelector NodeSelector { get; set; }Output only. The node selector for the task.
| Property Value | |
|---|---|
| Type | Description |
NodeSelector | |
ObservedGeneration
public long ObservedGeneration { get; set; }Output only. The generation of this Task. See comments inJob.reconcilingfor additional information on reconciliation process in Cloud Run.
| Property Value | |
|---|---|
| Type | Description |
long | |
Reconciling
public bool Reconciling { get; set; }Output only. Indicates whether the resource's reconciliation is still inprogress. See comments inJob.reconciling for additional information onreconciliation process in Cloud Run.
| Property Value | |
|---|---|
| Type | Description |
bool | |
Retried
public int Retried { get; set; }Output only. The number of times this Task was retried.Tasks are retried when they fail up to the maxRetries limit.
| Property Value | |
|---|---|
| Type | Description |
int | |
SatisfiesPzs
public bool SatisfiesPzs { get; set; }Output only. Reserved for future use.
| Property Value | |
|---|---|
| Type | Description |
bool | |
ScheduledTime
public Timestamp ScheduledTime { get; set; }Output only. Represents time when the task was scheduled to run by thesystem. It is not guaranteed to be set in happens-before order acrossseparate operations.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
ServiceAccount
public string ServiceAccount { get; set; }Email address of the IAM service account associated with the Task of aJob. The service account represents the identity of therunning task, and determines what permissions the task has. Ifnot provided, the task will use the project's default service account.
| Property Value | |
|---|---|
| Type | Description |
string | |
StartTime
public Timestamp StartTime { get; set; }Output only. Represents time when the task started to run.It is not guaranteed to be set in happens-before order across separateoperations.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
TaskName
public TaskName TaskName { get; set; }| Property Value | |
|---|---|
| Type | Description |
TaskName | |
Timeout
public Duration Timeout { get; set; }Max allowed time duration the Task may be active before the system willactively try to mark it failed and kill associated containers. This appliesper attempt of a task, meaning each retry can run for the full timeout.
| Property Value | |
|---|---|
| Type | Description |
Duration | |
Uid
public string Uid { get; set; }Output only. Server assigned unique identifier for the Task. The value is aUUID4 string and guaranteed to remain unchanged until the resource isdeleted.
| Property Value | |
|---|---|
| Type | Description |
string | |
UpdateTime
public Timestamp UpdateTime { get; set; }Output only. The last-modified time.
| Property Value | |
|---|---|
| Type | Description |
Timestamp | |
Volumes
public RepeatedField<Volume> Volumes { get; }A list of Volumes to make available to containers.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldVolume | |
VpcAccess
public VpcAccess VpcAccess { get; set; }Output only. VPC Access configuration to use for this Task. For moreinformation, visithttps://cloud.google.com/run/docs/configuring/connecting-vpc.
| Property Value | |
|---|---|
| Type | Description |
VpcAccess | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-22 UTC.