Package types (2.20.0) Stay organized with collections Save and categorize content based on your preferences.
API documentation fortasks_v2beta2.types package.
Classes
AcknowledgeTaskRequest
Request message for acknowledging a task usingAcknowledgeTask.
AppEngineHttpRequest
App Engine HTTP request.
The message defines the HTTP request that is sent to an App Engineapp when the task is dispatched.
This proto can only be used for tasks in a queue which hasapp_engine_http_targetset.
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.v2beta2.AppEngineHttpRequest.app_engine_routing].
Theurl that the task will be sent to is:
url =host+relative_url
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][Task.dispatch_deadline]. Failed tasks will be retriedaccording to the [retryconfiguration][google.cloud.tasks.v2beta2.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.
AppEngineHttpTarget
App Engine HTTP target.
The task will be delivered to the App Engine application hostnamespecified by itsAppEngineHttpTargetandAppEngineHttpRequest.The documentation forAppEngineHttpRequestexplains how the task's host URL is constructed.
UsingAppEngineHttpTargetrequires`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
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>.
AttemptStatus
The status of a task attempt.
CancelLeaseRequest
Request message for canceling a lease usingCancelLease.
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. AnHTTP request embodies a url, an http method, headers, body andauthorization for the http task.
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
LeaseTasksRequest
Request message for leasing tasks usingLeaseTasks.
LeaseTasksResponse
Response message for leasing tasks usingLeaseTasks.
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
The pull message contains data that can be used by the caller ofLeaseTasks toprocess the task.
This proto can only be used for tasks in a queue which haspull_target set.
PullTarget
Pull target.
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,target types, and others.
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
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.
RenewLeaseRequest
Request message for renewing a lease usingRenewLease.
ResumeQueueRequest
Request message forResumeQueue.
RetryConfig
Retry config.
These settings determine how a failed task attempt is retried.
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
RunTaskRequest
Request message for forcing a task to run now usingRunTask.
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
TaskStatus
Status of the task.
UpdateQueueRequest
Request message forUpdateQueue.
UploadQueueYamlRequest
Request message forUploadQueueYaml.
.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
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.