google-cloud-scheduler 0.3.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2b9679e2ab451aa2cfc859651d11a8864bf83097df463372ae889ecc3b0a2f7
4
- data.tar.gz: 6640545be8c9a1f6a770aa399852214071e909a7df63fd47ac4836f7e868533d
3
+ metadata.gz: c727a10f480098d58f2a8dc85d19632d752e8a5adf3222ecca0c3dd9fc894427
4
+ data.tar.gz: c379c9e918486454f5768e883a4e15b5c687d41d943006622ef9e500e02fac25
5
5
  SHA512:
6
- metadata.gz: aa991e809788bf51bd4111f26e2788227abbece1e05a44f6f42b47e7c1f961211950d46ce7867ef80cbea3c115a78a9e64121737f60f86c8e883bb649dccf8a7
7
- data.tar.gz: 8ea5afeb15cfe49cde67f850c4ddea5b6403df3df87ceb6dd16bf5c812543bea2dc412838846be7295befb5a2a542439efa2d78dd199473ea7185e3df4577671
6
+ metadata.gz: 638a4cf901e251221f1c6c71077a3e7c315a146ebed3132494798b6605cfeaff94deea7f012a537ae802671e0c55b6e67cc302b6bbcef71aa0b5ae45f4330b75
7
+ data.tar.gz: 8df9ab664f400ada6dcadfba66bb48c2f4f37f4e9f954771870d71a7d4af27ed72b6b00e4996610a58af23d586c8d7ef702958291c349b930f5e4ce31f84e14a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruby Client for Cloud Scheduler API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
1
+ # Ruby Client for Cloud Scheduler API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
2
2
 
3
3
  [Cloud Scheduler API][Product Documentation]:
4
4
  Creates and manages jobs run on a regular recurring schedule.
@@ -21,7 +21,7 @@ module Google
21
21
  # rubocop:disable LineLength
22
22
 
23
23
  ##
24
- # # Ruby Client for Cloud Scheduler API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
24
+ # # Ruby Client for Cloud Scheduler API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
25
25
  #
26
26
  # [Cloud Scheduler API][Product Documentation]:
27
27
  # Creates and manages jobs run on a regular recurring schedule.
@@ -22,7 +22,7 @@ module Google
22
22
  # rubocop:disable LineLength
23
23
 
24
24
  ##
25
- # # Ruby Client for Cloud Scheduler API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
25
+ # # Ruby Client for Cloud Scheduler API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
26
26
  #
27
27
  # [Cloud Scheduler API][Product Documentation]:
28
28
  # Creates and manages jobs run on a regular recurring schedule.
@@ -5,6 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/cloud/scheduler/v1/job_pb'
9
10
  require 'google/protobuf/empty_pb'
10
11
  require 'google/protobuf/field_mask_pb'
@@ -110,6 +110,18 @@ module Google
110
110
  # @!attribute [rw] retry_config
111
111
  # @return [Google::Cloud::Scheduler::V1::RetryConfig]
112
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.
113
125
  class Job
114
126
  # State of the job.
115
127
  module State
@@ -58,6 +58,24 @@ module Google
58
58
  # HTTP request body. A request body is allowed only if the HTTP
59
59
  # method is POST, PUT, or PATCH. It is an error to set body on a job with an
60
60
  # incompatible {Google::Cloud::Scheduler::V1::HttpMethod HttpMethod}.
61
+ # @!attribute [rw] oauth_token
62
+ # @return [Google::Cloud::Scheduler::V1::OAuthToken]
63
+ # If specified, an
64
+ # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
65
+ # will be generated and attached as an `Authorization` header in the HTTP
66
+ # request.
67
+ #
68
+ # This type of authorization should be used when sending requests to a GCP
69
+ # endpoint.
70
+ # @!attribute [rw] oidc_token
71
+ # @return [Google::Cloud::Scheduler::V1::OidcToken]
72
+ # If specified, an
73
+ # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
74
+ # token will be generated and attached as an `Authorization` header in the
75
+ # HTTP request.
76
+ #
77
+ # This type of authorization should be used when sending requests to third
78
+ # party endpoints or Cloud Run.
61
79
  class HttpTarget; end
62
80
 
63
81
  # App Engine target. The job will be pushed to a job handler by means
@@ -254,6 +272,40 @@ module Google
254
272
  # to the default version of the default service when the job is attempted.
