Types for Cloud Tasks API Client#

class google.cloud.tasks_v2beta2.types.AcknowledgeTaskRequest#

Request message for acknowledging a task using [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

schedule_time#

Required. The task’s current schedule time, available in the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_tim e] returned by [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is to ensure that your worker currently holds the lease.

name

Field google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.name

schedule_time

Field google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.schedule_time

class google.cloud.tasks_v2beta2.types.Any#
type_url#

Field google.protobuf.Any.type_url

value#

Field google.protobuf.Any.value

class google.cloud.tasks_v2beta2.types.AppEngineHttpRequest#

App Engine HTTP request.

The message defines the HTTP request that is sent to an App Engine app when the task is dispatched.

This proto can only be used for tasks in a queue which has [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set.

Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires `appengine.applications.get <https://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 to the same project as the queue. For more information, see How Requests are Routed and how routing is affected by dispatch files.

The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is delivered to can be set at the queue-level or task-level:

  • If set, [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] is used for all tasks in the queue, no matter what the setting is for the [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].

The url that the task will be sent to is:

  • url = [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] + [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url]

The task attempt has succeeded if the app’s request handler returns an HTTP response code in the range [200 - 299]. 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code or a failure to receive a response before the deadline is a failed attempt.

http_method#

The HTTP method to use for the request. The default is POST. The app’s request handler for the task’s target URL must be able to handle HTTP requests with this http_method, otherwise the task attempt will fail with error code 405 (Method Not Allowed). See Writing a push task request handler and the documentation for the request handlers in the language your app is written in e.g. Python Request Handler.

app_engine_routing#

Task-level setting for App Engine routing. If set, [app_engi ne_routing_override][google.cloud.tasks.v2beta2.AppEngineHtt pTarget.app_engine_routing_override] is used for all tasks in the queue, no matter what the setting is for the [task- level app_engine_routing][google.cloud.tasks.v2beta2.AppEngi neHttpRequest.app_engine_routing].

relative_url#

The relative URL. The relative URL must begin with “/” and must be a valid HTTP relative URL. It can contain a path and query string arguments. If the relative URL is empty, then the root path “/” will be used. No spaces are allowed, and the maximum length allowed is 2083 characters.

headers#

HTTP request headers. This map contains the header field names and values. Headers can be set when the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. Repeated headers are not supported but a header value can contain commas. Cloud Tasks sets some headers to default values: - User-Agent: By default, this header is "AppEngine-Google; (+http://code.google.com/appengine)". This header can be modified, but Cloud Tasks will append "AppEngine-Google; (+http://code.google.com/appengine)" to the modified User-Agent. If the task has a [payload][g oogle.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud Tasks sets the following headers: - Content-Type: By default, the Content-Type header is set to "application/octet-stream". The default can be overridden by explicitly setting Content-Type to a particular media type when the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. For example, Content-Type can be set to "application/json". - Content-Length: This is computed by Cloud Tasks. This value is output only. It cannot be changed. The headers below cannot be set or overridden: - Host - X-Google-* - X-AppEngine-* In addition, Cloud Tasks sets some headers when the task is dispatched, such as headers containing information about the task; see request headers. These headers are set only when the task is dispatched, so they are not visible when the task is returned in a Cloud Tasks response. Although there is no specific limit for the maximum number of headers or the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.

payload#

Payload. The payload will be sent as the HTTP message body. A message body, and thus a payload, is allowed only if the HTTP method is POST or PUT. It is an error to set a data payload on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].

class HeadersEntry#
key#

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry.key

value#

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry.value

app_engine_routing

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing

headers

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.headers

http_method

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.http_method

payload

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload

relative_url

Field google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url

class google.cloud.tasks_v2beta2.types.AppEngineHttpTarget#

App Engine HTTP target.

The task will be delivered to the App Engine application hostname specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the task’s host URL is constructed.

Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires `appengine.applications.get <https://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

app_engine_routing_override#

Overrides for the [task-level app_engine_routing][google.clo ud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. If set, app_engine_routing_override is used for all tasks in the queue, no matter what the setting is for the [task- level app_engine_routing][google.cloud.tasks.v2beta2.AppEngi neHttpRequest.app_engine_routing].

app_engine_routing_override

Field google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override

class google.cloud.tasks_v2beta2.types.AppEngineRouting#

App Engine Routing.

For more information about services, versions, and instances see An Overview of App Engine, Microservices Architecture on Google App Engine, App Engine Standard request routing, and App Engine Flex request routing.

service#

App service. By default, the task is sent to the service which is the default service when the task is attempted. For some queues or tasks which were created using the App Engine Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable into [service][google.cloud.tasks.v2beta2.AppEngi neRouting.service], [version][google.cloud.tasks.v2beta2.AppEn gineRouting.version], and [instance][google.cloud.tasks.v2beta 2.AppEngineRouting.instance]. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom domains are not parsed by Cloud Tasks. If [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then [service][google.cloud.tasks.v2beta2.AppEng ineRouting.service], [version][google.cloud.tasks.v2beta2.AppE ngineRouting.version], and [instance][google.cloud.tasks.v2bet a2.AppEngineRouting.instance] are the empty string.

version#

App version. By default, the task is sent to the version which is the default version when the task is attempted. For some queues or tasks which were created using the App Engine Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable into [service][google.cloud.tasks.v2beta2.AppEngi neRouting.service], [version][google.cloud.tasks.v2beta2.AppEn gineRouting.version], and [instance][google.cloud.tasks.v2beta 2.AppEngineRouting.instance]. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom domains are not parsed by Cloud Tasks. If [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then [service][google.cloud.tasks.v2beta2.AppEng ineRouting.service], [version][google.cloud.tasks.v2beta2.AppE ngineRouting.version], and [instance][google.cloud.tasks.v2bet a2.AppEngineRouting.instance] are the empty string.

instance#

App instance. By default, the task is sent to an instance which is available when the task is attempted. Requests can only be sent to a specific instance if manual scaling is used in App Engine Standard. App Engine Flex does not support instances. For more information, see App Engine Standard request routing and App Engine Flex request routing.

host#

Output only. The host that the task is sent to. For more information, see How Requests are Routed. The host is constructed as: - host = [application_domain_name] | [service] + '.' + [application_domain_name] | [version] + '.' + [application_domain_name] | [version_dot_service]+ '.' + [application_domain_name] | [instance] + '.' + [application_domain_name] | [instance_dot_service] + '.' + [application_domain_name] | [instance_dot_version] + '.' + [application_domain_name] | [instance_dot_version_dot_service] + '.' + [application_domain_name] - application_domain_name = The domain name of the app, for example .appspot.com, which is associated with the queue’s project ID. Some tasks which were created using the App Engine SDK use a custom domain name. - service = [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - version = [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - version_dot_service = [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + '.' + [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - instance = [instance][google.cloud.tasks.v2beta2.App EngineRouting.instance] - instance_dot_service = [ins tance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + '.'   + [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - instance_dot_version = [instance][google.cloud.tasks .v2beta2.AppEngineRouting.instance] + '.'   + [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - instance_dot_version_dot_service = [instance][google .cloud.tasks.v2beta2.AppEngineRouting.instance] + '.' + [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + '.'   + [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent to the service which is the default service when the task is attempted. If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent to the version which is the default version when the task is attempted. If [instance] [google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task will be sent to an instance which is available when the task is attempted. If [service][google.clo ud.tasks.v2beta2.AppEngineRouting.service], [version][google.c loud.tasks.v2beta2.AppEngineRouting.version], or [instance][go ogle.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task will be sent to the default version of the default service when the task is attempted.

host

Field google.cloud.tasks.v2beta2.AppEngineRouting.host

instance

Field google.cloud.tasks.v2beta2.AppEngineRouting.instance

service

Field google.cloud.tasks.v2beta2.AppEngineRouting.service

version

Field google.cloud.tasks.v2beta2.AppEngineRouting.version

class google.cloud.tasks_v2beta2.types.AttemptStatus#

The status of a task attempt.

schedule_time#

Output only. The time that this attempt was scheduled. schedule_time will be truncated to the nearest microsecond.

dispatch_time#

Output only. The time that this attempt was dispatched. dispatch_time will be truncated to the nearest microsecond.

response_time#

Output only. The time that this attempt response was received. response_time will be truncated to the nearest microsecond.

response_status#

Output only. The response from the target for this attempt. If the task has not been attempted or the task is currently running then the response status is unset.

dispatch_time

Field google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time

response_status

Field google.cloud.tasks.v2beta2.AttemptStatus.response_status

response_time

Field google.cloud.tasks.v2beta2.AttemptStatus.response_time

schedule_time

Field google.cloud.tasks.v2beta2.AttemptStatus.schedule_time

class google.cloud.tasks_v2beta2.types.AuditConfigDelta#

One delta entry for AuditConfig. Each individual change (only one exempted_member in each entry) to a AuditConfig will be a separate entry.

action#

The action that was performed on an audit configuration in a policy. Required

service#

Specifies a service that was configured for Cloud Audit Logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services. Required

exempted_member#

A single identity that is exempted from “data access” audit logging for the service specified above. Follows the same format of Binding.members.

log_type#

Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always enabled, and cannot be configured. Required

action

Field google.iam.v1.AuditConfigDelta.action

exempted_member

Field google.iam.v1.AuditConfigDelta.exempted_member

log_type

Field google.iam.v1.AuditConfigDelta.log_type

service

Field google.iam.v1.AuditConfigDelta.service

class google.cloud.tasks_v2beta2.types.Binding#

Associates members with a role.

role#

Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.

members#

Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: - allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. - allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. - user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . - serviceAccount:{emailid}: An email address that represents a service account. For example, my-other- app@appspot.gserviceaccount.com. - group:{emailid}: An email address that represents a Google group. For example, admins@example.com. - domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.

condition#

The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.

condition

Field google.iam.v1.Binding.condition

members

Field google.iam.v1.Binding.members

role

Field google.iam.v1.Binding.role

class google.cloud.tasks_v2beta2.types.BindingDelta#

One delta entry for Binding. Each individual change (only one member in each entry) to a binding will be a separate entry.

action#

The action that was performed on a Binding. Required

role#

Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. Required

member#

A single identity requesting access for a Cloud Platform resource. Follows the same format of Binding.members. Required

condition#

Unimplemented. The condition that is associated with this binding. This field is logged only for Cloud Audit Logging.

action

Field google.iam.v1.BindingDelta.action

condition

Field google.iam.v1.BindingDelta.condition

member

Field google.iam.v1.BindingDelta.member

role

Field google.iam.v1.BindingDelta.role

class google.cloud.tasks_v2beta2.types.CancelLeaseRequest#

Request message for canceling a lease using [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

schedule_time#

Required. The task’s current schedule time, available in the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_tim e] returned by [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is to ensure that your worker currently holds the lease.

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

name

Field google.cloud.tasks.v2beta2.CancelLeaseRequest.name

response_view

Field google.cloud.tasks.v2beta2.CancelLeaseRequest.response_view

schedule_time

Field google.cloud.tasks.v2beta2.CancelLeaseRequest.schedule_time

class google.cloud.tasks_v2beta2.types.CreateQueueRequest#

Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue].

parent#

Required. The location name in which the queue will be created. For example: projects/PROJECT_ID/locations/LOCATION_ID The list of allowed locations can be obtained by calling Cloud Tasks’ implementation of [ListLocations][google.cloud.location.Locati ons.ListLocations].

queue#

Required. The queue to create. [Queue’s name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.

parent

Field google.cloud.tasks.v2beta2.CreateQueueRequest.parent

queue

Field google.cloud.tasks.v2beta2.CreateQueueRequest.queue

class google.cloud.tasks_v2beta2.types.CreateTaskRequest#

Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].

parent#

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID The queue must already exist.

task#

Required. The task to add. Task names have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUE UE_ID/tasks/TASK_ID. The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. If [schedul e_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task’s ID is identical to that of an existing task or a task that was deleted or completed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task’s queue was created using Cloud Tasks, then another task with the same name can’t be created for ~1hour after the original task was deleted or completed. If the task’s queue was created using queue.yaml or queue.xml, then another task with the same name can’t be created for ~9days after the original task was deleted or completed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently.

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

parent

Field google.cloud.tasks.v2beta2.CreateTaskRequest.parent

response_view

Field google.cloud.tasks.v2beta2.CreateTaskRequest.response_view

task

Field google.cloud.tasks.v2beta2.CreateTaskRequest.task

class google.cloud.tasks_v2beta2.types.DeleteQueueRequest#

Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].

name#

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

name

Field google.cloud.tasks.v2beta2.DeleteQueueRequest.name

class google.cloud.tasks_v2beta2.types.DeleteTaskRequest#

Request message for deleting a task using [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

name

Field google.cloud.tasks.v2beta2.DeleteTaskRequest.name

class google.cloud.tasks_v2beta2.types.Duration#
nanos#

Field google.protobuf.Duration.nanos

seconds#

Field google.protobuf.Duration.seconds

class google.cloud.tasks_v2beta2.types.Empty#
class google.cloud.tasks_v2beta2.types.Expr#
description#

Field google.type.Expr.description

expression#

Field google.type.Expr.expression

location#

Field google.type.Expr.location

title#

Field google.type.Expr.title

class google.cloud.tasks_v2beta2.types.FieldMask#
paths#

Field google.protobuf.FieldMask.paths

class google.cloud.tasks_v2beta2.types.GetIamPolicyRequest#

Request message for GetIamPolicy method.

resource#

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options#

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.

options

Field google.iam.v1.GetIamPolicyRequest.options

resource

Field google.iam.v1.GetIamPolicyRequest.resource

class google.cloud.tasks_v2beta2.types.GetPolicyOptions#

Encapsulates settings provided to GetIamPolicy.

requested_policy_version#

Optional. The policy format version to be returned. Acceptable values are 0 and 1. If the value is 0, or the field is omitted, policy format version 1 will be returned.

requested_policy_version

Field google.iam.v1.GetPolicyOptions.requested_policy_version

class google.cloud.tasks_v2beta2.types.GetQueueRequest#

Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue].

name#

Required. The resource name of the queue. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

name

Field google.cloud.tasks.v2beta2.GetQueueRequest.name

class google.cloud.tasks_v2beta2.types.GetTaskRequest#

Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

name

Field google.cloud.tasks.v2beta2.GetTaskRequest.name

response_view

Field google.cloud.tasks.v2beta2.GetTaskRequest.response_view

class google.cloud.tasks_v2beta2.types.LeaseTasksRequest#

Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].

parent#

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

max_tasks#

The maximum number of tasks to lease. The system will make a best effort to return as close to as max_tasks as possible. The largest that max_tasks can be is 1000.

lease_duration#

After the worker has successfully finished the work associated with the task, the worker must call via [AcknowledgeTask][goog le.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_tim e]. Otherwise the task will be returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that another worker can retry it. The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

filter#

filter can be used to specify a subset of tasks to lease. When filter is set to tag=<my-tag> then the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to <my-tag>. <my-tag> must be less than 500 characters. When filter is set to tag_function=oldest_tag(), only tasks which have the same tag as the task with the oldest [sch edule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. Grammar Syntax: - filter = "tag=" tag | "tag_function=" function - tag = string - function = "oldest_tag()" The oldest_tag() function returns tasks which have the same tag as the oldest task (ordered by schedule time). SDK compatibility: Although the SDK allows tags to be either string or bytes, only UTF-8 encoded tags can be used in Cloud Tasks. Tag which aren’t UTF-8 encoded can’t be used in the [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task’s [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.

filter

Field google.cloud.tasks.v2beta2.LeaseTasksRequest.filter

lease_duration

Field google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration

max_tasks

Field google.cloud.tasks.v2beta2.LeaseTasksRequest.max_tasks

parent

Field google.cloud.tasks.v2beta2.LeaseTasksRequest.parent

response_view

Field google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view

class google.cloud.tasks_v2beta2.types.LeaseTasksResponse#

Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].

tasks#

The leased tasks.

tasks

Field google.cloud.tasks.v2beta2.LeaseTasksResponse.tasks

class google.cloud.tasks_v2beta2.types.ListQueuesRequest#

Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].

parent#

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID

filter#

filter can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and several operators as supported. For example: <=, <, >=, >, !=, =, :. The filter syntax is the same as described in Stackdriver’s Advanced Logs Filters. Sample filter “app_engine_http_target: *”. Note that using filters might cause fewer queues than the requested_page size to be returned.

page_size#

Requested page size. The maximum page size is 9800. If unspecified, the page size will be the maximum. Fewer queues than requested might be returned, even if more queues exist; use the [next_page_token][google.cloud.tasks.v2beta2.ListQue uesResponse.next_page_token] in the response to determine if more queues exist.

page_token#

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 [ne xt_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse .next_page_token] returned from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It is an error to switch the value of the [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.

filter

Field google.cloud.tasks.v2beta2.ListQueuesRequest.filter

page_size

Field google.cloud.tasks.v2beta2.ListQueuesRequest.page_size

page_token

Field google.cloud.tasks.v2beta2.ListQueuesRequest.page_token

parent

Field google.cloud.tasks.v2beta2.ListQueuesRequest.parent

class google.cloud.tasks_v2beta2.types.ListQueuesResponse#

Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].

queues#

The list of queues.

next_page_token#

A token to retrieve next page of results. To return the next page of results, call [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the [page_token][google.cloud.tasks.v2beta 2.ListQueuesRequest.page_token]. If the next_page_token is empty, there are no more results. The page token is valid for only 2 hours.

next_page_token

Field google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token

queues

Field google.cloud.tasks.v2beta2.ListQueuesResponse.queues

class google.cloud.tasks_v2beta2.types.ListTasksRequest#

Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].

parent#

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

page_size#

Requested page size. Fewer tasks than requested might be returned. The maximum page size is 1000. If unspecified, the page size will be the maximum. Fewer tasks than requested might be returned, even if more tasks exist; use [next_page_ token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page _token] in the response to determine if more tasks exist.

page_token#

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 [ne xt_page_token][google.cloud.tasks.v2beta2.ListTasksResponse. next_page_token] returned from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. The page token is valid for only 2 hours.

page_size

Field google.cloud.tasks.v2beta2.ListTasksRequest.page_size

page_token

Field google.cloud.tasks.v2beta2.ListTasksRequest.page_token

parent

Field google.cloud.tasks.v2beta2.ListTasksRequest.parent

response_view

Field google.cloud.tasks.v2beta2.ListTasksRequest.response_view

class google.cloud.tasks_v2beta2.types.ListTasksResponse#

Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].

tasks#

The list of tasks.

next_page_token#

A token to retrieve next page of results. To return the next page of results, call [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the [page_token][google.cloud.tasks.v2beta 2.ListTasksRequest.page_token]. If the next_page_token is empty, there are no more results.

next_page_token

Field google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token

tasks

Field google.cloud.tasks.v2beta2.ListTasksResponse.tasks

class google.cloud.tasks_v2beta2.types.PauseQueueRequest#

Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue].

name#

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

name

Field google.cloud.tasks.v2beta2.PauseQueueRequest.name

class google.cloud.tasks_v2beta2.types.Policy#

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.

A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.

JSON Example

{
  "bindings": [
    {
      "role": "roles/owner",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.com",
        "serviceAccount:my-other-app@appspot.gserviceaccount.com"
      ]
    },
    {
      "role": "roles/viewer",
      "members": ["user:sean@example.com"]
    }
  ]
}

YAML Example

bindings:
- members:
  - user:mike@example.com
  - group:admins@example.com
  - domain:google.com
  - serviceAccount:my-other-app@appspot.gserviceaccount.com
  role: roles/owner
- members:
  - user:sean@example.com
  role: roles/viewer

For a description of IAM and its features, see the IAM developer’s guide.

version#

Deprecated.

bindings#

Associates a list of members to a role. bindings with no members will result in an error.

etag#

etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.

bindings

Field google.iam.v1.Policy.bindings

etag

Field google.iam.v1.Policy.etag

version

Field google.iam.v1.Policy.version

class google.cloud.tasks_v2beta2.types.PolicyDelta#

The difference delta between two policies.

binding_deltas#

The delta for Bindings between two policies.

audit_config_deltas#

The delta for AuditConfigs between two policies.

audit_config_deltas

Field google.iam.v1.PolicyDelta.audit_config_deltas

binding_deltas

Field google.iam.v1.PolicyDelta.binding_deltas

class google.cloud.tasks_v2beta2.types.PullMessage#

The pull message contains data that can be used by the caller of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task.

This proto can only be used for tasks in a queue which has [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.

payload#

A data payload consumed by the worker to execute the task.

tag#

The task’s tag. Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID. The task’s tag can only be set when the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. The tag must be less than 500 characters. SDK compatibility: Although the SDK allows tags to be either string or bytes, only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn’t UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.

payload

Field google.cloud.tasks.v2beta2.PullMessage.payload

tag

Field google.cloud.tasks.v2beta2.PullMessage.tag

class google.cloud.tasks_v2beta2.types.PullTarget#

Pull target.

class google.cloud.tasks_v2beta2.types.PurgeQueueRequest#

Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue].

name#

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

name

Field google.cloud.tasks.v2beta2.PurgeQueueRequest.name

class google.cloud.tasks_v2beta2.types.Queue#

A queue is a container of related tasks. Queues are configured to manage how those tasks are dispatched. Configurable properties include rate limits, retry options, target types, and others.

name#

Caller-specified and required in [CreateQueue][google.cloud.ta sks.v2beta2.CloudTasks.CreateQueue], after which it becomes output only. The queue name. The queue name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID - PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects - LOCATION_ID is the canonical ID for the queue’s location. The list of available locations can be obtained by calling [ListLocatio ns][google.cloud.location.Locations.ListLocations]. For more information, see https://cloud.google.com/about/locations/. - QUEUE_ID can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.

target_type#

Caller-specified and required in [CreateQueue][google.cloud.ta sks.v2beta2.CloudTasks.CreateQueue][], after which the queue config type becomes output only, though fields within the config are mutable. The queue’s target. The target applies to all tasks in the queue.

app_engine_http_target#

App Engine HTTP target. An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEng ineHttpTarget].

pull_target#

Pull target. A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].

rate_limits#

Rate limits for task dispatches. [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta2.Queue.retry_co nfig] are related because they both control task attempts however they control how tasks are attempted in different ways: - [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of dispatches from a queue (i.e. all traffic dispatched from the queue, regardless of whether the dispatch is from a first attempt or a retry). - [retry _config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to particular a task after its first attempt fails. That is, [retry_config][google.cloud.tas ks.v2beta2.Queue.retry_config] controls task retries (the second attempt, third attempt, etc).

retry_config#

Settings that determine the retry behavior. - For tasks created using Cloud Tasks: the queue-level retry settings apply to all tasks in the queue that were created using Cloud Tasks. Retry settings cannot be set on individual tasks. - For tasks created using the App Engine SDK: the queue-level retry settings apply to all tasks in the queue which do not have retry settings explicitly set on the task and were created by the App Engine SDK. See App Engine documentation.

state#

Output only. The state of the queue. state can only be changed by called [PauseQueue][google.cloud.tasks.v2beta2.Clou dTasks.PauseQueue], [ResumeQueue][google.cloud.tasks.v2beta2.C loudTasks.ResumeQueue], or uploading queue.yaml/xml. [U pdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change state.

purge_time#

Output only. The last time this queue was purged. All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time were purged. A queue can be purged using [PurgeQueu e][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the App Engine Task Queue SDK, or the Cloud Console. Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged.

app_engine_http_target

Field google.cloud.tasks.v2beta2.Queue.app_engine_http_target

name

Field google.cloud.tasks.v2beta2.Queue.name

pull_target

Field google.cloud.tasks.v2beta2.Queue.pull_target

purge_time

Field google.cloud.tasks.v2beta2.Queue.purge_time

rate_limits

Field google.cloud.tasks.v2beta2.Queue.rate_limits

retry_config

Field google.cloud.tasks.v2beta2.Queue.retry_config

state

Field google.cloud.tasks.v2beta2.Queue.state

class google.cloud.tasks_v2beta2.types.RateLimits#

Rate limits.

This message determines the maximum rate that tasks can be dispatched by a queue, regardless of whether the dispatch is a first task attempt or a retry.

Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits].

max_tasks_dispatched_per_second#

The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default. - For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum allowed value is 500. - This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the max_tasks_dispatched_per_second limit, a maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are allowed per pull queue. This field has the same meaning as rate in queue.yaml/xml.

max_burst_size#

Output only. The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. The token bucket algorithm is used to control the rate of task dispatches. Each queue has a token bucket that holds tokens, up to the maximum specified by max_burst_size. Each time a task is dispatched, a token is removed from the bucket. Tasks will be dispatched until the queue’s bucket runs out of tokens. The bucket will be continuously refilled with new tokens based on [max_tasks_di spatched_per_second][google.cloud.tasks.v2beta2.RateLimits.m ax_tasks_dispatched_per_second]. Cloud Tasks will pick the value of max_burst_size based on the value of [max_ta sks_dispatched_per_second][google.cloud.tasks.v2beta2.RateL imits.max_tasks_dispatched_per_second]. For App Engine queues that were created or updated using queue.yaml/xml, max_burst_size is equal to bucket_size. Since max_burst_size is output only, if [Update Queue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue created by queue.yaml/xml, max_burst_size will be reset based on the value of [max_t asks_dispatched_per_second][google.cloud.tasks.v2beta2.Rate Limits.max_tasks_dispatched_per_second], regardless of whether [max_tasks_dispatched_per_second][google.cloud.tas ks.v2beta2.RateLimits.max_tasks_dispatched_per_second] is updated.

max_concurrent_tasks#

The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the number of concurrent requests decreases. If unspecified when the queue is created, Cloud Tasks will pick the default. The maximum allowed value is 5,000. This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which indicates no limit. No other queue types can have max_concurrent_tasks set to -1. This field has the same meaning as max_concurrent_requests in queue.yaml/xml.

max_burst_size

Field google.cloud.tasks.v2beta2.RateLimits.max_burst_size

max_concurrent_tasks

Field google.cloud.tasks.v2beta2.RateLimits.max_concurrent_tasks

max_tasks_dispatched_per_second

Field google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second

class google.cloud.tasks_v2beta2.types.RenewLeaseRequest#

Request message for renewing a lease using [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

schedule_time#

Required. The task’s current schedule time, available in the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_tim e] returned by [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is to ensure that your worker currently holds the lease.

lease_duration#

Required. The desired new lease duration, starting from now. The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

lease_duration

Field google.cloud.tasks.v2beta2.RenewLeaseRequest.lease_duration

name

Field google.cloud.tasks.v2beta2.RenewLeaseRequest.name

response_view

Field google.cloud.tasks.v2beta2.RenewLeaseRequest.response_view

schedule_time

Field google.cloud.tasks.v2beta2.RenewLeaseRequest.schedule_time

class google.cloud.tasks_v2beta2.types.ResumeQueueRequest#

Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue].

name#

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

name

Field google.cloud.tasks.v2beta2.ResumeQueueRequest.name

class google.cloud.tasks_v2beta2.types.RetryConfig#

Retry config.

These settings determine how a failed task attempt is retried.

num_attempts#

Number of attempts per task. If unspecified when the queue is created, Cloud Tasks will pick the default. This field has the same meaning as task_retry_limit in queue.yaml/xml.

max_attempts#

The maximum number of attempts for a task. Cloud Tasks will attempt the task max_attempts times (that is, if the first attempt fails, then there will be max_attempts - 1 retries). Must be > 0.

unlimited_attempts#

If true, then the number of attempts is unlimited.

max_retry_duration#

If positive, max_retry_duration specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once max_retry_duration time has passed and the task has been attempted [max_attempts][google.cloud .tasks.v2beta2.RetryConfig.max_attempts] times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default. This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. max_retry_duration will be truncated to the nearest second. This field has the same meaning as task_age_limit in queue.yaml/xml.

min_backoff#

A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between [min_backoff][google.cloud.tasks.v2beta2.Re tryConfig.min_backoff] and [max_backoff][google.cloud.tasks. v2beta2.RetryConfig.max_backoff] duration after it fails, if the queue’s [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. min_backoff will be truncated to the nearest second. This field has the same meaning as min_backoff_seconds in queue.yaml/xml.

max_backoff#

A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between [min_backoff][google.cloud.tasks.v2beta2.Re tryConfig.min_backoff] and [max_backoff][google.cloud.tasks. v2beta2.RetryConfig.max_backoff] duration after it fails, if the queue’s [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. max_backoff will be truncated to the nearest second. This field has the same meaning as max_backoff_seconds in queue.yaml/xml.

max_doublings#

The time between retries will double max_doublings times. A task’s retry interval starts at [min_backoff][google.cloud. tasks.v2beta2.RetryConfig.min_backoff], then doubles max_doublings times, then increases linearly, and finally retries retries at intervals of [max_backoff][google.cloud.ta sks.v2beta2.RetryConfig.max_backoff] up to [max_attempts][go ogle.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. For example, if [min_backoff][google.cloud.tasks.v2beta2.Retr yConfig.min_backoff] is 10s, [max_backoff][google.cloud.task s.v2beta2.RetryConfig.max_backoff] is 300s, and max_doublings is 3, then the a task will first be retried in 10s. The retry interval will double three times, and then increase linearly by 2^3 * 10s. Finally, the task will retry at intervals of [max_backoff][google.cloud.tasks.v2beta2.Retr yConfig.max_backoff] until the task has been attempted [max_ attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts ] times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, …. If unspecified when the queue is created, Cloud Tasks will pick the default. This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. This field has the same meaning as max_doublings in queue.yaml/xml.

max_attempts

Field google.cloud.tasks.v2beta2.RetryConfig.max_attempts

max_backoff

Field google.cloud.tasks.v2beta2.RetryConfig.max_backoff

max_doublings

Field google.cloud.tasks.v2beta2.RetryConfig.max_doublings

max_retry_duration

Field google.cloud.tasks.v2beta2.RetryConfig.max_retry_duration

min_backoff

Field google.cloud.tasks.v2beta2.RetryConfig.min_backoff

unlimited_attempts

Field google.cloud.tasks.v2beta2.RetryConfig.unlimited_attempts

class google.cloud.tasks_v2beta2.types.RunTaskRequest#

Request message for forcing a task to run now using [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask].

name#

Required. The task name. For example: projects/PROJECT_ID/l ocations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

response_view#

The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be returned. By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.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][google.cloud.tasks.v2beta2.Task.View.FULL] requires cloudtasks.tasks.fullView Google IAM permission on the [Task][google.cloud.tasks.v2beta2.Task] resource.

name

Field google.cloud.tasks.v2beta2.RunTaskRequest.name

response_view

Field google.cloud.tasks.v2beta2.RunTaskRequest.response_view

class google.cloud.tasks_v2beta2.types.SetIamPolicyRequest#

Request message for SetIamPolicy method.

resource#

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy#

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

policy

Field google.iam.v1.SetIamPolicyRequest.policy

resource

Field google.iam.v1.SetIamPolicyRequest.resource

class google.cloud.tasks_v2beta2.types.Status#
code#

Field google.rpc.Status.code

details#

Field google.rpc.Status.details

message#

Field google.rpc.Status.message

class google.cloud.tasks_v2beta2.types.Task#

A unit of scheduled work.

name#

Optionally caller-specified in [CreateTask][google.cloud.tasks .v2beta2.CloudTasks.CreateTask]. The task name. The task name must have the following format: projects/PROJECT_ID/loc ations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID - PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects - LOCATION_ID is the canonical ID for the task’s location. The list of available locations can be obtained by calling [ListLocatio ns][google.cloud.location.Locations.ListLocations]. For more information, see https://cloud.google.com/about/locations/. - QUEUE_ID can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. - TASK_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.

payload_type#

Required. The task’s payload is used by the task’s target to process the task. A payload is valid only if it is compatible with the queue’s target.

app_engine_http_request#

App Engine HTTP request that is sent to the task’s target. Can be set only if [app_engine_http_target][google.cloud.tasks. v2beta2.Queue.app_engine_http_target] is set on the queue. An App Engine task is a task that has [AppEngineHttpRequest][g oogle.cloud.tasks.v2beta2.AppEngineHttpRequest] set.

pull_message#

[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue. A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.

schedule_time#

The time when the task is scheduled to be attempted. For App Engine queues, this is when the task will be attempted or retried. For pull queues, this is the time when the task is available to be leased; if a task is currently leased, this is the time when the current lease expires, that is, the time that the task was leased plus the [lease_duration][google.clo ud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. schedule_time will be truncated to the nearest microsecond.

create_time#

Output only. The time that the task was created. create_time will be truncated to the nearest second.

status#

Output only. The task status.

view#

Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has been returned.

app_engine_http_request

Field google.cloud.tasks.v2beta2.Task.app_engine_http_request

create_time

Field google.cloud.tasks.v2beta2.Task.create_time

name

Field google.cloud.tasks.v2beta2.Task.name

pull_message

Field google.cloud.tasks.v2beta2.Task.pull_message

schedule_time

Field google.cloud.tasks.v2beta2.Task.schedule_time

status

Field google.cloud.tasks.v2beta2.Task.status

view

Field google.cloud.tasks.v2beta2.Task.view

class google.cloud.tasks_v2beta2.types.TaskStatus#

Status of the task.

attempt_dispatch_count#

Output only. The number of attempts dispatched. This count includes tasks which have been dispatched but haven’t received a response.

attempt_response_count#

Output only. The number of attempts which have received a response. This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].

first_attempt_status#

Output only. The status of the task’s first attempt. Only [di spatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatc h_time] will be set. The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].

last_attempt_status#

Output only. The status of the task’s last attempt. This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].

attempt_dispatch_count

Field google.cloud.tasks.v2beta2.TaskStatus.attempt_dispatch_count

attempt_response_count

Field google.cloud.tasks.v2beta2.TaskStatus.attempt_response_count

first_attempt_status

Field google.cloud.tasks.v2beta2.TaskStatus.first_attempt_status

last_attempt_status

Field google.cloud.tasks.v2beta2.TaskStatus.last_attempt_status

class google.cloud.tasks_v2beta2.types.TestIamPermissionsRequest#

Request message for TestIamPermissions method.

resource#

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions#

The set of permissions to check for the resource. Permissions with wildcards (such as ‘*’ or ’storage.*’) are not allowed. For more information see IAM Overview.

permissions

Field google.iam.v1.TestIamPermissionsRequest.permissions

resource

Field google.iam.v1.TestIamPermissionsRequest.resource

class google.cloud.tasks_v2beta2.types.TestIamPermissionsResponse#

Response message for TestIamPermissions method.

permissions#

A subset of TestPermissionsRequest.permissions that the caller is allowed.

permissions

Field google.iam.v1.TestIamPermissionsResponse.permissions

class google.cloud.tasks_v2beta2.types.Timestamp#
nanos#

Field google.protobuf.Timestamp.nanos

seconds#

Field google.protobuf.Timestamp.seconds

class google.cloud.tasks_v2beta2.types.UpdateQueueRequest#

Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue].

queue#

Required. The queue to create or update. The queue’s [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. Output only fields cannot be modified using UpdateQueue. Any value specified for an output only field will be ignored. The queue’s [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.

update_mask#

A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated.

queue

Field google.cloud.tasks.v2beta2.UpdateQueueRequest.queue

update_mask

Field google.cloud.tasks.v2beta2.UpdateQueueRequest.update_mask