google-cloud-dataflow-v1beta3 0.1.0 → 0.1.4
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 +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/client.rb +48 -38
- data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +168 -44
- data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +54 -38
- data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +96 -40
- data/lib/google/cloud/dataflow/v1beta3/snapshots/client.rb +84 -40
- data/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +84 -40
- data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
- data/lib/google/dataflow/v1beta3/environment_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/jobs_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/jobs_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/messages_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/messages_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/metrics_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/metrics_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/snapshots_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/snapshots_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/templates_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/templates_services_pb.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +6 -0
- 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: fd9fbf2c0d3ea09552666fc75eeae3ed0cd65a3b3a6b1e16eb8cfb72980ea5d2
|
4
|
+
data.tar.gz: e07c10fb9cfc0701aa9243b5d74ca09afd9d9baec84f1b1a77cf5803b5331d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a2b824bab08fe7abfc52705cea98e2de483536a2e9400c97966c98f7f931e39ae3580da1206f1f0bc1768489354539d3524bd30620638b7127d97e2889ed8b
|
7
|
+
data.tar.gz: 9d4a12c474f3bac4a5e55a0ac19df5d8c5502c119769fc962c77d39386a1c0c9afd4160796e91847a100acda9e8e1bf9e78e83a179c7476eeebc0adcb0157bad
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-dataflow-v1beta3
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Dataflow::V1beta3::Snapshots::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `DATAFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `DATAFLOW_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/dataflow/v1beta3"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::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/dataflow/v1beta3"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new do |config|
|
|
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/dataflow/v1beta3"
|
@@ -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/dataflow/v1beta3"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.get_snapshot request
|
38
38
|
```
|
39
39
|
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all FlexTemplatesService clients
|
45
|
+
# ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -92,19 +91,15 @@ module Google
|
|
92
91
|
##
|
93
92
|
# Create a new FlexTemplatesService client object.
|
94
93
|
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
# To create a new FlexTemplatesService client with the default
|
98
|
-
# configuration:
|
94
|
+
# @example
|
99
95
|
#
|
100
|
-
#
|
96
|
+
# # Create a client using the default configuration
|
97
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.new
|
101
98
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# config.timeout = 10.0
|
107
|
-
# end
|
99
|
+
# # Create a client using a custom configuration
|
100
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.new do |config|
|
101
|
+
# config.timeout = 10.0
|
102
|
+
# end
|
108
103
|
#
|
109
104
|
# @yield [config] Configure the FlexTemplatesService client.
|
110
105
|
# @yieldparam config [Client::Configuration]
|
@@ -124,14 +119,13 @@ module Google
|
|
124
119
|
|
125
120
|
# Create credentials
|
126
121
|
credentials = @config.credentials
|
127
|
-
# Use self-signed JWT if the
|
122
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
123
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.
|
130
|
-
@config.endpoint == Client.configure.endpoint &&
|
124
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
131
125
|
!@config.endpoint.split(".").first.include?("-")
|
132
126
|
credentials ||= Credentials.default scope: @config.scope,
|
133
127
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
128
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
129
|
credentials = Credentials.new credentials, scope: @config.scope
|
136
130
|
end
|
137
131
|
@quota_project_id = @config.quota_project
|
@@ -186,6 +180,21 @@ module Google
|
|
186
180
|
#
|
187
181
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
188
182
|
#
|
183
|
+
# @example Basic example
|
184
|
+
# require "google/cloud/dataflow/v1beta3"
|
185
|
+
#
|
186
|
+
# # Create a client object. The client can be reused for multiple calls.
|
187
|
+
# client = Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.new
|
188
|
+
#
|
189
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
190
|
+
# request = Google::Cloud::Dataflow::V1beta3::LaunchFlexTemplateRequest.new
|
191
|
+
#
|
192
|
+
# # Call the launch_flex_template method.
|
193
|
+
# result = client.launch_flex_template request
|
194
|
+
#
|
195
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::LaunchFlexTemplateResponse.
|
196
|
+
# p result
|
197
|
+
#
|
189
198
|
def launch_flex_template request, options = nil
|
190
199
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
191
200
|
|
@@ -206,7 +215,9 @@ module Google
|
|
206
215
|
options.apply_defaults timeout: @config.rpcs.launch_flex_template.timeout,
|
207
216
|
metadata: metadata,
|
208
217
|
retry_policy: @config.rpcs.launch_flex_template.retry_policy
|
209
|
-
|
218
|
+
|
219
|
+
options.apply_defaults timeout: @config.timeout,
|
220
|
+
metadata: @config.metadata,
|
210
221
|
retry_policy: @config.retry_policy
|
211
222
|
|
212
223
|
@flex_templates_service_stub.call_rpc :launch_flex_template, request, options: options do |response, operation|
|
@@ -230,22 +241,21 @@ module Google
|
|
230
241
|
# Configuration can be applied globally to all clients, or to a single client
|
231
242
|
# on construction.
|
232
243
|
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
# to 20 seconds,
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
# end
|
244
|
+
# @example
|
245
|
+
#
|
246
|
+
# # Modify the global config, setting the timeout for
|
247
|
+
# # launch_flex_template to 20 seconds,
|
248
|
+
# # and all remaining timeouts to 10 seconds.
|
249
|
+
# ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.configure do |config|
|
250
|
+
# config.timeout = 10.0
|
251
|
+
# config.rpcs.launch_flex_template.timeout = 20.0
|
252
|
+
# end
|
253
|
+
#
|
254
|
+
# # Apply the above configuration only to a new client.
|
255
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::Client.new do |config|
|
256
|
+
# config.timeout = 10.0
|
257
|
+
# config.rpcs.launch_flex_template.timeout = 20.0
|
258
|
+
# end
|
249
259
|
#
|
250
260
|
# @!attribute [rw] endpoint
|
251
261
|
# The hostname or hostname:port of the service endpoint.
|
@@ -40,13 +40,12 @@ module Google
|
|
40
40
|
# See {::Google::Cloud::Dataflow::V1beta3::Jobs::Client::Configuration}
|
41
41
|
# for a description of the configuration fields.
|
42
42
|
#
|
43
|
-
#
|
43
|
+
# @example
|
44
44
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# end
|
45
|
+
# # Modify the configuration for all Jobs clients
|
46
|
+
# ::Google::Cloud::Dataflow::V1beta3::Jobs::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
|
+
# end
|
50
49
|
#
|
51
50
|
# @yield [config] Configure the Client client.
|
52
51
|
# @yieldparam config [Client::Configuration]
|
@@ -95,19 +94,15 @@ module Google
|
|
95
94
|
##
|
96
95
|
# Create a new Jobs client object.
|
97
96
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new Jobs client with the default
|
101
|
-
# configuration:
|
97
|
+
# @example
|
102
98
|
#
|
103
|
-
#
|
99
|
+
# # Create a client using the default configuration
|
100
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
104
101
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
102
|
+
# # Create a client using a custom configuration
|
103
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Jobs::Client.new do |config|
|
104
|
+
# config.timeout = 10.0
|
105
|
+
# end
|
111
106
|
#
|
112
107
|
# @yield [config] Configure the Jobs client.
|
113
108
|
# @yieldparam config [Client::Configuration]
|
@@ -127,14 +122,13 @@ module Google
|
|
127
122
|
|
128
123
|
# Create credentials
|
129
124
|
credentials = @config.credentials
|
130
|
-
# Use self-signed JWT if the
|
125
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
131
126
|
# but only if the default endpoint does not have a region prefix.
|
132
|
-
enable_self_signed_jwt = @config.
|
133
|
-
@config.endpoint == Client.configure.endpoint &&
|
127
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
134
128
|
!@config.endpoint.split(".").first.include?("-")
|
135
129
|
credentials ||= Credentials.default scope: @config.scope,
|
136
130
|
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
131
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
138
132
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
133
|
end
|
140
134
|
@quota_project_id = @config.quota_project
|
@@ -196,6 +190,21 @@ module Google
|
|
196
190
|
#
|
197
191
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
198
192
|
#
|
193
|
+
# @example Basic example
|
194
|
+
# require "google/cloud/dataflow/v1beta3"
|
195
|
+
#
|
196
|
+
# # Create a client object. The client can be reused for multiple calls.
|
197
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
198
|
+
#
|
199
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
200
|
+
# request = Google::Cloud::Dataflow::V1beta3::CreateJobRequest.new
|
201
|
+
#
|
202
|
+
# # Call the create_job method.
|
203
|
+
# result = client.create_job request
|
204
|
+
#
|
205
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job.
|
206
|
+
# p result
|
207
|
+
#
|
199
208
|
def create_job request, options = nil
|
200
209
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
201
210
|
|
@@ -216,7 +225,9 @@ module Google
|
|
216
225
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
217
226
|
metadata: metadata,
|
218
227
|
retry_policy: @config.rpcs.create_job.retry_policy
|
219
|
-
|
228
|
+
|
229
|
+
options.apply_defaults timeout: @config.timeout,
|
230
|
+
metadata: @config.metadata,
|
220
231
|
retry_policy: @config.retry_policy
|
221
232
|
|
222
233
|
@jobs_stub.call_rpc :create_job, request, options: options do |response, operation|
|
@@ -270,6 +281,21 @@ module Google
|
|
270
281
|
#
|
271
282
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
272
283
|
#
|
284
|
+
# @example Basic example
|
285
|
+
# require "google/cloud/dataflow/v1beta3"
|
286
|
+
#
|
287
|
+
# # Create a client object. The client can be reused for multiple calls.
|
288
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
289
|
+
#
|
290
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
291
|
+
# request = Google::Cloud::Dataflow::V1beta3::GetJobRequest.new
|
292
|
+
#
|
293
|
+
# # Call the get_job method.
|
294
|
+
# result = client.get_job request
|
295
|
+
#
|
296
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job.
|
297
|
+
# p result
|
298
|
+
#
|
273
299
|
def get_job request, options = nil
|
274
300
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
275
301
|
|
@@ -290,7 +316,9 @@ module Google
|
|
290
316
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
291
317
|
metadata: metadata,
|
292
318
|
retry_policy: @config.rpcs.get_job.retry_policy
|
293
|
-
|
319
|
+
|
320
|
+
options.apply_defaults timeout: @config.timeout,
|
321
|
+
metadata: @config.metadata,
|
294
322
|
retry_policy: @config.retry_policy
|
295
323
|
|
296
324
|
@jobs_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -345,6 +373,21 @@ module Google
|
|
345
373
|
#
|
346
374
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
347
375
|
#
|
376
|
+
# @example Basic example
|
377
|
+
# require "google/cloud/dataflow/v1beta3"
|
378
|
+
#
|
379
|
+
# # Create a client object. The client can be reused for multiple calls.
|
380
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
381
|
+
#
|
382
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
383
|
+
# request = Google::Cloud::Dataflow::V1beta3::UpdateJobRequest.new
|
384
|
+
#
|
385
|
+
# # Call the update_job method.
|
386
|
+
# result = client.update_job request
|
387
|
+
#
|
388
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job.
|
389
|
+
# p result
|
390
|
+
#
|
348
391
|
def update_job request, options = nil
|
349
392
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
350
393
|
|
@@ -365,7 +408,9 @@ module Google
|
|
365
408
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
366
409
|
metadata: metadata,
|
367
410
|
retry_policy: @config.rpcs.update_job.retry_policy
|
368
|
-
|
411
|
+
|
412
|
+
options.apply_defaults timeout: @config.timeout,
|
413
|
+
metadata: @config.metadata,
|
369
414
|
retry_policy: @config.retry_policy
|
370
415
|
|
371
416
|
@jobs_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -428,6 +473,27 @@ module Google
|
|
428
473
|
#
|
429
474
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
430
475
|
#
|
476
|
+
# @example Basic example
|
477
|
+
# require "google/cloud/dataflow/v1beta3"
|
478
|
+
#
|
479
|
+
# # Create a client object. The client can be reused for multiple calls.
|
480
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
481
|
+
#
|
482
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
483
|
+
# request = Google::Cloud::Dataflow::V1beta3::ListJobsRequest.new
|
484
|
+
#
|
485
|
+
# # Call the list_jobs method.
|
486
|
+
# result = client.list_jobs request
|
487
|
+
#
|
488
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
489
|
+
# # iterate over all elements by calling #each, and the enumerable
|
490
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
491
|
+
# # methods are also available for managing paging directly.
|
492
|
+
# result.each do |response|
|
493
|
+
# # Each element is of type ::Google::Cloud::Dataflow::V1beta3::Job.
|
494
|
+
# p response
|
495
|
+
# end
|
496
|
+
#
|
431
497
|
def list_jobs request, options = nil
|
432
498
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
433
499
|
|
@@ -448,7 +514,9 @@ module Google
|
|
448
514
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
449
515
|
metadata: metadata,
|
450
516
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
451
|
-
|
517
|
+
|
518
|
+
options.apply_defaults timeout: @config.timeout,
|
519
|
+
metadata: @config.metadata,
|
452
520
|
retry_policy: @config.retry_policy
|
453
521
|
|
454
522
|
@jobs_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -505,6 +573,27 @@ module Google
|
|
505
573
|
#
|
506
574
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
507
575
|
#
|
576
|
+
# @example Basic example
|
577
|
+
# require "google/cloud/dataflow/v1beta3"
|
578
|
+
#
|
579
|
+
# # Create a client object. The client can be reused for multiple calls.
|
580
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
581
|
+
#
|
582
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
583
|
+
# request = Google::Cloud::Dataflow::V1beta3::ListJobsRequest.new
|
584
|
+
#
|
585
|
+
# # Call the aggregated_list_jobs method.
|
586
|
+
# result = client.aggregated_list_jobs request
|
587
|
+
#
|
588
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
589
|
+
# # iterate over all elements by calling #each, and the enumerable
|
590
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
591
|
+
# # methods are also available for managing paging directly.
|
592
|
+
# result.each do |response|
|
593
|
+
# # Each element is of type ::Google::Cloud::Dataflow::V1beta3::Job.
|
594
|
+
# p response
|
595
|
+
# end
|
596
|
+
#
|
508
597
|
def aggregated_list_jobs request, options = nil
|
509
598
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
510
599
|
|
@@ -525,7 +614,9 @@ module Google
|
|
525
614
|
options.apply_defaults timeout: @config.rpcs.aggregated_list_jobs.timeout,
|
526
615
|
metadata: metadata,
|
527
616
|
retry_policy: @config.rpcs.aggregated_list_jobs.retry_policy
|
528
|
-
|
617
|
+
|
618
|
+
options.apply_defaults timeout: @config.timeout,
|
619
|
+
metadata: @config.metadata,
|
529
620
|
retry_policy: @config.retry_policy
|
530
621
|
|
531
622
|
@jobs_stub.call_rpc :aggregated_list_jobs, request, options: options do |response, operation|
|
@@ -566,6 +657,21 @@ module Google
|
|
566
657
|
#
|
567
658
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
568
659
|
#
|
660
|
+
# @example Basic example
|
661
|
+
# require "google/cloud/dataflow/v1beta3"
|
662
|
+
#
|
663
|
+
# # Create a client object. The client can be reused for multiple calls.
|
664
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
665
|
+
#
|
666
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
667
|
+
# request = Google::Cloud::Dataflow::V1beta3::CheckActiveJobsRequest.new
|
668
|
+
#
|
669
|
+
# # Call the check_active_jobs method.
|
670
|
+
# result = client.check_active_jobs request
|
671
|
+
#
|
672
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::CheckActiveJobsResponse.
|
673
|
+
# p result
|
674
|
+
#
|
569
675
|
def check_active_jobs request, options = nil
|
570
676
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
571
677
|
|
@@ -586,7 +692,9 @@ module Google
|
|
586
692
|
options.apply_defaults timeout: @config.rpcs.check_active_jobs.timeout,
|
587
693
|
metadata: metadata,
|
588
694
|
retry_policy: @config.rpcs.check_active_jobs.retry_policy
|
589
|
-
|
695
|
+
|
696
|
+
options.apply_defaults timeout: @config.timeout,
|
697
|
+
metadata: @config.metadata,
|
590
698
|
retry_policy: @config.retry_policy
|
591
699
|
|
592
700
|
@jobs_stub.call_rpc :check_active_jobs, request, options: options do |response, operation|
|
@@ -636,6 +744,21 @@ module Google
|
|
636
744
|
#
|
637
745
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
638
746
|
#
|
747
|
+
# @example Basic example
|
748
|
+
# require "google/cloud/dataflow/v1beta3"
|
749
|
+
#
|
750
|
+
# # Create a client object. The client can be reused for multiple calls.
|
751
|
+
# client = Google::Cloud::Dataflow::V1beta3::Jobs::Client.new
|
752
|
+
#
|
753
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
754
|
+
# request = Google::Cloud::Dataflow::V1beta3::SnapshotJobRequest.new
|
755
|
+
#
|
756
|
+
# # Call the snapshot_job method.
|
757
|
+
# result = client.snapshot_job request
|
758
|
+
#
|
759
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::Snapshot.
|
760
|
+
# p result
|
761
|
+
#
|
639
762
|
def snapshot_job request, options = nil
|
640
763
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
641
764
|
|
@@ -656,7 +779,9 @@ module Google
|
|
656
779
|
options.apply_defaults timeout: @config.rpcs.snapshot_job.timeout,
|
657
780
|
metadata: metadata,
|
658
781
|
retry_policy: @config.rpcs.snapshot_job.retry_policy
|
659
|
-
|
782
|
+
|
783
|
+
options.apply_defaults timeout: @config.timeout,
|
784
|
+
metadata: @config.metadata,
|
660
785
|
retry_policy: @config.retry_policy
|
661
786
|
|
662
787
|
@jobs_stub.call_rpc :snapshot_job, request, options: options do |response, operation|
|
@@ -680,22 +805,21 @@ module Google
|
|
680
805
|
# Configuration can be applied globally to all clients, or to a single client
|
681
806
|
# on construction.
|
682
807
|
#
|
683
|
-
#
|
684
|
-
#
|
685
|
-
#
|
686
|
-
# to 20 seconds,
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
690
|
-
#
|
691
|
-
#
|
692
|
-
#
|
693
|
-
#
|
694
|
-
#
|
695
|
-
#
|
696
|
-
#
|
697
|
-
#
|
698
|
-
# end
|
808
|
+
# @example
|
809
|
+
#
|
810
|
+
# # Modify the global config, setting the timeout for
|
811
|
+
# # create_job to 20 seconds,
|
812
|
+
# # and all remaining timeouts to 10 seconds.
|
813
|
+
# ::Google::Cloud::Dataflow::V1beta3::Jobs::Client.configure do |config|
|
814
|
+
# config.timeout = 10.0
|
815
|
+
# config.rpcs.create_job.timeout = 20.0
|
816
|
+
# end
|
817
|
+
#
|
818
|
+
# # Apply the above configuration only to a new client.
|
819
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Jobs::Client.new do |config|
|
820
|
+
# config.timeout = 10.0
|
821
|
+
# config.rpcs.create_job.timeout = 20.0
|
822
|
+
# end
|
699
823
|
#
|
700
824
|
# @!attribute [rw] endpoint
|
701
825
|
# The hostname or hostname:port of the service endpoint.
|