255
273
  class AppEngineRouting; end
256
274
 
275
+ # Contains information needed for generating an
276
+ # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
277
+ # This type of authorization should be used when sending requests to a GCP
278
+ # endpoint.
279
+ # @!attribute [rw] service_account_email
280
+ # @return [String]
281
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
282
+ # to be used for generating OAuth token.
283
+ # The service account must be within the same project as the job. The caller
284
+ # must have iam.serviceAccounts.actAs permission for the service account.
285
+ # @!attribute [rw] scope
286
+ # @return [String]
287
+ # OAuth scope to be used for generating OAuth access token.
288
+ # If not specified, "https://www.googleapis.com/auth/cloud-platform"
289
+ # will be used.
290
+ class OAuthToken; end
291
+
292
+ # Contains information needed for generating an
293
+ # [OpenID Connect
294
+ # token](https://developers.google.com/identity/protocols/OpenIDConnect). This
295
+ # type of authorization should be used when sending requests to third party
296
+ # endpoints or Cloud Run.
297
+ # @!attribute [rw] service_account_email
298
+ # @return [String]
299
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
300
+ # to be used for generating OIDC token.
301
+ # The service account must be within the same project as the job. The caller
302
+ # must have iam.serviceAccounts.actAs permission for the service account.
303
+ # @!attribute [rw] audience
304
+ # @return [String]
305
+ # Audience to be used when generating OIDC token. If not specified, the URI
306
+ # specified in target will be used.
307
+ class OidcToken; end
308
+
257
309
  # The HTTP method used to execute the job.
258
310
  module HttpMethod
259
311
  # HTTP method unspecified. Defaults to POST.
@@ -5,6 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/cloud/scheduler/v1/target_pb'
9
10
  require 'google/protobuf/duration_pb'
10
11
  require 'google/protobuf/timestamp_pb'
@@ -21,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
21
22
  optional :schedule_time, :message, 17, "google.protobuf.Timestamp"
22
23
  optional :last_attempt_time, :message, 18, "google.protobuf.Timestamp"
23
24
  optional :retry_config, :message, 19, "google.cloud.scheduler.v1.RetryConfig"
25
+ optional :attempt_deadline, :message, 22, "google.protobuf.Duration"
24
26
  oneof :target do
25
27
  optional :pubsub_target, :message, 4, "google.cloud.scheduler.v1.PubsubTarget"
26
28
  optional :app_engine_http_target, :message, 5, "google.cloud.scheduler.v1.AppEngineHttpTarget"
@@ -12,6 +12,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  optional :http_method, :enum, 2, "google.cloud.scheduler.v1.HttpMethod"
13
13
  map :headers, :string, :string, 3
14
14
  optional :body, :bytes, 4
15
+ oneof :authorization_header do
16
+ optional :oauth_token, :message, 5, "google.cloud.scheduler.v1.OAuthToken"
17
+ optional :oidc_token, :message, 6, "google.cloud.scheduler.v1.OidcToken"
18
+ end
15
19
  end
16
20
  add_message "google.cloud.scheduler.v1.AppEngineHttpTarget" do
17
21
  optional :http_method, :enum, 1, "google.cloud.scheduler.v1.HttpMethod"
@@ -31,6 +35,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
35
  optional :instance, :string, 3
32
36
  optional :host, :string, 4
33
37
  end
38
+ add_message "google.cloud.scheduler.v1.OAuthToken" do
39
+ optional :service_account_email, :string, 1
40
+ optional :scope, :string, 2
41
+ end
42
+ add_message "google.cloud.scheduler.v1.OidcToken" do
43
+ optional :service_account_email, :string, 1
44
+ optional :audience, :string, 2
45
+ end
34
46
  add_enum "google.cloud.scheduler.v1.HttpMethod" do
35
47
  value :HTTP_METHOD_UNSPECIFIED, 0
36
48
  value :POST, 1
@@ -51,6 +63,8 @@ module Google
51
63
  AppEngineHttpTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineHttpTarget").msgclass
52
64
  PubsubTarget = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.PubsubTarget").msgclass
53
65
  AppEngineRouting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.AppEngineRouting").msgclass
66
+ OAuthToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.OAuthToken").msgclass
67
+ OidcToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.OidcToken").msgclass
54
68
  HttpMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.scheduler.v1.HttpMethod").enummodule
55
69
  end
56
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax