Reference documentation and code samples for the Google Cloud Tasks V2 Client class State.
State of the queue.
Protobuf type google.cloud.tasks.v2.Queue.State
Namespace
Google \ Cloud \ Tasks \ V2 \ Queue
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
STATE_UNSPECIFIED
Value: 0
Unspecified state.
Generated from protobuf enum STATE_UNSPECIFIED = 0;
RUNNING
Value: 1
The queue is running. Tasks can be dispatched.
If the queue was created using Cloud Tasks and the queue has
had no activity (method calls or task dispatches) for 30 days,
the queue may take a few minutes to re-activate. Some method
calls may return NOT_FOUND and
tasks may not be dispatched for a few minutes until the queue
has been re-activated.
Generated from protobuf enum RUNNING = 1;
PAUSED
Value: 2
Tasks are paused by the user. If the queue is paused then Cloud
Tasks will stop delivering tasks from it, but more tasks can
still be added to it by the user.
Generated from protobuf enum PAUSED = 2;
DISABLED
Value: 3
The queue is disabled.
A queue becomes DISABLED when
queue.yaml
or
queue.xml
is uploaded which does not contain the queue. You cannot directly disable
a queue.
When a queue is disabled, tasks can still be added to a queue
but the tasks are not dispatched.
To permanently delete this queue and all of its tasks, call
DeleteQueue.
[[["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 State (2.0.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.2 (latest)](/php/docs/reference/cloud-tasks/latest/V2.Queue.State)\n- [2.0.1](/php/docs/reference/cloud-tasks/2.0.1/V2.Queue.State)\n- [1.15.2](/php/docs/reference/cloud-tasks/1.15.2/V2.Queue.State)\n- [1.14.6](/php/docs/reference/cloud-tasks/1.14.6/V2.Queue.State)\n- [1.13.2](/php/docs/reference/cloud-tasks/1.13.2/V2.Queue.State)\n- [1.12.2](/php/docs/reference/cloud-tasks/1.12.2/V2.Queue.State)\n- [1.11.11](/php/docs/reference/cloud-tasks/1.11.11/V2.Queue.State) \nReference documentation and code samples for the Google Cloud Tasks V2 Client class State.\n\nState of the queue.\n\nProtobuf type `google.cloud.tasks.v2.Queue.State`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Tasks \\\\ V2 \\\\ Queue\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### STATE_UNSPECIFIED\n\n Value: 0\n\nUnspecified state.\n\nGenerated from protobuf enum `STATE_UNSPECIFIED = 0;`\n\n### RUNNING\n\n Value: 1\n\nThe queue is running. Tasks can be dispatched.\n\nIf the queue was created using Cloud Tasks and the queue has\nhad no activity (method calls or task dispatches) for 30 days,\nthe queue may take a few minutes to re-activate. Some method\ncalls may return [NOT_FOUND](https://cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__NOT_FOUND) and\ntasks may not be dispatched for a few minutes until the queue\nhas been re-activated.\n\nGenerated from protobuf enum `RUNNING = 1;`\n\n### PAUSED\n\n Value: 2\n\nTasks are paused by the user. If the queue is paused then Cloud\nTasks will stop delivering tasks from it, but more tasks can\nstill be added to it by the user.\n\nGenerated from protobuf enum `PAUSED = 2;`\n\n### DISABLED\n\n Value: 3\n\nThe queue is disabled.\n\nA queue becomes `DISABLED` when\n[queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)\nor\n[queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)\nis uploaded which does not contain the queue. You cannot directly disable\na queue.\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched.\nTo permanently delete this queue and all of its tasks, call\n[DeleteQueue](/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__deleteQueue__).\n\nGenerated from protobuf enum `DISABLED = 3;`"]]