google-cloud-scheduler 1.3.0 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +321 -0
  6. data/README.md +36 -24
  7. data/lib/{google/cloud/scheduler/v1/doc/google/protobuf/empty.rb → google-cloud-scheduler.rb} +4 -14
  8. data/lib/google/cloud/scheduler.rb +88 -117
  9. data/lib/google/cloud/scheduler/version.rb +6 -2
  10. metadata +76 -75
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/scheduler/v1.rb +0 -147
  13. data/lib/google/cloud/scheduler/v1/cloud_scheduler_client.rb +0 -616
  14. data/lib/google/cloud/scheduler/v1/cloud_scheduler_client_config.json +0 -66
  15. data/lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb +0 -65
  16. data/lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb +0 -84
  17. data/lib/google/cloud/scheduler/v1/credentials.rb +0 -41
  18. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/cloudscheduler.rb +0 -124
  19. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/job.rb +0 -219
  20. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/target.rb +0 -336
  21. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/any.rb +0 -131
  22. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/duration.rb +0 -91
  23. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/field_mask.rb +0 -222
  24. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/timestamp.rb +0 -113
  25. data/lib/google/cloud/scheduler/v1/doc/google/rpc/status.rb +0 -39
  26. data/lib/google/cloud/scheduler/v1/helpers.rb +0 -48
  27. data/lib/google/cloud/scheduler/v1/job_pb.rb +0 -58
  28. data/lib/google/cloud/scheduler/v1/target_pb.rb +0 -72
  29. data/lib/google/cloud/scheduler/v1beta1.rb +0 -147
  30. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client.rb +0 -613
  31. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client_config.json +0 -66
  32. data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_pb.rb +0 -65
  33. data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_services_pb.rb +0 -84
  34. data/lib/google/cloud/scheduler/v1beta1/credentials.rb +0 -41
  35. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/cloudscheduler.rb +0 -124
  36. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/job.rb +0 -221
  37. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/target.rb +0 -336
  38. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/any.rb +0 -131
  39. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/duration.rb +0 -91
  40. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/empty.rb +0 -29
  41. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/field_mask.rb +0 -222
  42. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  43. data/lib/google/cloud/scheduler/v1beta1/doc/google/rpc/status.rb +0 -39
  44. data/lib/google/cloud/scheduler/v1beta1/helpers.rb +0 -48
  45. data/lib/google/cloud/scheduler/v1beta1/job_pb.rb +0 -58
  46. data/lib/google/cloud/scheduler/v1beta1/target_pb.rb +0 -72
