REST Resource: projects.locations.jobs.executions.tasks

Resource: Task

Task represents a single run of a container to completion.

JSON representation
{
  "name": string,
  "uid": string,
  "generation": string,
  "labels": {
    string: string,
    ...
  },
  "annotations": {
    string: string,
    ...
  },
  "createTime": string,
  "scheduledTime": string,
  "startTime": string,
  "completionTime": string,
  "updateTime": string,
  "deleteTime": string,
  "expireTime": string,
  "job": string,
  "execution": string,
  "containers": [
    {
      object (Container)
    }
  ],
  "volumes": [
    {
      object (Volume)
    }
  ],
  "maxRetries": integer,
  "timeout": string,
  "serviceAccount": string,
  "executionEnvironment": enum (ExecutionEnvironment),
  "reconciling": boolean,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "observedGeneration": string,
  "index": integer,
  "retried": integer,
  "lastAttemptResult": {
    object (TaskAttemptResult)
  },
  "encryptionKey": string,
  "vpcAccess": {
    object (VpcAccess)
  },
  "logUri": string,
  "satisfiesPzs": boolean,
  "etag": string
}
Fields
name

string

Output only. The unique name of this Task.

uid

string

Output only. Server assigned unique identifier for the Task. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

generation

string (int64 format)

Output only. A number that monotonically increases every time the user modifies the desired state.

labels

map (key: string, value: string)

Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

annotations

map (key: string, value: string)

Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

createTime

string (Timestamp format)

Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

scheduledTime

string (Timestamp format)

Output only. Represents time when the task was scheduled to run by the system. It is not guaranteed to be set in happens-before order across separate operations.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

startTime

string (Timestamp format)

Output only. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

completionTime

string (Timestamp format)

Output only. Represents time when the Task was completed. It is not guaranteed to be set in happens-before order across separate operations.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The last-modified time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

deleteTime

string (Timestamp format)

Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

expireTime

string (Timestamp format)

Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

job

string

Output only. The name of the parent Job.

execution

string

Output only. The name of the parent Execution.

containers[]

object (Container)

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

volumes[]

object (Volume)

A list of Volumes to make available to containers.

maxRetries

integer

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

timeout

string (Duration format)

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.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

serviceAccount

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.

executionEnvironment

enum (ExecutionEnvironment)

The execution environment being used to host this Task.

reconciling

boolean

Output only. Indicates whether the resource's reconciliation is still in progress. See comments in Job.reconciling for additional information on reconciliation process in Cloud Run.

conditions[]

object (Condition)

Output only. The Condition of this Task, containing its readiness status, and detailed error information in case it did not reach the desired state.

observedGeneration

string (int64 format)

Output only. The generation of this Task. See comments in Job.reconciling for additional information on reconciliation process in Cloud Run.

index

integer

Output only. Index of the Task, unique per execution, and beginning at 0.

retried

integer

Output only. The number of times this Task was retried. Tasks are retried when they fail up to the maxRetries limit.

lastAttemptResult

object (TaskAttemptResult)

Output only. Result of the last attempt of this Task.

encryptionKey

string

Output only. 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

vpcAccess

object (VpcAccess)

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

logUri

string

Output only. URI where logs for this execution can be found in Cloud Console.

satisfiesPzs

boolean

Output only. Reserved for future use.

etag

string

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

TaskAttemptResult

Result of a task attempt.

JSON representation
{
  "status": {
    object (Status)
  },
  "exitCode": integer
}
Fields
status

object (Status)

Output only. The status of this attempt. If the status code is OK, then the attempt succeeded.

exitCode

integer

Output only. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details.

Methods

get

Gets information about a Task.

list

Lists Tasks from an Execution of a Job.