Skip to main content

tasks

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

Overview

Nametasks
TypeResource
Idgoogle.batch.tasks

Fields

The following fields are returned by SELECT queries:

Successful response

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".
statusobjectTask Status. (id: TaskStatus)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, jobsId, taskGroupsId, tasksIdReturn a single Task.
listselectprojectsId, locationsId, jobsId, taskGroupsIdfilter, pageSize, pageTokenList Tasks associated with a job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
jobsIdstring
locationsIdstring
projectsIdstring
taskGroupsIdstring
tasksIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Return a single Task.

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