google-cloud-scheduler 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/scheduler.rb +3 -3
- data/lib/google/cloud/scheduler/v1.rb +139 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler_client.rb +612 -0
- data/lib/google/cloud/scheduler/v1/cloud_scheduler_client_config.json +66 -0
- data/lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb +62 -0
- data/lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb +84 -0
- data/lib/google/cloud/scheduler/v1/credentials.rb +41 -0
- data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/cloudscheduler.rb +142 -0
- data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/job.rb +207 -0
- data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/target.rb +286 -0
- data/lib/google/cloud/scheduler/v1/doc/google/protobuf/any.rb +130 -0
- data/lib/google/cloud/scheduler/v1/doc/google/protobuf/duration.rb +91 -0
- data/lib/google/cloud/scheduler/v1/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/cloud/scheduler/v1/doc/google/protobuf/field_mask.rb +230 -0
- data/lib/google/cloud/scheduler/v1/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/scheduler/v1/doc/google/rpc/status.rb +87 -0
- data/lib/google/cloud/scheduler/v1/helpers.rb +48 -0
- data/lib/google/cloud/scheduler/v1/job_pb.rb +56 -0
- data/lib/google/cloud/scheduler/v1/target_pb.rb +58 -0
- data/lib/google/cloud/scheduler/v1beta1.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client.rb +28 -16
- data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_services_pb.rb +23 -13
- data/lib/google/cloud/scheduler/v1beta1/credentials.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/cloudscheduler.rb +31 -18
- data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/job.rb +37 -25
- data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/target.rb +62 -42
- data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/doc/google/rpc/status.rb +18 -15
- data/lib/google/cloud/scheduler/v1beta1/helpers.rb +7 -7
- metadata +23 -5
@@ -0,0 +1,48 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# # limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Cloud
|
17
|
+
module Scheduler
|
18
|
+
module V1
|
19
|
+
class CloudSchedulerClient
|
20
|
+
|
21
|
+
# Alias for Google::Cloud::Scheduler::V1::CloudSchedulerClient.job_path.
|
22
|
+
# @param project [String]
|
23
|
+
# @param location [String]
|
24
|
+
# @param job [String]
|
25
|
+
# @return [String]
|
26
|
+
def job_path project, location, job
|
27
|
+
self.class.job_path project, location, job
|
28
|
+
end
|
29
|
+
|
30
|
+
# Alias for Google::Cloud::Scheduler::V1::CloudSchedulerClient.location_path.
|
31
|
+
# @param project [String]
|
32
|
+
# @param location [String]
|
33
|
+
# @return [String]
|
34
|
+
def location_path project, location
|
35
|
+
self.class.location_path project, location
|
36
|
+
end
|
37
|
+
|
38
|
+
# Alias for Google::Cloud::Scheduler::V1::CloudSchedulerClient.project_path.
|
39
|
+
# @param project [String]
|
40
|
+
# @return [String]
|
41
|
+
def project_path project
|
42
|
+
self.class.project_path project
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/scheduler/v1/job.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/cloud/scheduler/v1/target_pb'
|
9
|
+
require 'google/protobuf/duration_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/rpc/status_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_message "google.cloud.scheduler.v1.Job" do
|
14
|
+
optional :name, :string, 1
|
15
|
+
optional :description, :string, 2
|
16
|
+
optional :schedule, :string, 20
|
17
|
+
optional :time_zone, :string, 21
|
18
|
+
optional :user_update_time, :message, 9, "google.protobuf.Timestamp"
|
19
|
+
optional :state, :enum, 10, "google.cloud.scheduler.v1.Job.State"
|
20
|
+
optional :status, :message, 11, "google.rpc.Status"
|
21
|
+
optional :schedule_time, :message, 17, "google.protobuf.Timestamp"
|
22
|
+
optional :last_attempt_time, :message, 18, "google.protobuf.Timestamp"
|
23
|
+
optional :retry_config, :message, 19, "google.cloud.scheduler.v1.RetryConfig"
|
24
|
+
oneof :target do
|
25
|
+
optional :pubsub_target, :message, 4, "google.cloud.scheduler.v1.PubsubTarget"
|
26
|
+
optional :app_engine_http_target, :message, 5, "google.cloud.scheduler.v1.AppEngineHttpTarget"
|
27
|
+
optional :http_target, :message, 6, "google.cloud.scheduler.v1.HttpTarget"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
add_enum "google.cloud.scheduler.v1.Job.State" do
|
31
|
+
value :STATE_UNSPECIFIED, 0
|
32
|
+
value :ENABLED, 1
|
33
|
+
value :PAUSED, 2
|
34
|
+
value :DISABLED, 3
|
35
|
+
value :UPDATE_FAILED, 4
|
36
|
+
end
|
37
|
+
add_message "google.cloud.scheduler.v1.RetryConfig" do
|
38
|
+
optional :retry_count, :int32, 1
|
39
|
+
optional :max_retry_duration, :message, 2, "google.protobuf.Duration"
|
40
|
+
optional :min_backoff_duration, :message, 3, "google.protobuf.Duration"
|
41
|
+
optional :max_backoff_duration, :message, 4, "google.protobuf.Duration"
|
42
|
+
optional :max_doublings, :int32, 5
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
module Google
|
47
|
+
module Cloud
|
48
|
+
module Scheduler
|
49
|
+
module V1
|
50
|
+
Job = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.Job").msgclass
|
51
|
+
Job::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.Job.State").enummodule
|
52
|
+
RetryConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.RetryConfig").msgclass
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/scheduler/v1/target.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/protobuf/any_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_message "google.cloud.scheduler.v1.HttpTarget" do
|
11
|
+
optional :uri, :string, 1
|
12
|
+
optional :http_method, :enum, 2, "google.cloud.scheduler.v1.HttpMethod"
|
13
|
+
map :headers, :string, :string, 3
|
14
|
+
optional :body, :bytes, 4
|
15
|
+
end
|
16
|
+
add_message "google.cloud.scheduler.v1.AppEngineHttpTarget" do
|
17
|
+
optional :http_method, :enum, 1, "google.cloud.scheduler.v1.HttpMethod"
|
18
|
+
optional :app_engine_routing, :message, 2, "google.cloud.scheduler.v1.AppEngineRouting"
|
19
|
+
optional :relative_uri, :string, 3
|
20
|
+
map :headers, :string, :string, 4
|
21
|
+
optional :body, :bytes, 5
|
22
|
+
end
|
23
|
+
add_message "google.cloud.scheduler.v1.PubsubTarget" do
|
24
|
+
optional :topic_name, :string, 1
|
25
|
+
optional :data, :bytes, 3
|
26
|
+
map :attributes, :string, :string, 4
|
27
|
+
end
|
28
|
+
add_message "google.cloud.scheduler.v1.AppEngineRouting" do
|
29
|
+
optional :service, :string, 1
|
30
|
+
optional :version, :string, 2
|
31
|
+
optional :instance, :string, 3
|
32
|
+
optional :host, :string, 4
|
33
|
+
end
|
34
|
+
add_enum "google.cloud.scheduler.v1.HttpMethod" do
|
35
|
+
value :HTTP_METHOD_UNSPECIFIED, 0
|
36
|
+
value :POST, 1
|
37
|
+
value :GET, 2
|
38
|
+
value :HEAD, 3
|
39
|
+
value :PUT, 4
|
40
|
+
value :DELETE, 5
|
41
|
+
value :PATCH, 6
|
42
|
+
value :OPTIONS, 7
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
module Google
|
47
|
+
module Cloud
|
48
|
+
module Scheduler
|
49
|
+
module V1
|
50
|
+
HttpTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.HttpTarget").msgclass
|
51
|
+
AppEngineHttpTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineHttpTarget").msgclass
|
52
|
+
PubsubTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.PubsubTarget").msgclass
|
53
|
+
AppEngineRouting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineRouting").msgclass
|
54
|
+
HttpMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.HttpMethod").enummodule
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -367,7 +367,8 @@ module Google
|
|
367
367
|
# Required.
|
368
368
|
#
|
369
369
|
# The job to add. The user can optionally specify a name for the
|
370
|
-
# job in {Google::Cloud::Scheduler::V1beta1::Job#name name}.
|
370
|
+
# job in {Google::Cloud::Scheduler::V1beta1::Job#name name}.
|
371
|
+
# {Google::Cloud::Scheduler::V1beta1::Job#name name} cannot be the same as an
|
371
372
|
# existing job. If a name is not specified then the system will
|
372
373
|
# generate a random unique name that will be returned
|
373
374
|
# ({Google::Cloud::Scheduler::V1beta1::Job#name name}) in the response.
|
@@ -406,18 +407,20 @@ module Google
|
|
406
407
|
|
407
408
|
# Updates a job.
|
408
409
|
#
|
409
|
-
# If successful, the updated {Google::Cloud::Scheduler::V1beta1::Job Job} is
|
410
|
-
# not exist, `NOT_FOUND` is returned.
|
410
|
+
# If successful, the updated {Google::Cloud::Scheduler::V1beta1::Job Job} is
|
411
|
+
# returned. If the job does not exist, `NOT_FOUND` is returned.
|
411
412
|
#
|
412
413
|
# If UpdateJob does not successfully return, it is possible for the
|
413
|
-
# job to be in an
|
414
|
-
#
|
415
|
-
#
|
414
|
+
# job to be in an
|
415
|
+
# {Google::Cloud::Scheduler::V1beta1::Job::State::UPDATE_FAILED Job::State::UPDATE_FAILED}
|
416
|
+
# state. A job in this state may not be executed. If this happens, retry the
|
417
|
+
# UpdateJob request until a successful response is received.
|
416
418
|
#
|
417
419
|
# @param job [Google::Cloud::Scheduler::V1beta1::Job | Hash]
|
418
420
|
# Required.
|
419
421
|
#
|
420
|
-
# The new job properties. {Google::Cloud::Scheduler::V1beta1::Job#name name}
|
422
|
+
# The new job properties. {Google::Cloud::Scheduler::V1beta1::Job#name name}
|
423
|
+
# must be specified.
|
421
424
|
#
|
422
425
|
# Output only fields cannot be modified using UpdateJob.
|
423
426
|
# Any value specified for an output only field will be ignored.
|
@@ -493,10 +496,14 @@ module Google
|
|
493
496
|
# Pauses a job.
|
494
497
|
#
|
495
498
|
# If a job is paused then the system will stop executing the job
|
496
|
-
# until it is re-enabled via
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
499
|
+
# until it is re-enabled via
|
500
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ResumeJob ResumeJob}. The
|
501
|
+
# state of the job is stored in
|
502
|
+
# {Google::Cloud::Scheduler::V1beta1::Job#state state}; if paused it will be set
|
503
|
+
# to {Google::Cloud::Scheduler::V1beta1::Job::State::PAUSED Job::State::PAUSED}. A
|
504
|
+
# job must be in
|
505
|
+
# {Google::Cloud::Scheduler::V1beta1::Job::State::ENABLED Job::State::ENABLED} to be
|
506
|
+
# paused.
|
500
507
|
#
|
501
508
|
# @param name [String]
|
502
509
|
# Required.
|
@@ -531,10 +538,15 @@ module Google
|
|
531
538
|
|
532
539
|
# Resume a job.
|
533
540
|
#
|
534
|
-
# This method reenables a job after it has been
|
535
|
-
#
|
536
|
-
#
|
537
|
-
# {Google::Cloud::Scheduler::V1beta1::Job
|
541
|
+
# This method reenables a job after it has been
|
542
|
+
# {Google::Cloud::Scheduler::V1beta1::Job::State::PAUSED Job::State::PAUSED}. The
|
543
|
+
# state of a job is stored in
|
544
|
+
# {Google::Cloud::Scheduler::V1beta1::Job#state Job#state}; after calling this
|
545
|
+
# method it will be set to
|
546
|
+
# {Google::Cloud::Scheduler::V1beta1::Job::State::ENABLED Job::State::ENABLED}. A
|
547
|
+
# job must be in
|
548
|
+
# {Google::Cloud::Scheduler::V1beta1::Job::State::PAUSED Job::State::PAUSED} to be
|
549
|
+
# resumed.
|
538
550
|
#
|
539
551
|
# @param name [String]
|
540
552
|
# Required.
|
@@ -44,30 +44,40 @@ module Google
|
|
44
44
|
rpc :CreateJob, CreateJobRequest, Job
|
45
45
|
# Updates a job.
|
46
46
|
#
|
47
|
-
# If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
|
48
|
-
# not exist, `NOT_FOUND` is returned.
|
47
|
+
# If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
|
48
|
+
# returned. If the job does not exist, `NOT_FOUND` is returned.
|
49
49
|
#
|
50
50
|
# If UpdateJob does not successfully return, it is possible for the
|
51
|
-
# job to be in an
|
52
|
-
#
|
53
|
-
#
|
51
|
+
# job to be in an
|
52
|
+
# [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
|
53
|
+
# state. A job in this state may not be executed. If this happens, retry the
|
54
|
+
# UpdateJob request until a successful response is received.
|
54
55
|
rpc :UpdateJob, UpdateJobRequest, Job
|
55
56
|
# Deletes a job.
|
56
57
|
rpc :DeleteJob, DeleteJobRequest, Google::Protobuf::Empty
|
57
58
|
# Pauses a job.
|
58
59
|
#
|
59
60
|
# If a job is paused then the system will stop executing the job
|
60
|
-
# until it is re-enabled via
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
61
|
+
# until it is re-enabled via
|
62
|
+
# [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
|
63
|
+
# state of the job is stored in
|
64
|
+
# [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
|
65
|
+
# to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
|
66
|
+
# job must be in
|
67
|
+
# [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
|
68
|
+
# paused.
|
64
69
|
rpc :PauseJob, PauseJobRequest, Job
|
65
70
|
# Resume a job.
|
66
71
|
#
|
67
|
-
# This method reenables a job after it has been
|
68
|
-
#
|
69
|
-
#
|
70
|
-
# [Job.
|
72
|
+
# This method reenables a job after it has been
|
73
|
+
# [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
|
74
|
+
# state of a job is stored in
|
75
|
+
# [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
|
76
|
+
# method it will be set to
|
77
|
+
# [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
|
78
|
+
# job must be in
|
79
|
+
# [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
|
80
|
+
# resumed.
|
71
81
|
rpc :ResumeJob, ResumeJobRequest, Job
|
72
82
|
# Forces a job to run now.
|
73
83
|
#
|
data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/cloudscheduler.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -17,7 +17,8 @@ module Google
|
|
17
17
|
module Cloud
|
18
18
|
module Scheduler
|
19
19
|
module V1beta1
|
20
|
-
# Request message for listing jobs using
|
20
|
+
# Request message for listing jobs using
|
21
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ListJobs ListJobs}.
|
21
22
|
# @!attribute [rw] parent
|
22
23
|
# @return [String]
|
23
24
|
# Required.
|
@@ -37,28 +38,34 @@ module Google
|
|
37
38
|
# A token identifying a page of results the server will return. To
|
38
39
|
# request the first page results, page_token must be empty. To
|
39
40
|
# request the next page of results, page_token must be the value of
|
40
|
-
# {Google::Cloud::Scheduler::V1beta1::ListJobsResponse#next_page_token next_page_token}
|
41
|
-
# the previous call to
|
42
|
-
#
|
43
|
-
#
|
41
|
+
# {Google::Cloud::Scheduler::V1beta1::ListJobsResponse#next_page_token next_page_token}
|
42
|
+
# returned from the previous call to
|
43
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ListJobs ListJobs}. It is
|
44
|
+
# an error to switch the value of
|
45
|
+
# {Google::Cloud::Scheduler::V1beta1::ListJobsRequest#filter filter} or
|
46
|
+
# {Google::Cloud::Scheduler::V1beta1::ListJobsRequest#order_by order_by} while
|
47
|
+
# iterating through pages.
|
44
48
|
class ListJobsRequest; end
|
45
49
|
|
46
|
-
# Response message for listing jobs using
|
50
|
+
# Response message for listing jobs using
|
51
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ListJobs ListJobs}.
|
47
52
|
# @!attribute [rw] jobs
|
48
53
|
# @return [Array<Google::Cloud::Scheduler::V1beta1::Job>]
|
49
54
|
# The list of jobs.
|
50
55
|
# @!attribute [rw] next_page_token
|
51
56
|
# @return [String]
|
52
57
|
# A token to retrieve next page of results. Pass this value in the
|
53
|
-
# {Google::Cloud::Scheduler::V1beta1::ListJobsRequest#page_token page_token}
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
58
|
+
# {Google::Cloud::Scheduler::V1beta1::ListJobsRequest#page_token page_token}
|
59
|
+
# field in the subsequent call to
|
60
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ListJobs ListJobs} to
|
61
|
+
# retrieve the next page of results. If this is empty it indicates that there
|
62
|
+
# are no more results through which to paginate.
|
57
63
|
#
|
58
64
|
# The page token is valid for only 2 hours.
|
59
65
|
class ListJobsResponse; end
|
60
66
|
|
61
|
-
# Request message for
|
67
|
+
# Request message for
|
68
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::GetJob GetJob}.
|
62
69
|
# @!attribute [rw] name
|
63
70
|
# @return [String]
|
64
71
|
# Required.
|
@@ -67,7 +74,8 @@ module Google
|
|
67
74
|
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
68
75
|
class GetJobRequest; end
|
69
76
|
|
70
|
-
# Request message for
|
77
|
+
# Request message for
|
78
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::CreateJob CreateJob}.
|
71
79
|
# @!attribute [rw] parent
|
72
80
|
# @return [String]
|
73
81
|
# Required.
|
@@ -79,18 +87,21 @@ module Google
|
|
79
87
|
# Required.
|
80
88
|
#
|
81
89
|
# The job to add. The user can optionally specify a name for the
|
82
|
-
# job in {Google::Cloud::Scheduler::V1beta1::Job#name name}.
|
90
|
+
# job in {Google::Cloud::Scheduler::V1beta1::Job#name name}.
|
91
|
+
# {Google::Cloud::Scheduler::V1beta1::Job#name name} cannot be the same as an
|
83
92
|
# existing job. If a name is not specified then the system will
|
84
93
|
# generate a random unique name that will be returned
|
85
94
|
# ({Google::Cloud::Scheduler::V1beta1::Job#name name}) in the response.
|
86
95
|
class CreateJobRequest; end
|
87
96
|
|
88
|
-
# Request message for
|
97
|
+
# Request message for
|
98
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::UpdateJob UpdateJob}.
|
89
99
|
# @!attribute [rw] job
|
90
100
|
# @return [Google::Cloud::Scheduler::V1beta1::Job]
|
91
101
|
# Required.
|
92
102
|
#
|
93
|
-
# The new job properties. {Google::Cloud::Scheduler::V1beta1::Job#name name}
|
103
|
+
# The new job properties. {Google::Cloud::Scheduler::V1beta1::Job#name name}
|
104
|
+
# must be specified.
|
94
105
|
#
|
95
106
|
# Output only fields cannot be modified using UpdateJob.
|
96
107
|
# Any value specified for an output only field will be ignored.
|
@@ -109,7 +120,8 @@ module Google
|
|
109
120
|
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
110
121
|
class DeleteJobRequest; end
|
111
122
|
|
112
|
-
# Request message for
|
123
|
+
# Request message for
|
124
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::PauseJob PauseJob}.
|
113
125
|
# @!attribute [rw] name
|
114
126
|
# @return [String]
|
115
127
|
# Required.
|
@@ -118,7 +130,8 @@ module Google
|
|
118
130
|
# `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
119
131
|
class PauseJobRequest; end
|
120
132
|
|
121
|
-
# Request message for
|
133
|
+
# Request message for
|
134
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::ResumeJob ResumeJob}.
|
122
135
|
# @!attribute [rw] name
|
123
136
|
# @return [String]
|
124
137
|
# Required.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -27,7 +27,8 @@ module Google
|
|
27
27
|
# * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
28
28
|
# hyphens (-), colons (:), or periods (.).
|
29
29
|
# For more information, see
|
30
|
-
# [Identifying
|
30
|
+
# [Identifying
|
31
|
+
# projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
|
31
32
|
# * `LOCATION_ID` is the canonical ID for the job's location.
|
32
33
|
# The list of available locations can be obtained by calling
|
33
34
|
# {Google::Cloud::Location::Locations::ListLocations ListLocations}.
|
@@ -62,20 +63,23 @@ module Google
|
|
62
63
|
# A scheduled start time will be delayed if the previous
|
63
64
|
# execution has not ended when its scheduled time occurs.
|
64
65
|
#
|
65
|
-
# If {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count} >
|
66
|
-
# the job will be tried a total of
|
66
|
+
# If {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count} >
|
67
|
+
# 0 and a job attempt fails, the job will be tried a total of
|
68
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}
|
67
69
|
# times, with exponential backoff, until the next scheduled start
|
68
70
|
# time.
|
69
71
|
#
|
70
72
|
# The schedule can be either of the following types:
|
71
73
|
#
|
72
74
|
# * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
|
73
|
-
# * English-like
|
75
|
+
# * English-like
|
76
|
+
# [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
|
74
77
|
# @!attribute [rw] time_zone
|
75
78
|
# @return [String]
|
76
79
|
# Specifies the time zone to be used in interpreting
|
77
|
-
# {Google::Cloud::Scheduler::V1beta1::Job#schedule schedule}. The value of this
|
78
|
-
# zone name from the [tz
|
80
|
+
# {Google::Cloud::Scheduler::V1beta1::Job#schedule schedule}. The value of this
|
81
|
+
# field must be a time zone name from the [tz
|
82
|
+
# database](http://en.wikipedia.org/wiki/Tz_database).
|
79
83
|
#
|
80
84
|
# Note that some time zones include a provision for
|
81
85
|
# daylight savings time. The rules for daylight saving time are
|
@@ -120,9 +124,11 @@ module Google
|
|
120
124
|
# cannot directly set a job to be disabled.
|
121
125
|
DISABLED = 3
|
122
126
|
|
123
|
-
# The job state resulting from a failed
|
127
|
+
# The job state resulting from a failed
|
128
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::UpdateJob CloudScheduler::UpdateJob}
|
124
129
|
# operation. To recover a job from this state, retry
|
125
|
-
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::UpdateJob CloudScheduler::UpdateJob}
|
130
|
+
# {Google::Cloud::Scheduler::V1beta1::CloudScheduler::UpdateJob CloudScheduler::UpdateJob}
|
131
|
+
# until a successful response is received.
|
126
132
|
UPDATE_FAILED = 4
|
127
133
|
end
|
128
134
|
end
|
@@ -131,7 +137,8 @@ module Google
|
|
131
137
|
#
|
132
138
|
# By default, if a job does not complete successfully (meaning that
|
133
139
|
# an acknowledgement is not received from the handler, then it will be retried
|
134
|
-
# with exponential backoff according to the settings in
|
140
|
+
# with exponential backoff according to the settings in
|
141
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig RetryConfig}.
|
135
142
|
# @!attribute [rw] retry_count
|
136
143
|
# @return [Integer]
|
137
144
|
# The number of attempts that the system will make to run a job using the
|
@@ -154,8 +161,8 @@ module Google
|
|
154
161
|
# @return [Google::Protobuf::Duration]
|
155
162
|
# The time limit for retrying a failed job, measured from time when an
|
156
163
|
# execution was first attempted. If specified with
|
157
|
-
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}, the
|
158
|
-
# reached.
|
164
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}, the
|
165
|
+
# job will be retried until both limits are reached.
|
159
166
|
#
|
160
167
|
# The default value for max_retry_duration is zero, which means retry
|
161
168
|
# duration is unlimited.
|
@@ -176,20 +183,25 @@ module Google
|
|
176
183
|
# The time between retries will double `max_doublings` times.
|
177
184
|
#
|
178
185
|
# A job's retry interval starts at
|
179
|
-
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#min_backoff_duration min_backoff_duration},
|
180
|
-
# `max_doublings` times, then increases linearly, and finally
|
186
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#min_backoff_duration min_backoff_duration},
|
187
|
+
# then doubles `max_doublings` times, then increases linearly, and finally
|
181
188
|
# retries retries at intervals of
|
182
|
-
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration}
|
183
|
-
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
189
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration}
|
190
|
+
# up to {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}
|
191
|
+
# times.
|
192
|
+
#
|
193
|
+
# For example, if
|
194
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#min_backoff_duration min_backoff_duration}
|
195
|
+
# is 10s,
|
196
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration}
|
197
|
+
# is 300s, and `max_doublings` is 3, then the a job will first be retried in
|
198
|
+
# 10s. The retry interval will double three times, and then increase linearly
|
199
|
+
# by 2^3 * 10s. Finally, the job will retry at intervals of
|
200
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration}
|
201
|
+
# until the job has been attempted
|
202
|
+
# {Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}
|
203
|
+
# times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s,
|
204
|
+
# 300s, 300s, ....
|
193
205
|
#
|
194
206
|
# The default value of this field is 5.
|
195
207
|
class RetryConfig; end
|