Reference documentation and code samples for the Google Cloud Tasks V2 Client class ListTasksRequest.
Request message for listing tasks using
ListTasks.
Generated from protobuf message google.cloud.tasks.v2.ListTasksRequest
Namespace
Google \ Cloud \ Tasks \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID
↳ response_view
int
The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires cloudtasks.tasks.fullViewGoogle IAM permission on the Task resource.
↳ page_size
int
Maximum page size. Fewer tasks than requested might be returned, even if more tasks exist; use next_page_token in the response to determine if more tasks exist. The maximum page size is 1000. If unspecified, the page size will be the maximum.
↳ page_token
string
A token identifying the page of results to return. To request the first page results, page_token must be empty. To request the next page of results, page_token must be the value of next_page_token returned from the previous call to ListTasks method. The page token is valid for only 2 hours.
getParent
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID
Returns
Type
Description
string
setParent
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getResponseView
The response_view specifies which subset of the
Task will be returned.
By default response_view is BASIC;
not all information is retrieved by default because some data, such as
payloads, might be desirable to return only when needed because
of its large size or because of the sensitivity of data that it
contains.
Authorization for FULL requires
cloudtasks.tasks.fullViewGoogle IAM
permission on the Task resource.
Returns
Type
Description
int
setResponseView
The response_view specifies which subset of the
Task will be returned.
By default response_view is BASIC;
not all information is retrieved by default because some data, such as
payloads, might be desirable to return only when needed because
of its large size or because of the sensitivity of data that it
contains.
Authorization for FULL requires
cloudtasks.tasks.fullViewGoogle IAM
permission on the Task resource.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPageSize
Maximum page size.
Fewer tasks than requested might be returned, even if more tasks exist; use
next_page_token
in the response to determine if more tasks exist.
The maximum page size is 1000. If unspecified, the page size will be the
maximum.
Returns
Type
Description
int
setPageSize
Maximum page size.
Fewer tasks than requested might be returned, even if more tasks exist; use
next_page_token
in the response to determine if more tasks exist.
The maximum page size is 1000. If unspecified, the page size will be the
maximum.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPageToken
A token identifying the page of results to return.
To request the first page results, page_token must be empty. To
request the next page of results, page_token must be the value of
next_page_token
returned from the previous call to
ListTasks method.
The page token is valid for only 2 hours.
Returns
Type
Description
string
setPageToken
A token identifying the page of results to return.
To request the first page results, page_token must be empty. To
request the next page of results, page_token must be the value of
next_page_token
returned from the previous call to
ListTasks method.
The page token is valid for only 2 hours.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameter
Name
Description
parent
string
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID
Please see CloudTasksClient::queueName() for help formatting this field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Tasks V2 Client - Class ListTasksRequest (2.0.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.2 (latest)](/php/docs/reference/cloud-tasks/latest/V2.ListTasksRequest)\n- [2.0.1](/php/docs/reference/cloud-tasks/2.0.1/V2.ListTasksRequest)\n- [1.15.2](/php/docs/reference/cloud-tasks/1.15.2/V2.ListTasksRequest)\n- [1.14.6](/php/docs/reference/cloud-tasks/1.14.6/V2.ListTasksRequest)\n- [1.13.2](/php/docs/reference/cloud-tasks/1.13.2/V2.ListTasksRequest)\n- [1.12.2](/php/docs/reference/cloud-tasks/1.12.2/V2.ListTasksRequest)\n- [1.11.11](/php/docs/reference/cloud-tasks/1.11.11/V2.ListTasksRequest) \nReference documentation and code samples for the Google Cloud Tasks V2 Client class ListTasksRequest.\n\nRequest message for listing tasks using\n[ListTasks](/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__).\n\nGenerated from protobuf message `google.cloud.tasks.v2.ListTasksRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Tasks \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n### setParent\n\nRequired. The queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n### getResponseView\n\nThe response_view specifies which subset of the\n[Task](/php/docs/reference/cloud-tasks/latest/V2.Task) will be returned.\n\nBy default response_view is [BASIC](/php/docs/reference/cloud-tasks/latest/V2.Task.View#_Google_Cloud_Tasks_V2_Task_View__BASIC);\nnot all information is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\nAuthorization for [FULL](/php/docs/reference/cloud-tasks/latest/V2.Task.View#_Google_Cloud_Tasks_V2_Task_View__FULL) requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the [Task](/php/docs/reference/cloud-tasks/latest/V2.Task) resource.\n\n### setResponseView\n\nThe response_view specifies which subset of the\n[Task](/php/docs/reference/cloud-tasks/latest/V2.Task) will be returned.\n\nBy default response_view is [BASIC](/php/docs/reference/cloud-tasks/latest/V2.Task.View#_Google_Cloud_Tasks_V2_Task_View__BASIC);\nnot all information is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\nAuthorization for [FULL](/php/docs/reference/cloud-tasks/latest/V2.Task.View#_Google_Cloud_Tasks_V2_Task_View__FULL) requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the [Task](/php/docs/reference/cloud-tasks/latest/V2.Task) resource.\n\n### getPageSize\n\nMaximum page size.\n\nFewer tasks than requested might be returned, even if more tasks exist; use\n[next_page_token](/php/docs/reference/cloud-tasks/latest/V2.ListTasksResponse#_Google_Cloud_Tasks_V2_ListTasksResponse__getNextPageToken__)\nin the response to determine if more tasks exist.\nThe maximum page size is 1000. If unspecified, the page size will be the\nmaximum.\n\n### setPageSize\n\nMaximum page size.\n\nFewer tasks than requested might be returned, even if more tasks exist; use\n[next_page_token](/php/docs/reference/cloud-tasks/latest/V2.ListTasksResponse#_Google_Cloud_Tasks_V2_ListTasksResponse__getNextPageToken__)\nin the response to determine if more tasks exist.\nThe maximum page size is 1000. If unspecified, the page size will be the\nmaximum.\n\n### getPageToken\n\nA token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\n[next_page_token](/php/docs/reference/cloud-tasks/latest/V2.ListTasksResponse#_Google_Cloud_Tasks_V2_ListTasksResponse__getNextPageToken__)\nreturned from the previous call to\n[ListTasks](/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__) method.\nThe page token is valid for only 2 hours.\n\n### setPageToken\n\nA token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\n[next_page_token](/php/docs/reference/cloud-tasks/latest/V2.ListTasksResponse#_Google_Cloud_Tasks_V2_ListTasksResponse__getNextPageToken__)\nreturned from the previous call to\n[ListTasks](/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__) method.\nThe page token is valid for only 2 hours.\n\n### static::build"]]