google-cloud-scheduler-v1beta1 0.4.1 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler/client.rb +225 -89
- data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/job_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/target_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/resource.rb +10 -71
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbe85aa3a8ebe270539e72c6bb31ab8464c671ae7aea35f93103d0af98510536
|
4
|
+
data.tar.gz: 7b9e75b9e93ee25be1fc5810787a3092a8b890281cfed91b5980ec212b634f01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94deb997fa529348a9c675ef272a2fccf9ec0e9ca13bc8e54b25229fc9745cbbbd856dcc78151b6d6b4966b0e25c2eff600169688eb3b36c5514be2498034ac1
|
7
|
+
data.tar.gz: 41fa2139aaa3be051422ffe71a4dc27dcd585ea06aee0211f696f158c352006ab3d477db828c56d781172950f54a22f0eb4cbf2a8f209da7679f301494a23742
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-scheduler-v1beta1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SCHEDULER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SCHEDULER_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/scheduler/v1beta1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/scheduler/v1beta1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |con
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/scheduler/v1beta1"
|
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/scheduler/v1beta1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Scheduler::V1beta1::ListJobsRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_jobs request
|
38
38
|
```
|
39
39
|
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all CloudScheduler clients
|
48
|
+
# ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,18 +67,12 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.list_jobs.timeout = 600.0
|
70
69
|
default_config.rpcs.list_jobs.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 60.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [4, 14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.get_job.timeout = 600.0
|
78
74
|
default_config.rpcs.get_job.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [4, 14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.create_job.timeout = 600.0
|
@@ -88,26 +81,17 @@ module Google
|
|
88
81
|
|
89
82
|
default_config.rpcs.delete_job.timeout = 600.0
|
90
83
|
default_config.rpcs.delete_job.retry_policy = {
|
91
|
-
initial_delay: 0.1,
|
92
|
-
max_delay: 60.0,
|
93
|
-
multiplier: 1.3,
|
94
|
-
retry_codes: [4, 14]
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
95
85
|
}
|
96
86
|
|
97
87
|
default_config.rpcs.pause_job.timeout = 600.0
|
98
88
|
default_config.rpcs.pause_job.retry_policy = {
|
99
|
-
initial_delay: 0.1,
|
100
|
-
max_delay: 60.0,
|
101
|
-
multiplier: 1.3,
|
102
|
-
retry_codes: [4, 14]
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
103
90
|
}
|
104
91
|
|
105
92
|
default_config.rpcs.resume_job.timeout = 600.0
|
106
93
|
default_config.rpcs.resume_job.retry_policy = {
|
107
|
-
initial_delay: 0.1,
|
108
|
-
max_delay: 60.0,
|
109
|
-
multiplier: 1.3,
|
110
|
-
retry_codes: [4, 14]
|
94
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
111
95
|
}
|
112
96
|
|
113
97
|
default_config.rpcs.run_job.timeout = 600.0
|
@@ -141,19 +125,15 @@ module Google
|
|
141
125
|
##
|
142
126
|
# Create a new CloudScheduler client object.
|
143
127
|
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
# To create a new CloudScheduler client with the default
|
147
|
-
# configuration:
|
148
|
-
#
|
149
|
-
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
128
|
+
# @example
|
150
129
|
#
|
151
|
-
#
|
152
|
-
#
|
130
|
+
# # Create a client using the default configuration
|
131
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
153
132
|
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
133
|
+
# # Create a client using a custom configuration
|
134
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |config|
|
135
|
+
# config.timeout = 10.0
|
136
|
+
# end
|
157
137
|
#
|
158
138
|
# @yield [config] Configure the CloudScheduler client.
|
159
139
|
# @yieldparam config [Client::Configuration]
|
@@ -173,14 +153,13 @@ module Google
|
|
173
153
|
|
174
154
|
# Create credentials
|
175
155
|
credentials = @config.credentials
|
176
|
-
# Use self-signed JWT if the
|
156
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
177
157
|
# but only if the default endpoint does not have a region prefix.
|
178
|
-
enable_self_signed_jwt = @config.
|
179
|
-
@config.endpoint == Client.configure.endpoint &&
|
158
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
180
159
|
!@config.endpoint.split(".").first.include?("-")
|
181
160
|
credentials ||= Credentials.default scope: @config.scope,
|
182
161
|
enable_self_signed_jwt: enable_self_signed_jwt
|
183
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
162
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
184
163
|
credentials = Credentials.new credentials, scope: @config.scope
|
185
164
|
end
|
186
165
|
@quota_project_id = @config.quota_project
|
@@ -242,6 +221,27 @@ module Google
|
|
242
221
|
#
|
243
222
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
244
223
|
#
|
224
|
+
# @example Basic example
|
225
|
+
# require "google/cloud/scheduler/v1beta1"
|
226
|
+
#
|
227
|
+
# # Create a client object. The client can be reused for multiple calls.
|
228
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
229
|
+
#
|
230
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
231
|
+
# request = Google::Cloud::Scheduler::V1beta1::ListJobsRequest.new
|
232
|
+
#
|
233
|
+
# # Call the list_jobs method.
|
234
|
+
# result = client.list_jobs request
|
235
|
+
#
|
236
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
237
|
+
# # iterate over all elements by calling #each, and the enumerable
|
238
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
239
|
+
# # methods are also available for managing paging directly.
|
240
|
+
# result.each do |response|
|
241
|
+
# # Each element is of type ::Google::Cloud::Scheduler::V1beta1::Job.
|
242
|
+
# p response
|
243
|
+
# end
|
244
|
+
#
|
245
245
|
def list_jobs request, options = nil
|
246
246
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
247
247
|
|
@@ -259,16 +259,20 @@ module Google
|
|
259
259
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
260
260
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
261
261
|
|
262
|
-
header_params = {
|
263
|
-
|
264
|
-
|
262
|
+
header_params = {}
|
263
|
+
if request.parent
|
264
|
+
header_params["parent"] = request.parent
|
265
|
+
end
|
266
|
+
|
265
267
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
266
268
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
267
269
|
|
268
270
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
269
271
|
metadata: metadata,
|
270
272
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
271
|
-
|
273
|
+
|
274
|
+
options.apply_defaults timeout: @config.timeout,
|
275
|
+
metadata: @config.metadata,
|
272
276
|
retry_policy: @config.retry_policy
|
273
277
|
|
274
278
|
@cloud_scheduler_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -310,6 +314,21 @@ module Google
|
|
310
314
|
#
|
311
315
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
312
316
|
#
|
317
|
+
# @example Basic example
|
318
|
+
# require "google/cloud/scheduler/v1beta1"
|
319
|
+
#
|
320
|
+
# # Create a client object. The client can be reused for multiple calls.
|
321
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
322
|
+
#
|
323
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
324
|
+
# request = Google::Cloud::Scheduler::V1beta1::GetJobRequest.new
|
325
|
+
#
|
326
|
+
# # Call the get_job method.
|
327
|
+
# result = client.get_job request
|
328
|
+
#
|
329
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
330
|
+
# p result
|
331
|
+
#
|
313
332
|
def get_job request, options = nil
|
314
333
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
315
334
|
|
@@ -327,16 +346,20 @@ module Google
|
|
327
346
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
328
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
329
348
|
|
330
|
-
header_params = {
|
331
|
-
|
332
|
-
|
349
|
+
header_params = {}
|
350
|
+
if request.name
|
351
|
+
header_params["name"] = request.name
|
352
|
+
end
|
353
|
+
|
333
354
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
334
355
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
335
356
|
|
336
357
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
337
358
|
metadata: metadata,
|
338
359
|
retry_policy: @config.rpcs.get_job.retry_policy
|
339
|
-
|
360
|
+
|
361
|
+
options.apply_defaults timeout: @config.timeout,
|
362
|
+
metadata: @config.metadata,
|
340
363
|
retry_policy: @config.retry_policy
|
341
364
|
|
342
365
|
@cloud_scheduler_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -383,6 +406,21 @@ module Google
|
|
383
406
|
#
|
384
407
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
385
408
|
#
|
409
|
+
# @example Basic example
|
410
|
+
# require "google/cloud/scheduler/v1beta1"
|
411
|
+
#
|
412
|
+
# # Create a client object. The client can be reused for multiple calls.
|
413
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
414
|
+
#
|
415
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
416
|
+
# request = Google::Cloud::Scheduler::V1beta1::CreateJobRequest.new
|
417
|
+
#
|
418
|
+
# # Call the create_job method.
|
419
|
+
# result = client.create_job request
|
420
|
+
#
|
421
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
422
|
+
# p result
|
423
|
+
#
|
386
424
|
def create_job request, options = nil
|
387
425
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
388
426
|
|
@@ -400,16 +438,20 @@ module Google
|
|
400
438
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
401
439
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
402
440
|
|
403
|
-
header_params = {
|
404
|
-
|
405
|
-
|
441
|
+
header_params = {}
|
442
|
+
if request.parent
|
443
|
+
header_params["parent"] = request.parent
|
444
|
+
end
|
445
|
+
|
406
446
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
407
447
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
408
448
|
|
409
449
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
410
450
|
metadata: metadata,
|
411
451
|
retry_policy: @config.rpcs.create_job.retry_policy
|
412
|
-
|
452
|
+
|
453
|
+
options.apply_defaults timeout: @config.timeout,
|
454
|
+
metadata: @config.metadata,
|
413
455
|
retry_policy: @config.retry_policy
|
414
456
|
|
415
457
|
@cloud_scheduler_stub.call_rpc :create_job, request, options: options do |response, operation|
|
@@ -462,6 +504,21 @@ module Google
|
|
462
504
|
#
|
463
505
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
464
506
|
#
|
507
|
+
# @example Basic example
|
508
|
+
# require "google/cloud/scheduler/v1beta1"
|
509
|
+
#
|
510
|
+
# # Create a client object. The client can be reused for multiple calls.
|
511
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
512
|
+
#
|
513
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
514
|
+
# request = Google::Cloud::Scheduler::V1beta1::UpdateJobRequest.new
|
515
|
+
#
|
516
|
+
# # Call the update_job method.
|
517
|
+
# result = client.update_job request
|
518
|
+
#
|
519
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
520
|
+
# p result
|
521
|
+
#
|
465
522
|
def update_job request, options = nil
|
466
523
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
467
524
|
|
@@ -479,16 +536,20 @@ module Google
|
|
479
536
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
480
537
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
481
538
|
|
482
|
-
header_params = {
|
483
|
-
|
484
|
-
|
539
|
+
header_params = {}
|
540
|
+
if request.job&.name
|
541
|
+
header_params["job.name"] = request.job.name
|
542
|
+
end
|
543
|
+
|
485
544
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
486
545
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
487
546
|
|
488
547
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
489
548
|
metadata: metadata,
|
490
549
|
retry_policy: @config.rpcs.update_job.retry_policy
|
491
|
-
|
550
|
+
|
551
|
+
options.apply_defaults timeout: @config.timeout,
|
552
|
+
metadata: @config.metadata,
|
492
553
|
retry_policy: @config.retry_policy
|
493
554
|
|
494
555
|
@cloud_scheduler_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -529,6 +590,21 @@ module Google
|
|
529
590
|
#
|
530
591
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
531
592
|
#
|
593
|
+
# @example Basic example
|
594
|
+
# require "google/cloud/scheduler/v1beta1"
|
595
|
+
#
|
596
|
+
# # Create a client object. The client can be reused for multiple calls.
|
597
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
598
|
+
#
|
599
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
600
|
+
# request = Google::Cloud::Scheduler::V1beta1::DeleteJobRequest.new
|
601
|
+
#
|
602
|
+
# # Call the delete_job method.
|
603
|
+
# result = client.delete_job request
|
604
|
+
#
|
605
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
606
|
+
# p result
|
607
|
+
#
|
532
608
|
def delete_job request, options = nil
|
533
609
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
534
610
|
|
@@ -546,16 +622,20 @@ module Google
|
|
546
622
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
547
623
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
548
624
|
|
549
|
-
header_params = {
|
550
|
-
|
551
|
-
|
625
|
+
header_params = {}
|
626
|
+
if request.name
|
627
|
+
header_params["name"] = request.name
|
628
|
+
end
|
629
|
+
|
552
630
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
553
631
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
554
632
|
|
555
633
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
556
634
|
metadata: metadata,
|
557
635
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
558
|
-
|
636
|
+
|
637
|
+
options.apply_defaults timeout: @config.timeout,
|
638
|
+
metadata: @config.metadata,
|
559
639
|
retry_policy: @config.retry_policy
|
560
640
|
|
561
641
|
@cloud_scheduler_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -602,6 +682,21 @@ module Google
|
|
602
682
|
#
|
603
683
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
604
684
|
#
|
685
|
+
# @example Basic example
|
686
|
+
# require "google/cloud/scheduler/v1beta1"
|
687
|
+
#
|
688
|
+
# # Create a client object. The client can be reused for multiple calls.
|
689
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
690
|
+
#
|
691
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
692
|
+
# request = Google::Cloud::Scheduler::V1beta1::PauseJobRequest.new
|
693
|
+
#
|
694
|
+
# # Call the pause_job method.
|
695
|
+
# result = client.pause_job request
|
696
|
+
#
|
697
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
698
|
+
# p result
|
699
|
+
#
|
605
700
|
def pause_job request, options = nil
|
606
701
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
607
702
|
|
@@ -619,16 +714,20 @@ module Google
|
|
619
714
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
620
715
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
621
716
|
|
622
|
-
header_params = {
|
623
|
-
|
624
|
-
|
717
|
+
header_params = {}
|
718
|
+
if request.name
|
719
|
+
header_params["name"] = request.name
|
720
|
+
end
|
721
|
+
|
625
722
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
626
723
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
627
724
|
|
628
725
|
options.apply_defaults timeout: @config.rpcs.pause_job.timeout,
|
629
726
|
metadata: metadata,
|
630
727
|
retry_policy: @config.rpcs.pause_job.retry_policy
|
631
|
-
|
728
|
+
|
729
|
+
options.apply_defaults timeout: @config.timeout,
|
730
|
+
metadata: @config.metadata,
|
632
731
|
retry_policy: @config.retry_policy
|
633
732
|
|
634
733
|
@cloud_scheduler_stub.call_rpc :pause_job, request, options: options do |response, operation|
|
@@ -674,6 +773,21 @@ module Google
|
|
674
773
|
#
|
675
774
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
676
775
|
#
|
776
|
+
# @example Basic example
|
777
|
+
# require "google/cloud/scheduler/v1beta1"
|
778
|
+
#
|
779
|
+
# # Create a client object. The client can be reused for multiple calls.
|
780
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
781
|
+
#
|
782
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
783
|
+
# request = Google::Cloud::Scheduler::V1beta1::ResumeJobRequest.new
|
784
|
+
#
|
785
|
+
# # Call the resume_job method.
|
786
|
+
# result = client.resume_job request
|
787
|
+
#
|
788
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
789
|
+
# p result
|
790
|
+
#
|
677
791
|
def resume_job request, options = nil
|
678
792
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
679
793
|
|
@@ -691,16 +805,20 @@ module Google
|
|
691
805
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
692
806
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
693
807
|
|
694
|
-
header_params = {
|
695
|
-
|
696
|
-
|
808
|
+
header_params = {}
|
809
|
+
if request.name
|
810
|
+
header_params["name"] = request.name
|
811
|
+
end
|
812
|
+
|
697
813
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
698
814
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
699
815
|
|
700
816
|
options.apply_defaults timeout: @config.rpcs.resume_job.timeout,
|
701
817
|
metadata: metadata,
|
702
818
|
retry_policy: @config.rpcs.resume_job.retry_policy
|
703
|
-
|
819
|
+
|
820
|
+
options.apply_defaults timeout: @config.timeout,
|
821
|
+
metadata: @config.metadata,
|
704
822
|
retry_policy: @config.retry_policy
|
705
823
|
|
706
824
|
@cloud_scheduler_stub.call_rpc :resume_job, request, options: options do |response, operation|
|
@@ -744,6 +862,21 @@ module Google
|
|
744
862
|
#
|
745
863
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
746
864
|
#
|
865
|
+
# @example Basic example
|
866
|
+
# require "google/cloud/scheduler/v1beta1"
|
867
|
+
#
|
868
|
+
# # Create a client object. The client can be reused for multiple calls.
|
869
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
870
|
+
#
|
871
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
872
|
+
# request = Google::Cloud::Scheduler::V1beta1::RunJobRequest.new
|
873
|
+
#
|
874
|
+
# # Call the run_job method.
|
875
|
+
# result = client.run_job request
|
876
|
+
#
|
877
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
878
|
+
# p result
|
879
|
+
#
|
747
880
|
def run_job request, options = nil
|
748
881
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
749
882
|
|
@@ -761,16 +894,20 @@ module Google
|
|
761
894
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
762
895
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
763
896
|
|
764
|
-
header_params = {
|
765
|
-
|
766
|
-
|
897
|
+
header_params = {}
|
898
|
+
if request.name
|
899
|
+
header_params["name"] = request.name
|
900
|
+
end
|
901
|
+
|
767
902
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
768
903
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
769
904
|
|
770
905
|
options.apply_defaults timeout: @config.rpcs.run_job.timeout,
|
771
906
|
metadata: metadata,
|
772
907
|
retry_policy: @config.rpcs.run_job.retry_policy
|
773
|
-
|
908
|
+
|
909
|
+
options.apply_defaults timeout: @config.timeout,
|
910
|
+
metadata: @config.metadata,
|
774
911
|
retry_policy: @config.retry_policy
|
775
912
|
|
776
913
|
@cloud_scheduler_stub.call_rpc :run_job, request, options: options do |response, operation|
|
@@ -794,22 +931,21 @@ module Google
|
|
794
931
|
# Configuration can be applied globally to all clients, or to a single client
|
795
932
|
# on construction.
|
796
933
|
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
#
|
800
|
-
# to 20 seconds,
|
801
|
-
#
|
802
|
-
#
|
803
|
-
#
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
#
|
812
|
-
# end
|
934
|
+
# @example
|
935
|
+
#
|
936
|
+
# # Modify the global config, setting the timeout for
|
937
|
+
# # list_jobs to 20 seconds,
|
938
|
+
# # and all remaining timeouts to 10 seconds.
|
939
|
+
# ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.configure do |config|
|
940
|
+
# config.timeout = 10.0
|
941
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
942
|
+
# end
|
943
|
+
#
|
944
|
+
# # Apply the above configuration only to a new client.
|
945
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |config|
|
946
|
+
# config.timeout = 10.0
|
947
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
948
|
+
# end
|
813
949
|
#
|
814
950
|
# @!attribute [rw] endpoint
|
815
951
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1beta1/cloudscheduler.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/cloud/scheduler/v1beta1/job_pb'
|
11
9
|
require 'google/protobuf/empty_pb'
|
12
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/scheduler/v1beta1/cloudscheduler.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.scheduler.v1beta1.ListJobsRequest" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1beta1/job.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/cloud/scheduler/v1beta1/target_pb'
|
8
6
|
require 'google/protobuf/duration_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
10
8
|
require 'google/rpc/status_pb'
|
11
9
|
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/scheduler/v1beta1/job.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.scheduler.v1beta1.Job" do
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1beta1/target.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/api/annotations_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/scheduler/v1beta1/target.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.cloud.scheduler.v1beta1.HttpTarget" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-scheduler-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
218
|
+
rubygems_version: 3.3.4
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: API Client library for the Cloud Scheduler V1beta1 API
|