Skip to content

Commit 4693aa8

Browse files
yoshi-automationJustinBeckwith
authored andcommitted
feat: switch to cloudtasks.googleapis.com default host (#268)
1 parent 53450bb commit 4693aa8

27 files changed

+1639
-1712
lines changed

packages/google-cloud-tasks/protos/google/cloud/tasks/v2/cloudtasks.proto

+111-61
Large diffs are not rendered by default.

packages/google-cloud-tasks/protos/google/cloud/tasks/v2/queue.proto

+8-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ syntax = "proto3";
1717

1818
package google.cloud.tasks.v2;
1919

20-
import "google/api/annotations.proto";
2120
import "google/api/resource.proto";
2221
import "google/cloud/tasks/v2/target.proto";
2322
import "google/protobuf/duration.proto";
2423
import "google/protobuf/timestamp.proto";
24+
import "google/api/annotations.proto";
2525

2626
option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
2727
option java_multiple_files = true;
@@ -32,6 +32,11 @@ option java_package = "com.google.cloud.tasks.v2";
3232
// how those tasks are dispatched. Configurable properties include rate limits,
3333
// retry options, queue types, and others.
3434
message Queue {
35+
option (google.api.resource) = {
36+
type: "cloudtasks.googleapis.com/Queue"
37+
pattern: "projects/{project}/locations/{location}/queues/{queue}"
38+
};
39+
3540
// State of the queue.
3641
enum State {
3742
// Unspecified state.
@@ -175,8 +180,7 @@ message RateLimits {
175180
// If unspecified when the queue is created, Cloud Tasks will pick the
176181
// default.
177182
//
178-
// * For [App Engine queues][google.cloud.tasks.v2.AppEngineHttpQueue], the maximum allowed value
179-
// is 500.
183+
// * The maximum allowed value is 500.
180184
//
181185
//
182186
// This field has the same meaning as
@@ -205,7 +209,7 @@ message RateLimits {
205209
// value of
206210
// [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second].
207211
//
208-
// For App Engine queues that were created or updated using
212+
// For queues that were created or updated using
209213
// `queue.yaml/xml`, `max_burst_size` is equal to
210214
// [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
211215
// Since `max_burst_size` is output only, if

packages/google-cloud-tasks/protos/google/cloud/tasks/v2/target.proto

+16-10
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ option java_package = "com.google.cloud.tasks.v2";
5252
// The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is
5353
// delivered to can be set at the queue-level or task-level:
5454
//
55-
// * If set,
56-
// [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override]
57-
// is used for all tasks in the queue, no matter what the setting
58-
// is for the
59-
// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
55+
// * If [app_engine_routing_override is set on the
56+
// queue][Queue.app_engine_routing_override], this value is used for all
57+
// tasks in the queue, no matter what the setting is for the [task-level
58+
// app_engine_routing][AppEngineHttpRequest.app_engine_routing].
6059
//
6160
//
6261
// The `url` that the task will be sent to is:
@@ -79,7 +78,7 @@ option java_package = "com.google.cloud.tasks.v2";
7978
// the app's handler returns a non-2xx response code or Cloud Tasks does
8079
// not receive response before the [deadline][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed
8180
// tasks will be retried according to the
82-
// [retry configuration][Queue.RetryConfig]. `503` (Service Unavailable) is
81+
// [retry configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service Unavailable) is
8382
// considered an App Engine system error instead of an application error and
8483
// will cause Cloud Tasks' traffic congestion control to temporarily throttle
8584
// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many
@@ -101,10 +100,10 @@ message AppEngineHttpRequest {
101100

102101
// Task-level setting for App Engine routing.
103102
//
104-
// If set,
105-
// [app_engine_routing_override][google.cloud.tasks.v2.AppEngineHttpQueue.app_engine_routing_override]
106-
// is used for all tasks in the queue, no matter what the setting is for the
107-
// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
103+
// * If [app_engine_routing_override is set on the
104+
// queue][Queue.app_engine_routing_override], this value is used for all
105+
// tasks in the queue, no matter what the setting is for the [task-level
106+
// app_engine_routing][AppEngineHttpRequest.app_engine_routing].
108107
AppEngineRouting app_engine_routing = 2;
109108

110109
// The relative URI.
@@ -180,6 +179,13 @@ message AppEngineHttpRequest {
180179
// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
181180
// and [App Engine Flex request
182181
// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
182+
//
183+
// Using [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] requires
184+
// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
185+
// Google IAM permission for the project
186+
// and the following scope:
187+
//
188+
// `https://www.googleapis.com/auth/cloud-platform`
183189
message AppEngineRouting {
184190
// App service.
185191
//

packages/google-cloud-tasks/protos/google/cloud/tasks/v2/task.proto

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ syntax = "proto3";
1717

1818
package google.cloud.tasks.v2;
1919

20-
import "google/api/annotations.proto";
2120
import "google/api/resource.proto";
2221
import "google/cloud/tasks/v2/target.proto";
2322
import "google/protobuf/duration.proto";
2423
import "google/protobuf/timestamp.proto";
2524
import "google/rpc/status.proto";
25+
import "google/api/annotations.proto";
2626

2727
option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
2828
option java_multiple_files = true;
@@ -31,6 +31,11 @@ option java_package = "com.google.cloud.tasks.v2";
3131

3232
// A unit of scheduled work.
3333
message Task {
34+
option (google.api.resource) = {
35+
type: "cloudtasks.googleapis.com/Task"
36+
pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}"
37+
};
38+
3439
// The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data.
3540
//
3641
// When a task is returned in a response, not all
@@ -90,9 +95,7 @@ message Task {
9095
AppEngineHttpRequest app_engine_http_request = 2;
9196
}
9297

93-
// The time when the task is scheduled to be attempted.
94-
//
95-
// For App Engine queues, this is when the task will be attempted or retried.
98+
// The time when the task is scheduled to be attempted or retried.
9699
//
97100
// `schedule_time` will be truncated to the nearest microsecond.
98101
google.protobuf.Timestamp schedule_time = 4;

0 commit comments

Comments
 (0)