- 2.80.0 (latest)
- 2.78.0
- 2.76.0
- 2.75.0
- 2.74.0
- 2.73.0
- 2.72.0
- 2.70.0
- 2.68.0
- 2.67.0
- 2.64.0
- 2.63.0
- 2.62.0
- 2.60.0
- 2.59.0
- 2.58.0
- 2.57.0
- 2.56.0
- 2.55.0
- 2.54.0
- 2.53.0
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.12
- 2.2.0
- 2.1.11
A client to Cloud Tasks API
The interfaces provided are listed below, along with usage samples.
CloudTasksClient
Service Description: Cloud Tasks allows developers to manage the execution of background work in their applications.
Sample for CloudTasksClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
Queue response = cloudTasksClient.getQueue(name);
}
Classes
AppEngineHttpRequest
App Engine HTTP request.
The message defines the HTTP request that is sent to an App Engine app when
the task is dispatched.
Using AppEngineHttpRequest
requires
appengine.applications.get
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.
Traffic is encrypted during transport and never leaves Google datacenters.
Because this traffic is carried over a communication mechanism 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.
The AppEngineRouting used to
construct the URL that the task is delivered to can be set at the queue-level
or task-level:
- If app_engine_routing_override is set on the
queue, this value is used for all
tasks in the queue, no matter what the setting is for the task-level
app_engine_routing.
The
urlthat the task will be sent to is: url =host+relative_uri Tasks can be dispatched to secure app handlers, unsecure app handlers, and URIs restricted withlogin: admin. Because tasks are not run as any user, they cannot be dispatched to URIs restricted withlogin: requiredTask dispatches also do not follow redirects. The task attempt has succeeded if the app's request handler returns an HTTP response code in the range [200-299]. The task attempt has failed if the app's handler returns a non-2xx response code or Cloud Tasks does not receive response before the deadline. Failed tasks will be retried according to the retry configuration.503(Service Unavailable) is considered an App Engine system error instead of an application error and will cause Cloud Tasks' traffic congestion 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 congestion control to throttle the queue.
Protobuf type google.cloud.tasks.v2.AppEngineHttpRequest
AppEngineHttpRequest.Builder
App Engine HTTP request.
The message defines the HTTP request that is sent to an App Engine app when
the task is dispatched.
Using AppEngineHttpRequest
requires
appengine.applications.get
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.
Traffic is encrypted during transport and never leaves Google datacenters.
Because this traffic is carried over a communication mechanism 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.
The AppEngineRouting used to
construct the URL that the task is delivered to can be set at the queue-level
or task-level:
- If app_engine_routing_override is set on the
queue, this value is used for all
tasks in the queue, no matter what the setting is for the task-level
app_engine_routing.
The
urlthat the task will be sent to is: url =host+relative_uri Tasks can be dispatched to secure app handlers, unsecure app handlers, and URIs restricted withlogin: admin. Because tasks are not run as any user, they cannot be dispatched to URIs restricted withlogin: requiredTask dispatches also do not follow redirects. The task attempt has succeeded if the app's request handler returns an HTTP response code in the range [200-299]. The task attempt has failed if the app's handler returns a non-2xx response code or Cloud Tasks does not receive response before the deadline. Failed tasks will be retried according to the retry configuration.503(Service Unavailable) is considered an App Engine system error instead of an application error and will cause Cloud Tasks' traffic congestion 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 congestion control to throttle the queue.
Protobuf type google.cloud.tasks.v2.AppEngineHttpRequest
AppEngineRouting
App Engine Routing.
Defines routing characteristics specific to App Engine - service, version,
and instance.
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.
Using AppEngineRouting requires
appengine.applications.get
Google IAM permission for the project
and the following scope:
https://www.googleapis.com/auth/cloud-platform
Protobuf type google.cloud.tasks.v2.AppEngineRouting
AppEngineRouting.Builder
App Engine Routing.
Defines routing characteristics specific to App Engine - service, version,
and instance.
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.
Using AppEngineRouting requires
appengine.applications.get
Google IAM permission for the project
and the following scope:
https://www.googleapis.com/auth/cloud-platform
Protobuf type google.cloud.tasks.v2.AppEngineRouting