@@ -1,66 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.scheduler.v1.CloudScheduler": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "ListJobs": {
24
- "timeout_millis": 60000,
25
- "retry_codes_name": "idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "GetJob": {
29
- "timeout_millis": 60000,
30
- "retry_codes_name": "idempotent",
31
- "retry_params_name": "default"
32
- },
33
- "CreateJob": {
34
- "timeout_millis": 60000,
35
- "retry_codes_name": "non_idempotent",
36
- "retry_params_name": "default"
37
- },
38
- "UpdateJob": {
39
- "timeout_millis": 60000,
40
- "retry_codes_name": "non_idempotent",
41
- "retry_params_name": "default"
42
- },
43
- "DeleteJob": {
44
- "timeout_millis": 60000,
45
- "retry_codes_name": "non_idempotent",
46
- "retry_params_name": "default"
47
- },
48
- "PauseJob": {
49
- "timeout_millis": 60000,
50
- "retry_codes_name": "non_idempotent",
51
- "retry_params_name": "default"
52
- },
53
- "ResumeJob": {
54
- "timeout_millis": 60000,
55
- "retry_codes_name": "non_idempotent",
56
- "retry_params_name": "default"
57
- },
58
- "RunJob": {
59
- "timeout_millis": 60000,
60
- "retry_codes_name": "non_idempotent",
61
- "retry_params_name": "default"
62
- }
63
- }
64
- }
65
- }
66
- }
@@ -1,65 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/scheduler/v1/cloudscheduler.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/cloud/scheduler/v1/job_pb'
12
- require 'google/protobuf/empty_pb'
13
- require 'google/protobuf/field_mask_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.cloud.scheduler.v1.ListJobsRequest" do
16
- optional :parent, :string, 1
17
- optional :page_size, :int32, 5
18
- optional :page_token, :string, 6
19
- end
20
- add_message "google.cloud.scheduler.v1.ListJobsResponse" do
21
- repeated :jobs, :message, 1, "google.cloud.scheduler.v1.Job"
22
- optional :next_page_token, :string, 2
23
- end
24
- add_message "google.cloud.scheduler.v1.GetJobRequest" do
25
- optional :name, :string, 1
26
- end
27
- add_message "google.cloud.scheduler.v1.CreateJobRequest" do
28
- optional :parent, :string, 1
29
- optional :job, :message, 2, "google.cloud.scheduler.v1.Job"
30
- end
31
- add_message "google.cloud.scheduler.v1.UpdateJobRequest" do
32
- optional :job, :message, 1, "google.cloud.scheduler.v1.Job"
33
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
34
- end
35
- add_message "google.cloud.scheduler.v1.DeleteJobRequest" do
36
- optional :name, :string, 1
37
- end
38
- add_message "google.cloud.scheduler.v1.PauseJobRequest" do
39
- optional :name, :string, 1
40
- end
41
- add_message "google.cloud.scheduler.v1.ResumeJobRequest" do
42
- optional :name, :string, 1
43
- end
44
- add_message "google.cloud.scheduler.v1.RunJobRequest" do
45
- optional :name, :string, 1
46
- end
47
- end
48
-
49
- module Google
50
- module Cloud
51
- module Scheduler
52
- module V1
53
- ListJobsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ListJobsRequest").msgclass
54
- ListJobsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ListJobsResponse").msgclass
55
- GetJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.GetJobRequest").msgclass
56
- CreateJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.CreateJobRequest").msgclass
57
- UpdateJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.UpdateJobRequest").msgclass
58
- DeleteJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.DeleteJobRequest").msgclass
59
- PauseJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.PauseJobRequest").msgclass
60
- ResumeJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.ResumeJobRequest").msgclass
61
- RunJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.RunJobRequest").msgclass
62
- end
63
- end
64
- end
65
- end
@@ -1,84 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/cloud/scheduler/v1/cloudscheduler.proto for package 'google.cloud.scheduler.v1'
3
- # Original file comments:
4
- # Copyright 2019 Google LLC.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
- #
19
-
20
-
21
- require 'grpc'
22
- require 'google/cloud/scheduler/v1/cloudscheduler_pb'
23
-
24
- module Google
25
- module Cloud
26
- module Scheduler
27
- module V1
28
- module CloudScheduler
29
- # The Cloud Scheduler API allows external entities to reliably
30
- # schedule asynchronous jobs.
31
- class Service
32
-
33
- include GRPC::GenericService
34
-
35
- self.marshal_class_method = :encode
36
- self.unmarshal_class_method = :decode
37
- self.service_name = 'google.cloud.scheduler.v1.CloudScheduler'
38
-
39
- # Lists jobs.
40
- rpc :ListJobs, ListJobsRequest, ListJobsResponse
41
- # Gets a job.
42
- rpc :GetJob, GetJobRequest, Job
43
- # Creates a job.
44
- rpc :CreateJob, CreateJobRequest, Job
45
- # Updates a job.
46
- #
47
- # If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
48
- # not exist, `NOT_FOUND` is returned.
49
- #
50
- # If UpdateJob does not successfully return, it is possible for the
51
- # job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
52
- # not be executed. If this happens, retry the UpdateJob request
53
- # until a successful response is received.
54
- rpc :UpdateJob, UpdateJobRequest, Job
55
- # Deletes a job.
56
- rpc :DeleteJob, DeleteJobRequest, Google::Protobuf::Empty
57
- # Pauses a job.
58
- #
59
- # If a job is paused then the system will stop executing the job
60
- # until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
61
- # state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
62
- # will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]
63
- # to be paused.
64
- rpc :PauseJob, PauseJobRequest, Job
65
- # Resume a job.
66
- #
67
- # This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
68
- # state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
69
- # will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
70
- # [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
71
- rpc :ResumeJob, ResumeJobRequest, Job
72
- # Forces a job to run now.
73
- #
74
- # When this method is called, Cloud Scheduler will dispatch the job, even
75
- # if the job is already running.
76
- rpc :RunJob, RunJobRequest, Job
77
- end
78
-
79
- Stub = Service.rpc_stub_class
80
- end
81
- end
82
- end
83
- end
84
- end
@@ -1,41 +0,0 @@
1
- # Copyright 2020 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
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Scheduler
21
- module V1
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform"
25
- ].freeze
26
- PATH_ENV_VARS = %w(CLOUDSCHEDULER_CREDENTIALS
27
- CLOUDSCHEDULER_KEYFILE
28
- GOOGLE_CLOUD_CREDENTIALS
29
- GOOGLE_CLOUD_KEYFILE
30
- GCLOUD_KEYFILE)
31
- JSON_ENV_VARS = %w(CLOUDSCHEDULER_CREDENTIALS_JSON
32
- CLOUDSCHEDULER_KEYFILE_JSON
33
- GOOGLE_CLOUD_CREDENTIALS_JSON
34
- GOOGLE_CLOUD_KEYFILE_JSON
35
- GCLOUD_KEYFILE_JSON)
36
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,124 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Cloud
18
- module Scheduler
19
- module V1
20
- # Request message for listing jobs using {Google::Cloud::Scheduler::V1::CloudScheduler::ListJobs ListJobs}.
21
- # @!attribute [rw] parent
22
- # @return [String]
23
- # Required. The location name. For example:
24
- # `projects/PROJECT_ID/locations/LOCATION_ID`.
25
- # @!attribute [rw] page_size
26
- # @return [Integer]
27
- # Requested page size.
28
- #
29
- # The maximum page size is 500. If unspecified, the page size will
30
- # be the maximum. Fewer jobs than requested might be returned,
31
- # even if more jobs exist; use next_page_token to determine if more
32
- # jobs exist.
33
- # @!attribute [rw] page_token
34
- # @return [String]
35
- # A token identifying a page of results the server will return. To
36
- # request the first page results, page_token must be empty. To
37
- # request the next page of results, page_token must be the value of
38
- # {Google::Cloud::Scheduler::V1::ListJobsResponse#next_page_token next_page_token} returned from
39
- # the previous call to {Google::Cloud::Scheduler::V1::CloudScheduler::ListJobs ListJobs}. It is an error to
40
- # switch the value of {Google::Cloud::Scheduler::V1::ListJobsRequest#filter filter} or
41
- # {Google::Cloud::Scheduler::V1::ListJobsRequest#order_by order_by} while iterating through pages.
42
- class ListJobsRequest; end
43
-
44
- # Response message for listing jobs using {Google::Cloud::Scheduler::V1::CloudScheduler::ListJobs ListJobs}.
45
- # @!attribute [rw] jobs
46
- # @return [Array<Google::Cloud::Scheduler::V1::Job>]
47
- # The list of jobs.
48
- # @!attribute [rw] next_page_token
49
- # @return [String]
50
- # A token to retrieve next page of results. Pass this value in the
51
- # {Google::Cloud::Scheduler::V1::ListJobsRequest#page_token page_token} field in the subsequent call to
52
- # {Google::Cloud::Scheduler::V1::CloudScheduler::ListJobs ListJobs} to retrieve the next page of results.
53
- # If this is empty it indicates that there are no more results
54
- # through which to paginate.
55
- #
56
- # The page token is valid for only 2 hours.
57
- class ListJobsResponse; end
58
-
59
- # Request message for {Google::Cloud::Scheduler::V1::CloudScheduler::GetJob GetJob}.
60
- # @!attribute [rw] name
61
- # @return [String]
62
- # Required. The job name. For example:
63
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
64
- class GetJobRequest; end
65
-
66
- # Request message for {Google::Cloud::Scheduler::V1::CloudScheduler::CreateJob CreateJob}.
67
- # @!attribute [rw] parent
68
- # @return [String]
69
- # Required. The location name. For example:
70
- # `projects/PROJECT_ID/locations/LOCATION_ID`.
71
- # @!attribute [rw] job
72
- # @return [Google::Cloud::Scheduler::V1::Job]
73
- # Required. The job to add. The user can optionally specify a name for the
74
- # job in {Google::Cloud::Scheduler::V1::Job#name name}. {Google::Cloud::Scheduler::V1::Job#name name} cannot be the same as an
75
- # existing job. If a name is not specified then the system will
76
- # generate a random unique name that will be returned
77
- # ({Google::Cloud::Scheduler::V1::Job#name name}) in the response.
78
- class CreateJobRequest; end
79
-
80
- # Request message for {Google::Cloud::Scheduler::V1::CloudScheduler::UpdateJob UpdateJob}.
81
- # @!attribute [rw] job
82
- # @return [Google::Cloud::Scheduler::V1::Job]
83
- # Required. The new job properties. {Google::Cloud::Scheduler::V1::Job#name name} must be specified.
84
- #
85
- # Output only fields cannot be modified using UpdateJob.
86
- # Any value specified for an output only field will be ignored.
87
- # @!attribute [rw] update_mask
88
- # @return [Google::Protobuf::FieldMask]
89
- # A mask used to specify which fields of the job are being updated.
90
- class UpdateJobRequest; end
91
-
92
- # Request message for deleting a job using
93
- # {Google::Cloud::Scheduler::V1::CloudScheduler::DeleteJob DeleteJob}.
94
- # @!attribute [rw] name
95
- # @return [String]
96
- # Required. The job name. For example:
97
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
98
- class DeleteJobRequest; end
99
-
100
- # Request message for {Google::Cloud::Scheduler::V1::CloudScheduler::PauseJob PauseJob}.
101
- # @!attribute [rw] name
102
- # @return [String]
103
- # Required. The job name. For example:
104
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
105
- class PauseJobRequest; end
106
-
107
- # Request message for {Google::Cloud::Scheduler::V1::CloudScheduler::ResumeJob ResumeJob}.
108
- # @!attribute [rw] name
109
- # @return [String]
110
- # Required. The job name. For example:
111
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
112
- class ResumeJobRequest; end
113
-
114
- # Request message for forcing a job to run now using
115
- # {Google::Cloud::Scheduler::V1::CloudScheduler::RunJob RunJob}.
116
- # @!attribute [rw] name
117
- # @return [String]
118
- # Required. The job name. For example:
119
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
120
- class RunJobRequest; end
121
- end
122
- end
123
- end
124
- end
@@ -1,219 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Cloud
18
- module Scheduler
19
- module V1
20
- # Configuration for a job.
21
- # The maximum allowed size for a job is 100KB.
22
- # @!attribute [rw] name
23
- # @return [String]
24
- # Optionally caller-specified in {Google::Cloud::Scheduler::V1::CloudScheduler::CreateJob CreateJob}, after
25
- # which it becomes output only.
26
- #
27
- # The job name. For example:
28
- # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
29
- #
30
- # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
31
- # hyphens (-), colons (:), or periods (.).
32
- # For more information, see
33
- # [Identifying
34
- # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
35
- # * `LOCATION_ID` is the canonical ID for the job's location.
36
- # The list of available locations can be obtained by calling
37
- # {Google::Cloud::Location::Locations::ListLocations ListLocations}.
38
- # For more information, see https://cloud.google.com/about/locations/.
39
- # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
40
- # hyphens (-), or underscores (_). The maximum length is 500 characters.
41
- # @!attribute [rw] description
42
- # @return [String]
43
- # Optionally caller-specified in {Google::Cloud::Scheduler::V1::CloudScheduler::CreateJob CreateJob} or
44
- # {Google::Cloud::Scheduler::V1::CloudScheduler::UpdateJob UpdateJob}.
45
- #
46
- # A human-readable description for the job. This string must not contain
47
- # more than 500 characters.
48
- # @!attribute [rw] pubsub_target
49
- # @return [Google::Cloud::Scheduler::V1::PubsubTarget]
50
- # Pub/Sub target.
51
- # @!attribute [rw] app_engine_http_target
52
- # @return [Google::Cloud::Scheduler::V1::AppEngineHttpTarget]
53
- # App Engine HTTP target.
54
- # @!attribute [rw] http_target
55
- # @return [Google::Cloud::Scheduler::V1::HttpTarget]
56
- # HTTP target.
57
- # @!attribute [rw] schedule
58
- # @return [String]
59
- # Required, except when used with {Google::Cloud::Scheduler::V1::CloudScheduler::UpdateJob UpdateJob}.
60
- #
61
- # Describes the schedule on which the job will be executed.
62
- #
63
- # The schedule can be either of the following types:
64
- #
65
- # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
66
- # * English-like
67
- # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
68
- #
69
- # As a general rule, execution `n + 1` of a job will not begin
70
- # until execution `n` has finished. Cloud Scheduler will never
71
- # allow two simultaneously outstanding executions. For example,
72
- # this implies that if the `n+1`th execution is scheduled to run at
73
- # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
74
- # execution will not start until `16:15`.
75
- # A scheduled start time will be delayed if the previous
76
- # execution has not ended when its scheduled time occurs.
77
- #
78
- # If {Google::Cloud::Scheduler::V1::RetryConfig#retry_count retry_count} > 0 and a job attempt fails,
79
- # the job will be tried a total of {Google::Cloud::Scheduler::V1::RetryConfig#retry_count retry_count}
80
- # times, with exponential backoff, until the next scheduled start
81
- # time.
82
- # @!attribute [rw] time_zone
83
- # @return [String]
84
- # Specifies the time zone to be used in interpreting
85
- # {Google::Cloud::Scheduler::V1::Job#schedule schedule}. The value of this field must be a time
86
- # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
87
- #
88
- # Note that some time zones include a provision for
89
- # daylight savings time. The rules for daylight saving time are
90
- # determined by the chosen tz. For UTC use the string "utc". If a
91
- # time zone is not specified, the default will be in UTC (also known
92
- # as GMT).
93
- # @!attribute [rw] user_update_time
94
- # @return [Google::Protobuf::Timestamp]
95
- # Output only. The creation time of the job.
96
- # @!attribute [rw] state
97
- # @return [Google::Cloud::Scheduler::V1::Job::State]
98
- # Output only. State of the job.
99
- # @!attribute [rw] status
100
- # @return [Google::Rpc::Status]
101
- # Output only. The response from the target for the last attempted execution.
102
- # @!attribute [rw] schedule_time
103
- # @return [Google::Protobuf::Timestamp]
104
- # Output only. The next time the job is scheduled. Note that this may be a
105
- # retry of a previously failed attempt or the next execution time
106
- # according to the schedule.
107
- # @!attribute [rw] last_attempt_time
108
- # @return [Google::Protobuf::Timestamp]
109
- # Output only. The time the last job attempt started.
110
- # @!attribute [rw] retry_config
111
- # @return [Google::Cloud::Scheduler::V1::RetryConfig]
112
- # Settings that determine the retry behavior.
113
- # @!attribute [rw] attempt_deadline
114
- # @return [Google::Protobuf::Duration]
115
- # The deadline for job attempts. If the request handler does not respond by
116
- # this deadline then the request is cancelled and the attempt is marked as a
117
- # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
118
- # execution logs. Cloud Scheduler will retry the job according
119
- # to the {Google::Cloud::Scheduler::V1::RetryConfig RetryConfig}.
120
- #
121
- # The allowed duration for this deadline is:
122
- # * For {Google::Cloud::Scheduler::V1::Job#http_target HTTP targets}, between 15 seconds and 30 minutes.
123
- # * For {Google::Cloud::Scheduler::V1::Job#app_engine_http_target App Engine HTTP targets}, between 15
124
- # seconds and 24 hours.
125
- class Job
126
- # State of the job.
127
- module State
128
- # Unspecified state.
129
- STATE_UNSPECIFIED = 0
130
-
131
- # The job is executing normally.
132
- ENABLED = 1
133
-
134
- # The job is paused by the user. It will not execute. A user can
135
- # intentionally pause the job using
136
- # {Google::Cloud::Scheduler::V1::PauseJobRequest PauseJobRequest}.
137
- PAUSED = 2
138
-
139
- # The job is disabled by the system due to error. The user
140
- # cannot directly set a job to be disabled.
141
- DISABLED = 3
142
-
143
- # The job state resulting from a failed {Google::Cloud::Scheduler::V1::CloudScheduler::UpdateJob CloudScheduler::UpdateJob}
144
- # operation. To recover a job from this state, retry
145
- # {Google::Cloud::Scheduler::V1::CloudScheduler::UpdateJob CloudScheduler::UpdateJob} until a successful response is received.
146
- UPDATE_FAILED = 4
147
- end
148
- end
149
-
150
- # Settings that determine the retry behavior.
151
- #
152
- # By default, if a job does not complete successfully (meaning that
153
- # an acknowledgement is not received from the handler, then it will be retried
154
- # with exponential backoff according to the settings in {Google::Cloud::Scheduler::V1::RetryConfig RetryConfig}.
155
- # @!attribute [rw] retry_count
156
- # @return [Integer]
157
- # The number of attempts that the system will make to run a job using the
158
- # exponential backoff procedure described by
159
- # {Google::Cloud::Scheduler::V1::RetryConfig#max_doublings max_doublings}.
160
- #
161
- # The default value of retry_count is zero.
162
- #
163
- # If retry_count is zero, a job attempt will *not* be retried if
164
- # it fails. Instead the Cloud Scheduler system will wait for the
165
- # next scheduled execution time.
166
- #
167
- # If retry_count is set to a non-zero number then Cloud Scheduler
168
- # will retry failed attempts, using exponential backoff,
169
- # retry_count times, or until the next scheduled execution time,
170
- # whichever comes first.
171
- #
172
- # Values greater than 5 and negative values are not allowed.
173
- # @!attribute [rw] max_retry_duration
174
- # @return [Google::Protobuf::Duration]
175
- # The time limit for retrying a failed job, measured from time when an
176
- # execution was first attempted. If specified with
177
- # {Google::Cloud::Scheduler::V1::RetryConfig#retry_count retry_count}, the job will be retried until both
178
- # limits are reached.
179
- #
180
- # The default value for max_retry_duration is zero, which means retry
181
- # duration is unlimited.
182
- # @!attribute [rw] min_backoff_duration
183
- # @return [Google::Protobuf::Duration]
184
- # The minimum amount of time to wait before retrying a job after
185
- # it fails.
186
- #
187
- # The default value of this field is 5 seconds.
188
- # @!attribute [rw] max_backoff_duration
189
- # @return [Google::Protobuf::Duration]
190
- # The maximum amount of time to wait before retrying a job after
191
- # it fails.
192
- #
193
- # The default value of this field is 1 hour.
194
- # @!attribute [rw] max_doublings
195
- # @return [Integer]
196
- # The time between retries will double `max_doublings` times.
197
- #
198
- # A job's retry interval starts at
199
- # {Google::Cloud::Scheduler::V1::RetryConfig#min_backoff_duration min_backoff_duration}, then doubles
200
- # `max_doublings` times, then increases linearly, and finally
201
- # retries retries at intervals of
202
- # {Google::Cloud::Scheduler::V1::RetryConfig#max_backoff_duration max_backoff_duration} up to
203
- # {Google::Cloud::Scheduler::V1::RetryConfig#retry_count retry_count} times.
204
- #
205
- # For example, if {Google::Cloud::Scheduler::V1::RetryConfig#min_backoff_duration min_backoff_duration} is
206
- # 10s, {Google::Cloud::Scheduler::V1::RetryConfig#max_backoff_duration max_backoff_duration} is 300s, and
207
- # `max_doublings` is 3, then the a job will first be retried in 10s. The
208
- # retry interval will double three times, and then increase linearly by
209
- # 2^3 * 10s. Finally, the job will retry at intervals of
210
- # {Google::Cloud::Scheduler::V1::RetryConfig#max_backoff_duration max_backoff_duration} until the job has
211
- # been attempted {Google::Cloud::Scheduler::V1::RetryConfig#retry_count retry_count} times. Thus, the
212
- # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
213
- #
214
- # The default value of this field is 5.
215
- class RetryConfig; end
216
- end
217
- end
218
- end
219
- end