google-cloud-dataproc-v1 0.6.1 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +154 -69
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +718 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +767 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
- data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
- data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +325 -118
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +149 -37
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +9 -2
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +244 -104
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +149 -37
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +40 -2
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +219 -95
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +149 -37
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +1 -2
- data/lib/google/cloud/dataproc/v1.rb +1 -0
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +45 -22
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +8 -9
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +117 -1
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +11 -14
- metadata +12 -4
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all WorkflowTemplateService clients
|
48
|
+
# ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,58 +67,37 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.create_workflow_template.timeout = 600.0
|
70
69
|
default_config.rpcs.create_workflow_template.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 60.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.get_workflow_template.timeout = 600.0
|
78
74
|
default_config.rpcs.get_workflow_template.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [4, 13, 14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.instantiate_workflow_template.timeout = 600.0
|
86
79
|
default_config.rpcs.instantiate_workflow_template.retry_policy = {
|
87
|
-
initial_delay: 0.1,
|
88
|
-
max_delay: 60.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [14]
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
91
81
|
}
|
92
82
|
|
93
83
|
default_config.rpcs.instantiate_inline_workflow_template.timeout = 600.0
|
94
84
|
default_config.rpcs.instantiate_inline_workflow_template.retry_policy = {
|
95
|
-
initial_delay: 0.1,
|
96
|
-
max_delay: 60.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: [14]
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
99
86
|
}
|
100
87
|
|
101
88
|
default_config.rpcs.update_workflow_template.timeout = 600.0
|
102
89
|
default_config.rpcs.update_workflow_template.retry_policy = {
|
103
|
-
initial_delay: 0.1,
|
104
|
-
max_delay: 60.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [14]
|
90
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
107
91
|
}
|
108
92
|
|
109
93
|
default_config.rpcs.list_workflow_templates.timeout = 600.0
|
110
94
|
default_config.rpcs.list_workflow_templates.retry_policy = {
|
111
|
-
initial_delay: 0.1,
|
112
|
-
max_delay: 60.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [4, 13, 14]
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
115
96
|
}
|
116
97
|
|
117
98
|
default_config.rpcs.delete_workflow_template.timeout = 600.0
|
118
99
|
default_config.rpcs.delete_workflow_template.retry_policy = {
|
119
|
-
initial_delay: 0.1,
|
120
|
-
max_delay: 60.0,
|
121
|
-
multiplier: 1.3,
|
122
|
-
retry_codes: [14]
|
100
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
123
101
|
}
|
124
102
|
|
125
103
|
default_config
|
@@ -151,19 +129,15 @@ module Google
|
|
151
129
|
##
|
152
130
|
# Create a new WorkflowTemplateService client object.
|
153
131
|
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
# To create a new WorkflowTemplateService client with the default
|
157
|
-
# configuration:
|
132
|
+
# @example
|
158
133
|
#
|
159
|
-
#
|
134
|
+
# # Create a client using the default configuration
|
135
|
+
# client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
160
136
|
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
# config.timeout = 10.0
|
166
|
-
# end
|
137
|
+
# # Create a client using a custom configuration
|
138
|
+
# client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
|
139
|
+
# config.timeout = 10.0
|
140
|
+
# end
|
167
141
|
#
|
168
142
|
# @yield [config] Configure the WorkflowTemplateService client.
|
169
143
|
# @yieldparam config [Client::Configuration]
|
@@ -183,14 +157,13 @@ module Google
|
|
183
157
|
|
184
158
|
# Create credentials
|
185
159
|
credentials = @config.credentials
|
186
|
-
# Use self-signed JWT if the
|
160
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
187
161
|
# but only if the default endpoint does not have a region prefix.
|
188
|
-
enable_self_signed_jwt = @config.
|
189
|
-
@config.endpoint == Client.configure.endpoint &&
|
162
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
190
163
|
!@config.endpoint.split(".").first.include?("-")
|
191
164
|
credentials ||= Credentials.default scope: @config.scope,
|
192
165
|
enable_self_signed_jwt: enable_self_signed_jwt
|
193
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
166
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
194
167
|
credentials = Credentials.new credentials, scope: @config.scope
|
195
168
|
end
|
196
169
|
@quota_project_id = @config.quota_project
|
@@ -259,6 +232,21 @@ module Google
|
|
259
232
|
#
|
260
233
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
261
234
|
#
|
235
|
+
# @example Basic example
|
236
|
+
# require "google/cloud/dataproc/v1"
|
237
|
+
#
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
239
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
240
|
+
#
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
242
|
+
# request = Google::Cloud::Dataproc::V1::CreateWorkflowTemplateRequest.new
|
243
|
+
#
|
244
|
+
# # Call the create_workflow_template method.
|
245
|
+
# result = client.create_workflow_template request
|
246
|
+
#
|
247
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
248
|
+
# p result
|
249
|
+
#
|
262
250
|
def create_workflow_template request, options = nil
|
263
251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
264
252
|
|
@@ -276,16 +264,20 @@ module Google
|
|
276
264
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
277
265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
278
266
|
|
279
|
-
header_params = {
|
280
|
-
|
281
|
-
|
267
|
+
header_params = {}
|
268
|
+
if request.parent
|
269
|
+
header_params["parent"] = request.parent
|
270
|
+
end
|
271
|
+
|
282
272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
283
273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
284
274
|
|
285
275
|
options.apply_defaults timeout: @config.rpcs.create_workflow_template.timeout,
|
286
276
|
metadata: metadata,
|
287
277
|
retry_policy: @config.rpcs.create_workflow_template.retry_policy
|
288
|
-
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
289
281
|
retry_policy: @config.retry_policy
|
290
282
|
|
291
283
|
@workflow_template_service_stub.call_rpc :create_workflow_template, request, options: options do |response, operation|
|
@@ -342,6 +334,21 @@ module Google
|
|
342
334
|
#
|
343
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
344
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/cloud/dataproc/v1"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Cloud::Dataproc::V1::GetWorkflowTemplateRequest.new
|
345
|
+
#
|
346
|
+
# # Call the get_workflow_template method.
|
347
|
+
# result = client.get_workflow_template request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
350
|
+
# p result
|
351
|
+
#
|
345
352
|
def get_workflow_template request, options = nil
|
346
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
347
354
|
|
@@ -359,16 +366,20 @@ module Google
|
|
359
366
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
360
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
368
|
|
362
|
-
header_params = {
|
363
|
-
|
364
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
365
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
366
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
367
376
|
|
368
377
|
options.apply_defaults timeout: @config.rpcs.get_workflow_template.timeout,
|
369
378
|
metadata: metadata,
|
370
379
|
retry_policy: @config.rpcs.get_workflow_template.retry_policy
|
371
|
-
|
380
|
+
|
381
|
+
options.apply_defaults timeout: @config.timeout,
|
382
|
+
metadata: @config.metadata,
|
372
383
|
retry_policy: @config.retry_policy
|
373
384
|
|
374
385
|
@workflow_template_service_stub.call_rpc :get_workflow_template, request, options: options do |response, operation|
|
@@ -456,6 +467,28 @@ module Google
|
|
456
467
|
#
|
457
468
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
458
469
|
#
|
470
|
+
# @example Basic example
|
471
|
+
# require "google/cloud/dataproc/v1"
|
472
|
+
#
|
473
|
+
# # Create a client object. The client can be reused for multiple calls.
|
474
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
475
|
+
#
|
476
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
477
|
+
# request = Google::Cloud::Dataproc::V1::InstantiateWorkflowTemplateRequest.new
|
478
|
+
#
|
479
|
+
# # Call the instantiate_workflow_template method.
|
480
|
+
# result = client.instantiate_workflow_template request
|
481
|
+
#
|
482
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
483
|
+
# # object to check the status of an operation, cancel it, or wait
|
484
|
+
# # for results. Here is how to block until completion:
|
485
|
+
# result.wait_until_done! timeout: 60
|
486
|
+
# if result.response?
|
487
|
+
# p result.response
|
488
|
+
# else
|
489
|
+
# puts "Error!"
|
490
|
+
# end
|
491
|
+
#
|
459
492
|
def instantiate_workflow_template request, options = nil
|
460
493
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
461
494
|
|
@@ -473,16 +506,20 @@ module Google
|
|
473
506
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
474
507
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
475
508
|
|
476
|
-
header_params = {
|
477
|
-
|
478
|
-
|
509
|
+
header_params = {}
|
510
|
+
if request.name
|
511
|
+
header_params["name"] = request.name
|
512
|
+
end
|
513
|
+
|
479
514
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
480
515
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
481
516
|
|
482
517
|
options.apply_defaults timeout: @config.rpcs.instantiate_workflow_template.timeout,
|
483
518
|
metadata: metadata,
|
484
519
|
retry_policy: @config.rpcs.instantiate_workflow_template.retry_policy
|
485
|
-
|
520
|
+
|
521
|
+
options.apply_defaults timeout: @config.timeout,
|
522
|
+
metadata: @config.metadata,
|
486
523
|
retry_policy: @config.retry_policy
|
487
524
|
|
488
525
|
@workflow_template_service_stub.call_rpc :instantiate_workflow_template, request, options: options do |response, operation|
|
@@ -498,8 +535,7 @@ module Google
|
|
498
535
|
# Instantiates a template and begins execution.
|
499
536
|
#
|
500
537
|
# This method is equivalent to executing the sequence
|
501
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
502
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
538
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate}, {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
503
539
|
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
504
540
|
#
|
505
541
|
# The returned Operation can be used to track execution of
|
@@ -568,6 +604,28 @@ module Google
|
|
568
604
|
#
|
569
605
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
570
606
|
#
|
607
|
+
# @example Basic example
|
608
|
+
# require "google/cloud/dataproc/v1"
|
609
|
+
#
|
610
|
+
# # Create a client object. The client can be reused for multiple calls.
|
611
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
612
|
+
#
|
613
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
614
|
+
# request = Google::Cloud::Dataproc::V1::InstantiateInlineWorkflowTemplateRequest.new
|
615
|
+
#
|
616
|
+
# # Call the instantiate_inline_workflow_template method.
|
617
|
+
# result = client.instantiate_inline_workflow_template request
|
618
|
+
#
|
619
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
620
|
+
# # object to check the status of an operation, cancel it, or wait
|
621
|
+
# # for results. Here is how to block until completion:
|
622
|
+
# result.wait_until_done! timeout: 60
|
623
|
+
# if result.response?
|
624
|
+
# p result.response
|
625
|
+
# else
|
626
|
+
# puts "Error!"
|
627
|
+
# end
|
628
|
+
#
|
571
629
|
def instantiate_inline_workflow_template request, options = nil
|
572
630
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
573
631
|
|
@@ -585,16 +643,20 @@ module Google
|
|
585
643
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
586
644
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
587
645
|
|
588
|
-
header_params = {
|
589
|
-
|
590
|
-
|
646
|
+
header_params = {}
|
647
|
+
if request.parent
|
648
|
+
header_params["parent"] = request.parent
|
649
|
+
end
|
650
|
+
|
591
651
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
592
652
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
593
653
|
|
594
654
|
options.apply_defaults timeout: @config.rpcs.instantiate_inline_workflow_template.timeout,
|
595
655
|
metadata: metadata,
|
596
656
|
retry_policy: @config.rpcs.instantiate_inline_workflow_template.retry_policy
|
597
|
-
|
657
|
+
|
658
|
+
options.apply_defaults timeout: @config.timeout,
|
659
|
+
metadata: @config.metadata,
|
598
660
|
retry_policy: @config.retry_policy
|
599
661
|
|
600
662
|
@workflow_template_service_stub.call_rpc :instantiate_inline_workflow_template, request, options: options do |response, operation|
|
@@ -638,6 +700,21 @@ module Google
|
|
638
700
|
#
|
639
701
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
640
702
|
#
|
703
|
+
# @example Basic example
|
704
|
+
# require "google/cloud/dataproc/v1"
|
705
|
+
#
|
706
|
+
# # Create a client object. The client can be reused for multiple calls.
|
707
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
708
|
+
#
|
709
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
710
|
+
# request = Google::Cloud::Dataproc::V1::UpdateWorkflowTemplateRequest.new
|
711
|
+
#
|
712
|
+
# # Call the update_workflow_template method.
|
713
|
+
# result = client.update_workflow_template request
|
714
|
+
#
|
715
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
716
|
+
# p result
|
717
|
+
#
|
641
718
|
def update_workflow_template request, options = nil
|
642
719
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
643
720
|
|
@@ -655,16 +732,20 @@ module Google
|
|
655
732
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
656
733
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
657
734
|
|
658
|
-
header_params = {
|
659
|
-
|
660
|
-
|
735
|
+
header_params = {}
|
736
|
+
if request.template&.name
|
737
|
+
header_params["template.name"] = request.template.name
|
738
|
+
end
|
739
|
+
|
661
740
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
662
741
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
663
742
|
|
664
743
|
options.apply_defaults timeout: @config.rpcs.update_workflow_template.timeout,
|
665
744
|
metadata: metadata,
|
666
745
|
retry_policy: @config.rpcs.update_workflow_template.retry_policy
|
667
|
-
|
746
|
+
|
747
|
+
options.apply_defaults timeout: @config.timeout,
|
748
|
+
metadata: @config.metadata,
|
668
749
|
retry_policy: @config.retry_policy
|
669
750
|
|
670
751
|
@workflow_template_service_stub.call_rpc :update_workflow_template, request, options: options do |response, operation|
|
@@ -718,6 +799,27 @@ module Google
|
|
718
799
|
#
|
719
800
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
720
801
|
#
|
802
|
+
# @example Basic example
|
803
|
+
# require "google/cloud/dataproc/v1"
|
804
|
+
#
|
805
|
+
# # Create a client object. The client can be reused for multiple calls.
|
806
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
807
|
+
#
|
808
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
809
|
+
# request = Google::Cloud::Dataproc::V1::ListWorkflowTemplatesRequest.new
|
810
|
+
#
|
811
|
+
# # Call the list_workflow_templates method.
|
812
|
+
# result = client.list_workflow_templates request
|
813
|
+
#
|
814
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
815
|
+
# # iterate over all elements by calling #each, and the enumerable
|
816
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
817
|
+
# # methods are also available for managing paging directly.
|
818
|
+
# result.each do |response|
|
819
|
+
# # Each element is of type ::Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
820
|
+
# p response
|
821
|
+
# end
|
822
|
+
#
|
721
823
|
def list_workflow_templates request, options = nil
|
722
824
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
723
825
|
|
@@ -735,16 +837,20 @@ module Google
|
|
735
837
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
736
838
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
737
839
|
|
738
|
-
header_params = {
|
739
|
-
|
740
|
-
|
840
|
+
header_params = {}
|
841
|
+
if request.parent
|
842
|
+
header_params["parent"] = request.parent
|
843
|
+
end
|
844
|
+
|
741
845
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
742
846
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
743
847
|
|
744
848
|
options.apply_defaults timeout: @config.rpcs.list_workflow_templates.timeout,
|
745
849
|
metadata: metadata,
|
746
850
|
retry_policy: @config.rpcs.list_workflow_templates.retry_policy
|
747
|
-
|
851
|
+
|
852
|
+
options.apply_defaults timeout: @config.timeout,
|
853
|
+
metadata: @config.metadata,
|
748
854
|
retry_policy: @config.retry_policy
|
749
855
|
|
750
856
|
@workflow_template_service_stub.call_rpc :list_workflow_templates, request, options: options do |response, operation|
|
@@ -798,6 +904,21 @@ module Google
|
|
798
904
|
#
|
799
905
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
800
906
|
#
|
907
|
+
# @example Basic example
|
908
|
+
# require "google/cloud/dataproc/v1"
|
909
|
+
#
|
910
|
+
# # Create a client object. The client can be reused for multiple calls.
|
911
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
912
|
+
#
|
913
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
914
|
+
# request = Google::Cloud::Dataproc::V1::DeleteWorkflowTemplateRequest.new
|
915
|
+
#
|
916
|
+
# # Call the delete_workflow_template method.
|
917
|
+
# result = client.delete_workflow_template request
|
918
|
+
#
|
919
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
920
|
+
# p result
|
921
|
+
#
|
801
922
|
def delete_workflow_template request, options = nil
|
802
923
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
803
924
|
|
@@ -815,16 +936,20 @@ module Google
|
|
815
936
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
816
937
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
817
938
|
|
818
|
-
header_params = {
|
819
|
-
|
820
|
-
|
939
|
+
header_params = {}
|
940
|
+
if request.name
|
941
|
+
header_params["name"] = request.name
|
942
|
+
end
|
943
|
+
|
821
944
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
822
945
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
823
946
|
|
824
947
|
options.apply_defaults timeout: @config.rpcs.delete_workflow_template.timeout,
|
825
948
|
metadata: metadata,
|
826
949
|
retry_policy: @config.rpcs.delete_workflow_template.retry_policy
|
827
|
-
|
950
|
+
|
951
|
+
options.apply_defaults timeout: @config.timeout,
|
952
|
+
metadata: @config.metadata,
|
828
953
|
retry_policy: @config.retry_policy
|
829
954
|
|
830
955
|
@workflow_template_service_stub.call_rpc :delete_workflow_template, request, options: options do |response, operation|
|
@@ -848,22 +973,21 @@ module Google
|
|
848
973
|
# Configuration can be applied globally to all clients, or to a single client
|
849
974
|
# on construction.
|
850
975
|
#
|
851
|
-
#
|
852
|
-
#
|
853
|
-
#
|
854
|
-
# to 20 seconds,
|
855
|
-
#
|
856
|
-
#
|
857
|
-
#
|
858
|
-
#
|
859
|
-
#
|
860
|
-
#
|
861
|
-
#
|
862
|
-
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
866
|
-
# end
|
976
|
+
# @example
|
977
|
+
#
|
978
|
+
# # Modify the global config, setting the timeout for
|
979
|
+
# # create_workflow_template to 20 seconds,
|
980
|
+
# # and all remaining timeouts to 10 seconds.
|
981
|
+
# ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.configure do |config|
|
982
|
+
# config.timeout = 10.0
|
983
|
+
# config.rpcs.create_workflow_template.timeout = 20.0
|
984
|
+
# end
|
985
|
+
#
|
986
|
+
# # Apply the above configuration only to a new client.
|
987
|
+
# client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
|
988
|
+
# config.timeout = 10.0
|
989
|
+
# config.rpcs.create_workflow_template.timeout = 20.0
|
990
|
+
# end
|
867
991
|
#
|
868
992
|
# @!attribute [rw] endpoint
|
869
993
|
# The hostname or hostname:port of the service endpoint.
|