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

Resource: Task

A Cloud Batch task.

JSON representation
{
  "name": string,
  "status": {
    object (TaskStatus)
  }
}
Fields
name

string

Task name. The name is generated from the parent TaskGroup name and 'id' field. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01".

status

object (TaskStatus)

Task Status.

TaskStatus

Status of a task.

JSON representation
{
  "state": enum (State),
  "statusEvents": [
    {
      object (StatusEvent)
    }
  ],
  "resourceUsage": {
    object (TaskResourceUsage)
  }
}
Fields
state

enum (State)

Task state.

statusEvents[]

object (StatusEvent)

Detailed info about why the state is reached.

resourceUsage

object (TaskResourceUsage)

The resource usage of the task.

TaskResourceUsage

TaskResourceUsage describes the resource usage of the task.

JSON representation
{
  "coreHours": number
}
Fields
coreHours

number

The CPU core hours the task consumes based on task requirement and run time.

Methods

get

Return a single Task.

list

List Tasks associated with a job.