Package types (2.20.0) Stay organized with collections Save and categorize content based on your preferences.
API documentation fortasks_v2beta3.types package.
Classes
AppEngineHttpQueue
App Engine HTTP queue.
The task will be delivered to the App Engine application hostnamespecified by itsAppEngineHttpQueueandAppEngineHttpRequest.The documentation forAppEngineHttpRequestexplains how the task's host URL is constructed.
UsingAppEngineHttpQueuerequires`appengine.applications.gethttps://cloud.google.com/appengine/docs/admin-api/access-control`__Google IAM permission for the project and the following scope:
https://www.googleapis.com/auth/cloud-platform
AppEngineHttpRequest
App Engine HTTP request.
The message defines the HTTP request that is sent to an App Engineapp when the task is dispatched.
UsingAppEngineHttpRequestrequires`appengine.applications.gethttps://cloud.google.com/appengine/docs/admin-api/access-control`__Google IAM permission for the project and the following scope:
https://www.googleapis.com/auth/cloud-platform
The task will be delivered to the App Engine app which belongs tothe same project as the queue. For more information, seeHowRequests areRouted <https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed>and how routing is affected bydispatchfiles <https://cloud.google.com/appengine/docs/python/config/dispatchref>.Traffic is encrypted during transport and never leaves Googledatacenters. Because this traffic is carried over a communicationmechanism internal to Google, you cannot explicitly set the protocol(for example, HTTP or HTTPS). The request to the handler, however,will appear to have used the HTTP protocol.
TheAppEngineRoutingused to construct the URL that the task is delivered to can be setat the queue-level or task-level:
- If set,app_engine_routing_overrideis used for all tasks in the queue, no matter what the setting isfor the [task-levelapp_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
Theurl that the task will be sent to is:
url =host+relative_uri
Tasks can be dispatched to secure app handlers, unsecure apphandlers, and URIs restricted withlogin: admin`` <https://cloud.google.com/appengine/docs/standard/python/config/appref>`__.Because tasks are not run as any user, they cannot be dispatched toURIs restricted withlogin: required` <https://cloud.google.com/appengine/docs/standard/python/config/appref>__Task dispatches also do not follow redirects.
The task attempt has succeeded if the app's request handler returnsan HTTP response code in the range [200 -299]. The taskattempt has failed if the app's handler returns a non-2xx responsecode or Cloud Tasks does not receive response before thedeadline.Failed tasks will be retried according to the [retryconfiguration][google.cloud.tasks.v2beta3.Queue.retry_config].503 (Service Unavailable) is considered an App Engine systemerror instead of an application error and will cause Cloud Tasks'traffic congestion control to temporarily throttle the queue'sdispatches. Unlike other types of task targets, a429 (Too ManyRequests) response from an app handler does not cause trafficcongestion control to throttle the queue.
AppEngineRouting
App Engine Routing.
Defines routing characteristics specific to App Engine - service,version, and instance.
For more information about services, versions, and instances seeAnOverview of AppEngine <https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine>,Microservices Architecture on Google AppEngine <https://cloud.google.com/appengine/docs/python/microservices-on-app-engine>,App Engine Standard requestrouting <https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed>,andApp Engine Flex requestrouting <https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed>.
Attempt
The status of a task attempt.
CreateQueueRequest
Request message forCreateQueue.
CreateTaskRequest
Request message forCreateTask.
DeleteQueueRequest
Request message forDeleteQueue.
DeleteTaskRequest
Request message for deleting a task usingDeleteTask.
GetQueueRequest
Request message forGetQueue.
GetTaskRequest
Request message for getting a task usingGetTask.
HttpMethod
The HTTP method used to execute the task.
HttpRequest
HTTP request.
The task will be pushed to the worker as an HTTP request. If theworker or the redirected worker acknowledges the task by returning asuccessful HTTP response code ([200 -299]), the task willbe removed from the queue. If any other HTTP response code isreturned or no response is received, the task will be retriedaccording to the following:
User-specified throttling: [retryconfiguration][google.cloud.tasks.v2beta3.Queue.retry_config],rate limits, andthe [queue's state][google.cloud.tasks.v2beta3.Queue.state].
System throttling: To prevent the worker from overloading, CloudTasks may temporarily reduce the queue's effective rate.User-specified settings will not be changed.
System throttling happens because:
Cloud Tasks backs off on all errors. Normally the backoffspecified in [ratelimits][google.cloud.tasks.v2beta3.Queue.rate_limits] will beused. But if the worker returns
429(Too Many Requests),503(Service Unavailable), or the rate of errors is high,Cloud Tasks will use a higher backoff rate. The retry specified intheRetry-AfterHTTP response header is considered.To prevent traffic spikes and to smooth sudden increases intraffic, dispatches ramp up slowly when the queue is newly createdor idle and if large numbers of tasks suddenly become available todispatch (due to spikes in create task rates, the queue beingunpaused, or many tasks that are scheduled at the same time).
This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
HttpTarget
HTTP target.
When specified as aQueue][target_type], all the tasks with[HttpRequest] will be overridden according to the target.
This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
ListQueuesRequest
Request message forListQueues.
ListQueuesResponse
Response message forListQueues.
ListTasksRequest
Request message for listing tasks usingListTasks.
ListTasksResponse
Response message for listing tasks usingListTasks.
OAuthToken
Contains information needed for generating anOAuthtoken <https://developers.google.com/identity/protocols/OAuth2>__.This type of authorization should generally only be used whencalling Google APIs hosted on *.googleapis.com.
OidcToken
Contains information needed for generating anOpenID Connecttoken <https://developers.google.com/identity/protocols/OpenIDConnect>__.This type of authorization can be used for many scenarios, includingcalling Cloud Run, or endpoints where you intend to validate thetoken yourself.
PathOverride
PathOverride.
Path message defines path override for HTTP targets.
PauseQueueRequest
Request message forPauseQueue.
PullMessage
Pull Message.
This proto can only be used for tasks in a queue which hasPULL type. It currentlyexists for backwards compatibility with the App Engine Task QueueSDK. This message type maybe returned with methodslist andget, when theresponse view isFULL.
PurgeQueueRequest
Request message forPurgeQueue.
QueryOverride
QueryOverride.
Query message defines query override for HTTP targets.
Queue
A queue is a container of related tasks. Queues areconfigured to manage how those tasks are dispatched.Configurable properties include rate limits, retry options,queue types, and others.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
QueueStats
Statistics for a queue.
RateLimits
Rate limits.
This message determines the maximum rate that tasks can bedispatched by a queue, regardless of whether the dispatch is a firsttask attempt or a retry.
Note: The debugging command,RunTask, will run atask even if the queue has reached itsRateLimits.
ResumeQueueRequest
Request message forResumeQueue.
RetryConfig
Retry config.
These settings determine when a failed task attempt is retried.
RunTaskRequest
Request message for forcing a task to run now usingRunTask.
StackdriverLoggingConfig
Configuration options for writing logs toStackdriverLogging <https://cloud.google.com/logging/docs/>__.
Task
A unit of scheduled work.
This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
UpdateQueueRequest
Request message forUpdateQueue.
UriOverride
URI Override.
When specified, all the HTTP tasks inside the queue will bepartially or fully overridden depending on the configuredvalues.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.