Skip to main content

tasks

Creates, updates, deletes, gets or lists a tasks resource.

Overview

Nametasks
TypeResource
Idgoogle.batch.tasks

Fields

NameDatatypeDescription
namestringTask 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".
statusobjectStatus of a task.

Methods

NameAccessible byRequired ParamsDescription
getSELECTjobsId, locationsId, projectsId, taskGroupsId, tasksIdReturn a single Task.
listSELECTjobsId, locationsId, projectsId, taskGroupsIdList Tasks associated with a job.

SELECT examples

List Tasks associated with a job.

SELECT
name,
status
FROM google.batch.tasks
WHERE jobsId = '{{ jobsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND taskGroupsId = '{{ taskGroupsId }}';