Package Classes (2.20.0) Stay organized with collections Save and categorize content based on your preferences.
Summary of entries of Classes for cloudtasks.
Classes
CloudTasksAsyncClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
CloudTasksClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
ListQueuesAsyncPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__aiter__ method to iterate through itsqueues field.
If there are more pages, the__aiter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListQueuesPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__iter__ method to iterate through itsqueues field.
If there are more pages, the__iter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksAsyncPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__aiter__ method to iterate through itstasks field.
If there are more pages, the__aiter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__iter__ method to iterate through itstasks field.
If there are more pages, the__iter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
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.
TheAppEngineRouting usedto construct the URL that the task is delivered to can be set at thequeue-level or task-level:
- If [app_engine_routing_override is set on thequeue][google.cloud.tasks.v2.Queue.app_engine_routing_override],this value is used for all tasks in the queue, no matter what thesetting is for the [task-levelapp_engine_routing][google.cloud.tasks.v2.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. Failedtasks will be retried according to the [retryconfiguration][google.cloud.tasks.v2.Queue.retry_config].503(Service Unavailable) is considered an App Engine system errorinstead of an application error and will cause Cloud Tasks' trafficcongestion control to temporarily throttle the queue's dispatches.Unlike other types of task targets, a429 (Too Many Requests)response from an app handler does not cause traffic congestioncontrol to throttle the queue.
HeadersEntry
The abstract base class for a message.
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>.
UsingAppEngineRoutingrequires`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
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 deliver 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.v2.Queue.retry_config], [ratelimits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue'sstate][google.cloud.tasks.v2.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.v2.Queue.rate_limits] will be used. Butif the worker returns
429(Too Many Requests),503(Service Unavailable), or the rate of errors is high, Cloud Taskswill use a higher backoff rate. The retry specified in theRetry-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
HeadersEntry
The abstract base class for a message.
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.
PauseQueueRequest
Request message forPauseQueue.
PurgeQueueRequest
Request message forPurgeQueue.
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.
State
State of the queue.
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][google.rpc.Code.NOT_FOUND]` and tasks may not be dispatched for a few minutes until the queue has been re-activated.PAUSED (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.DISABLED (3): The queue is disabled. A queue becomes `DISABLED` when `queue.yaml <https://cloud.google.com/appengine/docs/python/config/queueref>`__ or `queue.xml <https://cloud.google.com/appengine/docs/standard/java/config/queueref>`__ 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 <xref uid="google.cloud.tasks.v2.CloudTasks.DeleteQueue">DeleteQueue</xref>.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 a taskeven 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
View
The view specifies a subset ofTaskdata.
When a task is returned in a response, not all information isretrieved by default because some data, such as payloads, might bedesirable to return only when needed because of its large size orbecause of the sensitivity of data that it contains.
This view does not include the [body in AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. Bodies are desirable to return only when needed, because they can be large and because of the sensitivity of the data that you choose to store in it.FULL (2): All information is returned. Authorization for <xref uid="google.cloud.tasks.v2.Task.View.FULL">FULL</xref> requires `cloudtasks.tasks.fullView` `Google IAM <https://cloud.google.com/iam/>`__ permission on the <xref uid="google.cloud.tasks.v2.Queue">Queue</xref> resource.UpdateQueueRequest
Request message forUpdateQueue.
CloudTasksAsyncClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
CloudTasksClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
ListQueuesAsyncPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__aiter__ method to iterate through itsqueues field.
If there are more pages, the__aiter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListQueuesPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__iter__ method to iterate through itsqueues field.
If there are more pages, the__iter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksAsyncPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__aiter__ method to iterate through itstasks field.
If there are more pages, the__aiter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__iter__ method to iterate through itstasks field.
If there are more pages, the__iter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
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.
HeadersEntry
The abstract base class for a message.
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
HeadersEntry
The abstract base class for a message.
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
Header
Defines a header message. A header can have a key and avalue.
HeaderOverride
Wraps the Header object.
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
State
State of the queue.
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][google.rpc.Code.NOT_FOUND]` and tasks may not be dispatched for a few minutes until the queue has been re-activated.PAUSED (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. When a pull queue is paused, all <xref uid="google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks">LeaseTasks</xref> calls will return a `FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]`.DISABLED (3): The queue is disabled. A queue becomes `DISABLED` when `queue.yaml <https://cloud.google.com/appengine/docs/python/config/queueref>`__ or `queue.xml <https://cloud.google.com/appengine/docs/standard/java/config/queueref>`__ 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 and <xref uid="google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks">LeaseTasks</xref> calls return a `FAILED_PRECONDITION` error. To permanently delete this queue and all of its tasks, call <xref uid="google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue">DeleteQueue</xref>.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
View
The view specifies a subset ofTask data.
When a task is returned in a response, not all information isretrieved by default because some data, such as payloads, might bedesirable to return only when needed because of its large size orbecause of the sensitivity of data that it contains.
This view does not include the ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are desirable to return only when needed, because they can be large and because of the sensitivity of the data that you choose to store in it.FULL (2): All information is returned. Authorization for <xref uid="google.cloud.tasks.v2beta2.Task.View.FULL">FULL</xref> requires `cloudtasks.tasks.fullView` `Google IAM <https://cloud.google.com/iam/>`__ permission on the <xref uid="google.cloud.tasks.v2beta2.Queue">Queue</xref> resource.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
Scheme
The Scheme for an HTTP request. By default, it is HTTPS.
UriOverrideEnforceMode
UriOverrideEnforceMode mode is to define enforcing mode forthe override modes.
CloudTasksAsyncClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
CloudTasksClient
Cloud Tasks allows developers to manage the execution ofbackground work in their applications.
ListQueuesAsyncPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__aiter__ method to iterate through itsqueues field.
If there are more pages, the__aiter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListQueuesPager
A pager for iterating throughlist_queues requests.
This class thinly wraps an initialListQueuesResponse object, andprovides an__iter__ method to iterate through itsqueues field.
If there are more pages, the__iter__ method will make additionalListQueues requests and continue to iteratethrough thequeues field on thecorresponding responses.
All the usualListQueuesResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksAsyncPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__aiter__ method to iterate through itstasks field.
If there are more pages, the__aiter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
ListTasksPager
A pager for iterating throughlist_tasks requests.
This class thinly wraps an initialListTasksResponse object, andprovides an__iter__ method to iterate through itstasks field.
If there are more pages, the__iter__ method will make additionalListTasks requests and continue to iteratethrough thetasks field on thecorresponding responses.
All the usualListTasksResponseattributes are available on the pager. If multiple requests are made, onlythe most recent response is retained, and thus used for attribute lookup.
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.
HeadersEntry
The abstract base class for a message.
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
HeadersEntry
The abstract base class for a message.
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
Header
Defines a header message. A header can have a key and avalue.
HeaderOverride
Wraps the Header object.
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
State
State of the queue.
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][google.rpc.Code.NOT_FOUND]` and tasks may not be dispatched for a few minutes until the queue has been re-activated.PAUSED (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.DISABLED (3): The queue is disabled. A queue becomes `DISABLED` when `queue.yaml <https://cloud.google.com/appengine/docs/python/config/queueref>`__ or `queue.xml <https://cloud.google.com/appengine/docs/standard/java/config/queueref>`__ 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 <xref uid="google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue">DeleteQueue</xref>.Type
The type of the queue.
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
View
The view specifies a subset ofTask data.
When a task is returned in a response, not all information isretrieved by default because some data, such as payloads, might bedesirable to return only when needed because of its large size orbecause of the sensitivity of data that it contains.
This view does not include the [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. Bodies are desirable to return only when needed, because they can be large and because of the sensitivity of the data that you choose to store in it.FULL (2): All information is returned. Authorization for <xref uid="google.cloud.tasks.v2beta3.Task.View.FULL">FULL</xref> requires `cloudtasks.tasks.fullView` `Google IAM <https://cloud.google.com/iam/>`__ permission on the <xref uid="google.cloud.tasks.v2beta3.Queue">Queue</xref> resource.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
Scheme
The Scheme for an HTTP request. By default, it is HTTPS.
UriOverrideEnforceMode
UriOverrideEnforceMode mode is to define enforcing mode forthe override modes.
Modules
pagers
API documentation fortasks_v2.services.cloud_tasks.pagers module.
pagers
API documentation fortasks_v2beta2.services.cloud_tasks.pagers module.
pagers
API documentation fortasks_v2beta3.services.cloud_tasks.pagers module.
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.