google-cloud-tasks-v2 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/tasks/v2/bindings_override.rb +102 -0
- data/lib/google/cloud/tasks/v2/cloud_tasks/client.rb +108 -87
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb +116 -87
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb +1 -0
- data/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +33 -29
- data/lib/google/cloud/tasks/v2/rest.rb +1 -0
- data/lib/google/cloud/tasks/v2/version.rb +1 -1
- data/proto_docs/google/cloud/tasks/v2/cloudtasks.rb +74 -60
- data/proto_docs/google/cloud/tasks/v2/queue.rb +3 -3
- data/proto_docs/google/cloud/tasks/v2/target.rb +12 -13
- data/proto_docs/google/cloud/tasks/v2/task.rb +3 -3
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- metadata +23 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/tasks/v2/cloudtasks_pb"
|
21
21
|
require "google/cloud/tasks/v2/cloud_tasks/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -67,61 +68,61 @@ module Google
|
|
67
68
|
end
|
68
69
|
default_config = Client::Configuration.new parent_config
|
69
70
|
|
70
|
-
default_config.rpcs.list_queues.timeout =
|
71
|
+
default_config.rpcs.list_queues.timeout = 20.0
|
71
72
|
default_config.rpcs.list_queues.retry_policy = {
|
72
73
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
73
74
|
}
|
74
75
|
|
75
|
-
default_config.rpcs.get_queue.timeout =
|
76
|
+
default_config.rpcs.get_queue.timeout = 20.0
|
76
77
|
default_config.rpcs.get_queue.retry_policy = {
|
77
78
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
78
79
|
}
|
79
80
|
|
80
|
-
default_config.rpcs.create_queue.timeout =
|
81
|
+
default_config.rpcs.create_queue.timeout = 20.0
|
81
82
|
|
82
|
-
default_config.rpcs.update_queue.timeout =
|
83
|
+
default_config.rpcs.update_queue.timeout = 20.0
|
83
84
|
|
84
|
-
default_config.rpcs.delete_queue.timeout =
|
85
|
+
default_config.rpcs.delete_queue.timeout = 20.0
|
85
86
|
default_config.rpcs.delete_queue.retry_policy = {
|
86
87
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
87
88
|
}
|
88
89
|
|
89
|
-
default_config.rpcs.purge_queue.timeout =
|
90
|
+
default_config.rpcs.purge_queue.timeout = 20.0
|
90
91
|
|
91
|
-
default_config.rpcs.pause_queue.timeout =
|
92
|
+
default_config.rpcs.pause_queue.timeout = 20.0
|
92
93
|
|
93
|
-
default_config.rpcs.resume_queue.timeout =
|
94
|
+
default_config.rpcs.resume_queue.timeout = 20.0
|
94
95
|
|
95
|
-
default_config.rpcs.get_iam_policy.timeout =
|
96
|
+
default_config.rpcs.get_iam_policy.timeout = 20.0
|
96
97
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
97
98
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
98
99
|
}
|
99
100
|
|
100
|
-
default_config.rpcs.set_iam_policy.timeout =
|
101
|
+
default_config.rpcs.set_iam_policy.timeout = 20.0
|
101
102
|
|
102
|
-
default_config.rpcs.test_iam_permissions.timeout =
|
103
|
+
default_config.rpcs.test_iam_permissions.timeout = 20.0
|
103
104
|
default_config.rpcs.test_iam_permissions.retry_policy = {
|
104
105
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
105
106
|
}
|
106
107
|
|
107
|
-
default_config.rpcs.list_tasks.timeout =
|
108
|
+
default_config.rpcs.list_tasks.timeout = 20.0
|
108
109
|
default_config.rpcs.list_tasks.retry_policy = {
|
109
110
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
110
111
|
}
|
111
112
|
|
112
|
-
default_config.rpcs.get_task.timeout =
|
113
|
+
default_config.rpcs.get_task.timeout = 20.0
|
113
114
|
default_config.rpcs.get_task.retry_policy = {
|
114
115
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
115
116
|
}
|
116
117
|
|
117
|
-
default_config.rpcs.create_task.timeout =
|
118
|
+
default_config.rpcs.create_task.timeout = 20.0
|
118
119
|
|
119
|
-
default_config.rpcs.delete_task.timeout =
|
120
|
+
default_config.rpcs.delete_task.timeout = 20.0
|
120
121
|
default_config.rpcs.delete_task.retry_policy = {
|
121
122
|
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
122
123
|
}
|
123
124
|
|
124
|
-
default_config.rpcs.run_task.timeout =
|
125
|
+
default_config.rpcs.run_task.timeout = 20.0
|
125
126
|
|
126
127
|
default_config
|
127
128
|
end
|
@@ -187,9 +188,23 @@ module Google
|
|
187
188
|
@quota_project_id = @config.quota_project
|
188
189
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
189
190
|
|
191
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
192
|
+
config.credentials = credentials
|
193
|
+
config.quota_project = @quota_project_id
|
194
|
+
config.endpoint = @config.endpoint
|
195
|
+
config.bindings_override = @config.bindings_override
|
196
|
+
end
|
197
|
+
|
190
198
|
@cloud_tasks_stub = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
191
199
|
end
|
192
200
|
|
201
|
+
##
|
202
|
+
# Get the associated client for mix-in of the Locations.
|
203
|
+
#
|
204
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
205
|
+
#
|
206
|
+
attr_reader :location_client
|
207
|
+
|
193
208
|
# Service calls
|
194
209
|
|
195
210
|
##
|
@@ -216,11 +231,10 @@ module Google
|
|
216
231
|
# Required. The location name.
|
217
232
|
# For example: `projects/PROJECT_ID/locations/LOCATION_ID`
|
218
233
|
# @param filter [::String]
|
219
|
-
# `filter` can be used to specify a subset of queues. Any
|
220
|
-
# field can be used as a filter and
|
221
|
-
# For example: `<=, <, >=, >, !=, =, :`. The
|
222
|
-
# described in
|
223
|
-
# [Stackdriver's Advanced Logs
|
234
|
+
# `filter` can be used to specify a subset of queues. Any
|
235
|
+
# {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and
|
236
|
+
# several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
|
237
|
+
# filter syntax is the same as described in [Stackdriver's Advanced Logs
|
224
238
|
# Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
|
225
239
|
#
|
226
240
|
# Sample filter "state: PAUSED".
|
@@ -233,17 +247,19 @@ module Google
|
|
233
247
|
# The maximum page size is 9800. If unspecified, the page size will
|
234
248
|
# be the maximum. Fewer queues than requested might be returned,
|
235
249
|
# even if more queues exist; use the
|
236
|
-
# {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
|
237
|
-
# response to determine if more queues exist.
|
250
|
+
# {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
|
251
|
+
# in the response to determine if more queues exist.
|
238
252
|
# @param page_token [::String]
|
239
253
|
# A token identifying the page of results to return.
|
240
254
|
#
|
241
255
|
# To request the first page results, page_token must be empty. To
|
242
256
|
# request the next page of results, page_token must be the value of
|
243
|
-
# {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
|
244
|
-
# from the previous call to
|
245
|
-
# method. It is an
|
246
|
-
#
|
257
|
+
# {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
|
258
|
+
# returned from the previous call to
|
259
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_queues ListQueues} method. It is an
|
260
|
+
# error to switch the value of the
|
261
|
+
# {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating
|
262
|
+
# through pages.
|
247
263
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
248
264
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>]
|
249
265
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -354,8 +370,8 @@ module Google
|
|
354
370
|
# Creates a queue.
|
355
371
|
#
|
356
372
|
# Queues created with this method allow tasks to live for a maximum of 31
|
357
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
358
|
-
# it was dispatched or not.
|
373
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
374
|
+
# whether it was dispatched or not.
|
359
375
|
#
|
360
376
|
# WARNING: Using this method may have unintended side effects if you are
|
361
377
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
@@ -385,11 +401,12 @@ module Google
|
|
385
401
|
#
|
386
402
|
# The list of allowed locations can be obtained by calling Cloud
|
387
403
|
# Tasks' implementation of
|
388
|
-
#
|
404
|
+
# `::Google::Cloud::Location::Locations::Rest::Client#list_locations`.
|
389
405
|
# @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash]
|
390
406
|
# Required. The queue to create.
|
391
407
|
#
|
392
|
-
# [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
|
408
|
+
# [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
|
409
|
+
# existing queue.
|
393
410
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
394
411
|
# @yieldparam result [::Google::Cloud::Tasks::V2::Queue]
|
395
412
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -439,8 +456,8 @@ module Google
|
|
439
456
|
# the queue if it does exist.
|
440
457
|
#
|
441
458
|
# Queues created with this method allow tasks to live for a maximum of 31
|
442
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
443
|
-
# it was dispatched or not.
|
459
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
460
|
+
# whether it was dispatched or not.
|
444
461
|
#
|
445
462
|
# WARNING: Using this method may have unintended side effects if you are
|
446
463
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
@@ -666,9 +683,10 @@ module Google
|
|
666
683
|
#
|
667
684
|
# If a queue is paused then the system will stop dispatching tasks
|
668
685
|
# until the queue is resumed via
|
669
|
-
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can
|
670
|
-
# when the queue is paused. A queue is paused if its
|
671
|
-
# {::Google::Cloud::Tasks::V2::Queue#state state} is
|
686
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can
|
687
|
+
# still be added when the queue is paused. A queue is paused if its
|
688
|
+
# {::Google::Cloud::Tasks::V2::Queue#state state} is
|
689
|
+
# {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
|
672
690
|
#
|
673
691
|
# @overload pause_queue(request, options = nil)
|
674
692
|
# Pass arguments to `pause_queue` via a request object, either of type
|
@@ -735,9 +753,10 @@ module Google
|
|
735
753
|
#
|
736
754
|
# This method resumes a queue after it has been
|
737
755
|
# {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or
|
738
|
-
# {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a
|
739
|
-
# in the queue's {::Google::Cloud::Tasks::V2::Queue#state state};
|
740
|
-
# will be set to
|
756
|
+
# {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a
|
757
|
+
# queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state};
|
758
|
+
# after calling this method it will be set to
|
759
|
+
# {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}.
|
741
760
|
#
|
742
761
|
# WARNING: Resuming many high-QPS queues at the same time can
|
743
762
|
# lead to target overloading. If you are resuming high-QPS
|
@@ -880,8 +899,8 @@ module Google
|
|
880
899
|
end
|
881
900
|
|
882
901
|
##
|
883
|
-
# Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}.
|
884
|
-
# policy.
|
902
|
+
# Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}.
|
903
|
+
# Replaces any existing policy.
|
885
904
|
#
|
886
905
|
# Note: The Cloud Console does not check queue-level IAM permissions yet.
|
887
906
|
# Project-level permissions are required to use the Cloud Console.
|
@@ -964,9 +983,10 @@ module Google
|
|
964
983
|
end
|
965
984
|
|
966
985
|
##
|
967
|
-
# Returns permissions that a caller has on a
|
968
|
-
# If the resource does not exist, this
|
969
|
-
# permissions, not a
|
986
|
+
# Returns permissions that a caller has on a
|
987
|
+
# {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this
|
988
|
+
# will return an empty set of permissions, not a
|
989
|
+
# [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
|
970
990
|
#
|
971
991
|
# Note: This operation is designed to be used for building permission-aware
|
972
992
|
# UIs and command-line tools, not for authorization checking. This operation
|
@@ -1040,10 +1060,10 @@ module Google
|
|
1040
1060
|
##
|
1041
1061
|
# Lists the tasks in a queue.
|
1042
1062
|
#
|
1043
|
-
# By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is
|
1044
|
-
# due to performance considerations;
|
1045
|
-
# {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view}
|
1046
|
-
# subset of information which is returned.
|
1063
|
+
# By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is
|
1064
|
+
# retrieved due to performance considerations;
|
1065
|
+
# {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view}
|
1066
|
+
# controls the subset of information which is returned.
|
1047
1067
|
#
|
1048
1068
|
# The tasks may be returned in any order. The ordering may change at any
|
1049
1069
|
# time.
|
@@ -1067,11 +1087,11 @@ module Google
|
|
1067
1087
|
# Required. The queue name. For example:
|
1068
1088
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
|
1069
1089
|
# @param response_view [::Google::Cloud::Tasks::V2::Task::View]
|
1070
|
-
# The response_view specifies which subset of the
|
1071
|
-
# returned.
|
1090
|
+
# The response_view specifies which subset of the
|
1091
|
+
# {::Google::Cloud::Tasks::V2::Task Task} will be returned.
|
1072
1092
|
#
|
1073
|
-
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1074
|
-
# information is retrieved by default because some data, such as
|
1093
|
+
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1094
|
+
# not all information is retrieved by default because some data, such as
|
1075
1095
|
# payloads, might be desirable to return only when needed because
|
1076
1096
|
# of its large size or because of the sensitivity of data that it
|
1077
1097
|
# contains.
|
@@ -1083,8 +1103,8 @@ module Google
|
|
1083
1103
|
# Maximum page size.
|
1084
1104
|
#
|
1085
1105
|
# Fewer tasks than requested might be returned, even if more tasks exist; use
|
1086
|
-
# {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
|
1087
|
-
# determine if more tasks exist.
|
1106
|
+
# {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
|
1107
|
+
# in the response to determine if more tasks exist.
|
1088
1108
|
#
|
1089
1109
|
# The maximum page size is 1000. If unspecified, the page size will be the
|
1090
1110
|
# maximum.
|
@@ -1093,9 +1113,9 @@ module Google
|
|
1093
1113
|
#
|
1094
1114
|
# To request the first page results, page_token must be empty. To
|
1095
1115
|
# request the next page of results, page_token must be the value of
|
1096
|
-
# {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
|
1097
|
-
# from the previous call to
|
1098
|
-
# method.
|
1116
|
+
# {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
|
1117
|
+
# returned from the previous call to
|
1118
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_tasks ListTasks} method.
|
1099
1119
|
#
|
1100
1120
|
# The page token is valid for only 2 hours.
|
1101
1121
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
@@ -1163,11 +1183,11 @@ module Google
|
|
1163
1183
|
# Required. The task name. For example:
|
1164
1184
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
1165
1185
|
# @param response_view [::Google::Cloud::Tasks::V2::Task::View]
|
1166
|
-
# The response_view specifies which subset of the
|
1167
|
-
# returned.
|
1186
|
+
# The response_view specifies which subset of the
|
1187
|
+
# {::Google::Cloud::Tasks::V2::Task Task} will be returned.
|
1168
1188
|
#
|
1169
|
-
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1170
|
-
# information is retrieved by default because some data, such as
|
1189
|
+
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1190
|
+
# not all information is retrieved by default because some data, such as
|
1171
1191
|
# payloads, might be desirable to return only when needed because
|
1172
1192
|
# of its large size or because of the sensitivity of data that it
|
1173
1193
|
# contains.
|
@@ -1249,13 +1269,13 @@ module Google
|
|
1249
1269
|
#
|
1250
1270
|
# Task names have the following format:
|
1251
1271
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
|
1252
|
-
# The user can optionally specify a task
|
1253
|
-
# name is not specified then
|
1254
|
-
# unique task id, which will be set in the
|
1255
|
-
# {::Google::Cloud::Tasks::V2::Task#name response}.
|
1272
|
+
# The user can optionally specify a task
|
1273
|
+
# {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then
|
1274
|
+
# the system will generate a random unique task id, which will be set in the
|
1275
|
+
# task returned in the {::Google::Cloud::Tasks::V2::Task#name response}.
|
1256
1276
|
#
|
1257
|
-
# If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or
|
1258
|
-
# past then Cloud Tasks will set it to the current time.
|
1277
|
+
# If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or
|
1278
|
+
# is in the past then Cloud Tasks will set it to the current time.
|
1259
1279
|
#
|
1260
1280
|
# Task De-duplication:
|
1261
1281
|
#
|
@@ -1270,20 +1290,20 @@ module Google
|
|
1270
1290
|
# for ~9days after the original task was deleted or executed.
|
1271
1291
|
#
|
1272
1292
|
# Because there is an extra lookup cost to identify duplicate task
|
1273
|
-
# names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask}
|
1274
|
-
# increased latency. Using hashed strings for the
|
1275
|
-
# the prefix of the task id is recommended. Choosing task ids
|
1276
|
-
# are sequential or have sequential prefixes, for example using a
|
1293
|
+
# names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask}
|
1294
|
+
# calls have significantly increased latency. Using hashed strings for the
|
1295
|
+
# task id or for the prefix of the task id is recommended. Choosing task ids
|
1296
|
+
# that are sequential or have sequential prefixes, for example using a
|
1277
1297
|
# timestamp, causes an increase in latency and error rates in all
|
1278
1298
|
# task commands. The infrastructure relies on an approximately
|
1279
1299
|
# uniform distribution of task ids to store and serve tasks
|
1280
1300
|
# efficiently.
|
1281
1301
|
# @param response_view [::Google::Cloud::Tasks::V2::Task::View]
|
1282
|
-
# The response_view specifies which subset of the
|
1283
|
-
# returned.
|
1302
|
+
# The response_view specifies which subset of the
|
1303
|
+
# {::Google::Cloud::Tasks::V2::Task Task} will be returned.
|
1284
1304
|
#
|
1285
|
-
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1286
|
-
# information is retrieved by default because some data, such as
|
1305
|
+
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1306
|
+
# not all information is retrieved by default because some data, such as
|
1287
1307
|
# payloads, might be desirable to return only when needed because
|
1288
1308
|
# of its large size or because of the sensitivity of data that it
|
1289
1309
|
# contains.
|
@@ -1404,13 +1424,14 @@ module Google
|
|
1404
1424
|
# Forces a task to run now.
|
1405
1425
|
#
|
1406
1426
|
# When this method is called, Cloud Tasks will dispatch the task, even if
|
1407
|
-
# the task is already running, the queue has reached its
|
1408
|
-
#
|
1427
|
+
# the task is already running, the queue has reached its
|
1428
|
+
# {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is
|
1429
|
+
# {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
|
1409
1430
|
#
|
1410
1431
|
# This command is meant to be used for manual debugging. For
|
1411
|
-
# example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to
|
1412
|
-
# task after a fix has been made or to manually force a task
|
1413
|
-
# dispatched now.
|
1432
|
+
# example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to
|
1433
|
+
# retry a failed task after a fix has been made or to manually force a task
|
1434
|
+
# to be dispatched now.
|
1414
1435
|
#
|
1415
1436
|
# The dispatched task is returned. That is, the task that is returned
|
1416
1437
|
# contains the [status][Task.status] after the task is dispatched but
|
@@ -1418,9 +1439,10 @@ module Google
|
|
1418
1439
|
#
|
1419
1440
|
# If Cloud Tasks receives a successful response from the task's
|
1420
1441
|
# target, then the task will be deleted; otherwise the task's
|
1421
|
-
# {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to
|
1422
|
-
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was
|
1423
|
-
# in the queue's
|
1442
|
+
# {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to
|
1443
|
+
# the time that {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was
|
1444
|
+
# called plus the retry delay specified in the queue's
|
1445
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}.
|
1424
1446
|
#
|
1425
1447
|
# {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} returns
|
1426
1448
|
# [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
|
@@ -1445,11 +1467,11 @@ module Google
|
|
1445
1467
|
# Required. The task name. For example:
|
1446
1468
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
1447
1469
|
# @param response_view [::Google::Cloud::Tasks::V2::Task::View]
|
1448
|
-
# The response_view specifies which subset of the
|
1449
|
-
# returned.
|
1470
|
+
# The response_view specifies which subset of the
|
1471
|
+
# {::Google::Cloud::Tasks::V2::Task Task} will be returned.
|
1450
1472
|
#
|
1451
|
-
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1452
|
-
# information is retrieved by default because some data, such as
|
1473
|
+
# By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
|
1474
|
+
# not all information is retrieved by default because some data, such as
|
1453
1475
|
# payloads, might be desirable to return only when needed because
|
1454
1476
|
# of its large size or because of the sensitivity of data that it
|
1455
1477
|
# contains.
|
@@ -1587,6 +1609,13 @@ module Google
|
|
1587
1609
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1588
1610
|
config_attr :quota_project, nil, ::String, nil
|
1589
1611
|
|
1612
|
+
# @private
|
1613
|
+
# Overrides for http bindings for the RPCs of this service
|
1614
|
+
# are only used when this service is used as mixin, and only
|
1615
|
+
# by the host service.
|
1616
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1617
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1618
|
+
|
1590
1619
|
# @private
|
1591
1620
|
def initialize parent_config = nil
|
1592
1621
|
@parent_config = parent_config unless parent_config.nil?
|
@@ -21,6 +21,7 @@ require "gapic/config"
|
|
21
21
|
require "gapic/config/method"
|
22
22
|
|
23
23
|
require "google/cloud/tasks/v2/version"
|
24
|
+
require "google/cloud/tasks/v2/bindings_override"
|
24
25
|
|
25
26
|
require "google/cloud/tasks/v2/cloud_tasks/credentials"
|
26
27
|
require "google/cloud/tasks/v2/cloud_tasks/paths"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/tasks/v2/cloudtasks.proto for package 'google.cloud.tasks.v2'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2023 Google LLC
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,7 +15,6 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
#
|
19
18
|
|
20
19
|
require 'grpc'
|
21
20
|
require 'google/cloud/tasks/v2/cloudtasks_pb'
|
@@ -44,8 +43,8 @@ module Google
|
|
44
43
|
# Creates a queue.
|
45
44
|
#
|
46
45
|
# Queues created with this method allow tasks to live for a maximum of 31
|
47
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
48
|
-
# it was dispatched or not.
|
46
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
47
|
+
# whether it was dispatched or not.
|
49
48
|
#
|
50
49
|
# WARNING: Using this method may have unintended side effects if you are
|
51
50
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
@@ -60,8 +59,8 @@ module Google
|
|
60
59
|
# the queue if it does exist.
|
61
60
|
#
|
62
61
|
# Queues created with this method allow tasks to live for a maximum of 31
|
63
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
64
|
-
# it was dispatched or not.
|
62
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
63
|
+
# whether it was dispatched or not.
|
65
64
|
#
|
66
65
|
# WARNING: Using this method may have unintended side effects if you are
|
67
66
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
@@ -95,17 +94,19 @@ module Google
|
|
95
94
|
#
|
96
95
|
# If a queue is paused then the system will stop dispatching tasks
|
97
96
|
# until the queue is resumed via
|
98
|
-
# [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
|
99
|
-
# when the queue is paused. A queue is paused if its
|
100
|
-
# [state][google.cloud.tasks.v2.Queue.state] is
|
97
|
+
# [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
|
98
|
+
# still be added when the queue is paused. A queue is paused if its
|
99
|
+
# [state][google.cloud.tasks.v2.Queue.state] is
|
100
|
+
# [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
|
101
101
|
rpc :PauseQueue, ::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Google::Cloud::Tasks::V2::Queue
|
102
102
|
# Resume a queue.
|
103
103
|
#
|
104
104
|
# This method resumes a queue after it has been
|
105
105
|
# [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or
|
106
|
-
# [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a
|
107
|
-
# in the queue's [state][google.cloud.tasks.v2.Queue.state];
|
108
|
-
# will be set to
|
106
|
+
# [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a
|
107
|
+
# queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state];
|
108
|
+
# after calling this method it will be set to
|
109
|
+
# [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING].
|
109
110
|
#
|
110
111
|
# WARNING: Resuming many high-QPS queues at the same time can
|
111
112
|
# lead to target overloading. If you are resuming high-QPS
|
@@ -123,8 +124,8 @@ module Google
|
|
123
124
|
#
|
124
125
|
# * `cloudtasks.queues.getIamPolicy`
|
125
126
|
rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
|
126
|
-
# Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
|
127
|
-
# policy.
|
127
|
+
# Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
|
128
|
+
# Replaces any existing policy.
|
128
129
|
#
|
129
130
|
# Note: The Cloud Console does not check queue-level IAM permissions yet.
|
130
131
|
# Project-level permissions are required to use the Cloud Console.
|
@@ -135,9 +136,10 @@ module Google
|
|
135
136
|
#
|
136
137
|
# * `cloudtasks.queues.setIamPolicy`
|
137
138
|
rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
|
138
|
-
# Returns permissions that a caller has on a
|
139
|
-
# If the resource does not exist, this
|
140
|
-
# permissions, not a
|
139
|
+
# Returns permissions that a caller has on a
|
140
|
+
# [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this
|
141
|
+
# will return an empty set of permissions, not a
|
142
|
+
# [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
|
141
143
|
#
|
142
144
|
# Note: This operation is designed to be used for building permission-aware
|
143
145
|
# UIs and command-line tools, not for authorization checking. This operation
|
@@ -145,10 +147,10 @@ module Google
|
|
145
147
|
rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
|
146
148
|
# Lists the tasks in a queue.
|
147
149
|
#
|
148
|
-
# By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
|
149
|
-
# due to performance considerations;
|
150
|
-
# [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
|
151
|
-
# subset of information which is returned.
|
150
|
+
# By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
|
151
|
+
# retrieved due to performance considerations;
|
152
|
+
# [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
|
153
|
+
# controls the subset of information which is returned.
|
152
154
|
#
|
153
155
|
# The tasks may be returned in any order. The ordering may change at any
|
154
156
|
# time.
|
@@ -170,13 +172,14 @@ module Google
|
|
170
172
|
# Forces a task to run now.
|
171
173
|
#
|
172
174
|
# When this method is called, Cloud Tasks will dispatch the task, even if
|
173
|
-
# the task is already running, the queue has reached its
|
174
|
-
#
|
175
|
+
# the task is already running, the queue has reached its
|
176
|
+
# [RateLimits][google.cloud.tasks.v2.RateLimits] or is
|
177
|
+
# [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
|
175
178
|
#
|
176
179
|
# This command is meant to be used for manual debugging. For
|
177
|
-
# example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to
|
178
|
-
# task after a fix has been made or to manually force a task
|
179
|
-
# dispatched now.
|
180
|
+
# example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to
|
181
|
+
# retry a failed task after a fix has been made or to manually force a task
|
182
|
+
# to be dispatched now.
|
180
183
|
#
|
181
184
|
# The dispatched task is returned. That is, the task that is returned
|
182
185
|
# contains the [status][Task.status] after the task is dispatched but
|
@@ -184,9 +187,10 @@ module Google
|
|
184
187
|
#
|
185
188
|
# If Cloud Tasks receives a successful response from the task's
|
186
189
|
# target, then the task will be deleted; otherwise the task's
|
187
|
-
# [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to
|
188
|
-
# [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was
|
189
|
-
# in the queue's
|
190
|
+
# [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to
|
191
|
+
# the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was
|
192
|
+
# called plus the retry delay specified in the queue's
|
193
|
+
# [RetryConfig][google.cloud.tasks.v2.RetryConfig].
|
190
194
|
#
|
191
195
|
# [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns
|
192
196
|
# [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
|