google-cloud-dataproc-v1beta2 0.5.0 → 0.6.3
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/LICENSE.md +188 -190
- data/README.md +3 -3
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service/client.rb +55 -61
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service/paths.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller/client.rb +76 -89
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller/operations.rb +39 -30
- data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +4 -4
- data/lib/google/cloud/dataproc/v1beta2/job_controller/client.rb +80 -94
- data/lib/google/cloud/dataproc/v1beta2/job_controller/operations.rb +39 -30
- data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1beta2/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/client.rb +68 -82
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/operations.rb +39 -30
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/paths.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +16 -10
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::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 AutoscalingPolicyService clients
|
48
|
+
# ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::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]
|
@@ -61,7 +60,7 @@ module Google
|
|
61
60
|
parent_config = while namespace.any?
|
62
61
|
parent_name = namespace.join "::"
|
63
62
|
parent_const = const_get parent_name
|
64
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
65
64
|
namespace.pop
|
66
65
|
end
|
67
66
|
default_config = Client::Configuration.new parent_config
|
@@ -70,26 +69,17 @@ module Google
|
|
70
69
|
|
71
70
|
default_config.rpcs.update_autoscaling_policy.timeout = 600.0
|
72
71
|
default_config.rpcs.update_autoscaling_policy.retry_policy = {
|
73
|
-
initial_delay: 0.1,
|
74
|
-
max_delay: 60.0,
|
75
|
-
multiplier: 1.3,
|
76
|
-
retry_codes: [4, 14]
|
72
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
73
|
}
|
78
74
|
|
79
75
|
default_config.rpcs.get_autoscaling_policy.timeout = 600.0
|
80
76
|
default_config.rpcs.get_autoscaling_policy.retry_policy = {
|
81
|
-
initial_delay: 0.1,
|
82
|
-
max_delay: 60.0,
|
83
|
-
multiplier: 1.3,
|
84
|
-
retry_codes: [4, 14]
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
78
|
}
|
86
79
|
|
87
80
|
default_config.rpcs.list_autoscaling_policies.timeout = 600.0
|
88
81
|
default_config.rpcs.list_autoscaling_policies.retry_policy = {
|
89
|
-
initial_delay: 0.1,
|
90
|
-
max_delay: 60.0,
|
91
|
-
multiplier: 1.3,
|
92
|
-
retry_codes: [4, 14]
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
93
83
|
}
|
94
84
|
|
95
85
|
default_config.rpcs.delete_autoscaling_policy.timeout = 600.0
|
@@ -123,19 +113,15 @@ module Google
|
|
123
113
|
##
|
124
114
|
# Create a new AutoscalingPolicyService client object.
|
125
115
|
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
# To create a new AutoscalingPolicyService client with the default
|
129
|
-
# configuration:
|
130
|
-
#
|
131
|
-
# client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new
|
116
|
+
# @example
|
132
117
|
#
|
133
|
-
#
|
134
|
-
#
|
118
|
+
# # Create a client using the default configuration
|
119
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new
|
135
120
|
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
121
|
+
# # Create a client using a custom configuration
|
122
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new do |config|
|
123
|
+
# config.timeout = 10.0
|
124
|
+
# end
|
139
125
|
#
|
140
126
|
# @yield [config] Configure the AutoscalingPolicyService client.
|
141
127
|
# @yieldparam config [Client::Configuration]
|
@@ -155,14 +141,13 @@ module Google
|
|
155
141
|
|
156
142
|
# Create credentials
|
157
143
|
credentials = @config.credentials
|
158
|
-
# Use self-signed JWT if the
|
144
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
159
145
|
# but only if the default endpoint does not have a region prefix.
|
160
|
-
enable_self_signed_jwt = @config.
|
161
|
-
@config.endpoint == Client.configure.endpoint &&
|
146
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
162
147
|
!@config.endpoint.split(".").first.include?("-")
|
163
|
-
credentials ||= Credentials.default scope:
|
148
|
+
credentials ||= Credentials.default scope: @config.scope,
|
164
149
|
enable_self_signed_jwt: enable_self_signed_jwt
|
165
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
150
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
166
151
|
credentials = Credentials.new credentials, scope: @config.scope
|
167
152
|
end
|
168
153
|
@quota_project_id = @config.quota_project
|
@@ -245,7 +230,9 @@ module Google
|
|
245
230
|
options.apply_defaults timeout: @config.rpcs.create_autoscaling_policy.timeout,
|
246
231
|
metadata: metadata,
|
247
232
|
retry_policy: @config.rpcs.create_autoscaling_policy.retry_policy
|
248
|
-
|
233
|
+
|
234
|
+
options.apply_defaults timeout: @config.timeout,
|
235
|
+
metadata: @config.metadata,
|
249
236
|
retry_policy: @config.retry_policy
|
250
237
|
|
251
238
|
@autoscaling_policy_service_stub.call_rpc :create_autoscaling_policy, request, options: options do |response, operation|
|
@@ -314,7 +301,9 @@ module Google
|
|
314
301
|
options.apply_defaults timeout: @config.rpcs.update_autoscaling_policy.timeout,
|
315
302
|
metadata: metadata,
|
316
303
|
retry_policy: @config.rpcs.update_autoscaling_policy.retry_policy
|
317
|
-
|
304
|
+
|
305
|
+
options.apply_defaults timeout: @config.timeout,
|
306
|
+
metadata: @config.metadata,
|
318
307
|
retry_policy: @config.retry_policy
|
319
308
|
|
320
309
|
@autoscaling_policy_service_stub.call_rpc :update_autoscaling_policy, request, options: options do |response, operation|
|
@@ -389,7 +378,9 @@ module Google
|
|
389
378
|
options.apply_defaults timeout: @config.rpcs.get_autoscaling_policy.timeout,
|
390
379
|
metadata: metadata,
|
391
380
|
retry_policy: @config.rpcs.get_autoscaling_policy.retry_policy
|
392
|
-
|
381
|
+
|
382
|
+
options.apply_defaults timeout: @config.timeout,
|
383
|
+
metadata: @config.metadata,
|
393
384
|
retry_policy: @config.retry_policy
|
394
385
|
|
395
386
|
@autoscaling_policy_service_stub.call_rpc :get_autoscaling_policy, request, options: options do |response, operation|
|
@@ -470,7 +461,9 @@ module Google
|
|
470
461
|
options.apply_defaults timeout: @config.rpcs.list_autoscaling_policies.timeout,
|
471
462
|
metadata: metadata,
|
472
463
|
retry_policy: @config.rpcs.list_autoscaling_policies.retry_policy
|
473
|
-
|
464
|
+
|
465
|
+
options.apply_defaults timeout: @config.timeout,
|
466
|
+
metadata: @config.metadata,
|
474
467
|
retry_policy: @config.retry_policy
|
475
468
|
|
476
469
|
@autoscaling_policy_service_stub.call_rpc :list_autoscaling_policies, request, options: options do |response, operation|
|
@@ -547,7 +540,9 @@ module Google
|
|
547
540
|
options.apply_defaults timeout: @config.rpcs.delete_autoscaling_policy.timeout,
|
548
541
|
metadata: metadata,
|
549
542
|
retry_policy: @config.rpcs.delete_autoscaling_policy.retry_policy
|
550
|
-
|
543
|
+
|
544
|
+
options.apply_defaults timeout: @config.timeout,
|
545
|
+
metadata: @config.metadata,
|
551
546
|
retry_policy: @config.retry_policy
|
552
547
|
|
553
548
|
@autoscaling_policy_service_stub.call_rpc :delete_autoscaling_policy, request, options: options do |response, operation|
|
@@ -571,22 +566,21 @@ module Google
|
|
571
566
|
# Configuration can be applied globally to all clients, or to a single client
|
572
567
|
# on construction.
|
573
568
|
#
|
574
|
-
#
|
575
|
-
#
|
576
|
-
# To modify the global config, setting the timeout for create_autoscaling_policy
|
577
|
-
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
578
|
-
#
|
579
|
-
# ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.configure do |config|
|
580
|
-
# config.timeout = 10.0
|
581
|
-
# config.rpcs.create_autoscaling_policy.timeout = 20.0
|
582
|
-
# end
|
569
|
+
# @example
|
583
570
|
#
|
584
|
-
#
|
571
|
+
# # Modify the global config, setting the timeout for
|
572
|
+
# # create_autoscaling_policy to 20 seconds,
|
573
|
+
# # and all remaining timeouts to 10 seconds.
|
574
|
+
# ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.configure do |config|
|
575
|
+
# config.timeout = 10.0
|
576
|
+
# config.rpcs.create_autoscaling_policy.timeout = 20.0
|
577
|
+
# end
|
585
578
|
#
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
579
|
+
# # Apply the above configuration only to a new client.
|
580
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new do |config|
|
581
|
+
# config.timeout = 10.0
|
582
|
+
# config.rpcs.create_autoscaling_policy.timeout = 20.0
|
583
|
+
# end
|
590
584
|
#
|
591
585
|
# @!attribute [rw] endpoint
|
592
586
|
# The hostname or hostname:port of the service endpoint.
|
@@ -650,7 +644,7 @@ module Google
|
|
650
644
|
config_attr :scope, nil, ::String, ::Array, nil
|
651
645
|
config_attr :lib_name, nil, ::String, nil
|
652
646
|
config_attr :lib_version, nil, ::String, nil
|
653
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
647
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
654
648
|
config_attr :interceptors, nil, ::Array, nil
|
655
649
|
config_attr :timeout, nil, ::Numeric, nil
|
656
650
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -671,7 +665,7 @@ module Google
|
|
671
665
|
def rpcs
|
672
666
|
@rpcs ||= begin
|
673
667
|
parent_rpcs = nil
|
674
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
668
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
675
669
|
Rpcs.new parent_rpcs
|
676
670
|
end
|
677
671
|
end
|
@@ -722,15 +716,15 @@ module Google
|
|
722
716
|
|
723
717
|
# @private
|
724
718
|
def initialize parent_rpcs = nil
|
725
|
-
create_autoscaling_policy_config = parent_rpcs
|
719
|
+
create_autoscaling_policy_config = parent_rpcs.create_autoscaling_policy if parent_rpcs.respond_to? :create_autoscaling_policy
|
726
720
|
@create_autoscaling_policy = ::Gapic::Config::Method.new create_autoscaling_policy_config
|
727
|
-
update_autoscaling_policy_config = parent_rpcs
|
721
|
+
update_autoscaling_policy_config = parent_rpcs.update_autoscaling_policy if parent_rpcs.respond_to? :update_autoscaling_policy
|
728
722
|
@update_autoscaling_policy = ::Gapic::Config::Method.new update_autoscaling_policy_config
|
729
|
-
get_autoscaling_policy_config = parent_rpcs
|
723
|
+
get_autoscaling_policy_config = parent_rpcs.get_autoscaling_policy if parent_rpcs.respond_to? :get_autoscaling_policy
|
730
724
|
@get_autoscaling_policy = ::Gapic::Config::Method.new get_autoscaling_policy_config
|
731
|
-
list_autoscaling_policies_config = parent_rpcs
|
725
|
+
list_autoscaling_policies_config = parent_rpcs.list_autoscaling_policies if parent_rpcs.respond_to? :list_autoscaling_policies
|
732
726
|
@list_autoscaling_policies = ::Gapic::Config::Method.new list_autoscaling_policies_config
|
733
|
-
delete_autoscaling_policy_config = parent_rpcs
|
727
|
+
delete_autoscaling_policy_config = parent_rpcs.delete_autoscaling_policy if parent_rpcs.respond_to? :delete_autoscaling_policy
|
734
728
|
@delete_autoscaling_policy = ::Gapic::Config::Method.new delete_autoscaling_policy_config
|
735
729
|
|
736
730
|
yield self if block_given?
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
|
55
55
|
"projects/#{project}/locations/#{location}/autoscalingPolicies/#{autoscaling_policy}"
|
56
56
|
end),
|
57
|
-
"autoscaling_policy:project:region"
|
57
|
+
"autoscaling_policy:project:region" => (proc do |project:, region:, autoscaling_policy:|
|
58
58
|
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
59
|
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
60
60
|
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Dataproc::V1beta2::ClusterController::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 ClusterController clients
|
48
|
+
# ::Google::Cloud::Dataproc::V1beta2::ClusterController::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]
|
@@ -61,57 +60,39 @@ module Google
|
|
61
60
|
parent_config = while namespace.any?
|
62
61
|
parent_name = namespace.join "::"
|
63
62
|
parent_const = const_get parent_name
|
64
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
65
64
|
namespace.pop
|
66
65
|
end
|
67
66
|
default_config = Client::Configuration.new parent_config
|
68
67
|
|
69
68
|
default_config.rpcs.create_cluster.timeout = 300.0
|
70
69
|
default_config.rpcs.create_cluster.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.update_cluster.timeout = 300.0
|
78
74
|
default_config.rpcs.update_cluster.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.delete_cluster.timeout = 300.0
|
86
79
|
default_config.rpcs.delete_cluster.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.get_cluster.timeout = 300.0
|
94
84
|
default_config.rpcs.get_cluster.retry_policy = {
|
95
|
-
initial_delay: 0.1,
|
96
|
-
max_delay: 60.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: [13, 4, 14]
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [13, 4, 14]
|
99
86
|
}
|
100
87
|
|
101
88
|
default_config.rpcs.list_clusters.timeout = 300.0
|
102
89
|
default_config.rpcs.list_clusters.retry_policy = {
|
103
|
-
initial_delay: 0.1,
|
104
|
-
max_delay: 60.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [13, 4, 14]
|
90
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [13, 4, 14]
|
107
91
|
}
|
108
92
|
|
109
93
|
default_config.rpcs.diagnose_cluster.timeout = 300.0
|
110
94
|
default_config.rpcs.diagnose_cluster.retry_policy = {
|
111
|
-
initial_delay: 0.1,
|
112
|
-
max_delay: 60.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [14]
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
115
96
|
}
|
116
97
|
|
117
98
|
default_config
|
@@ -143,19 +124,15 @@ module Google
|
|
143
124
|
##
|
144
125
|
# Create a new ClusterController client object.
|
145
126
|
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
# To create a new ClusterController client with the default
|
149
|
-
# configuration:
|
127
|
+
# @example
|
150
128
|
#
|
151
|
-
#
|
129
|
+
# # Create a client using the default configuration
|
130
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.new
|
152
131
|
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
# config.timeout = 10.0
|
158
|
-
# end
|
132
|
+
# # Create a client using a custom configuration
|
133
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.new do |config|
|
134
|
+
# config.timeout = 10.0
|
135
|
+
# end
|
159
136
|
#
|
160
137
|
# @yield [config] Configure the ClusterController client.
|
161
138
|
# @yieldparam config [Client::Configuration]
|
@@ -175,14 +152,13 @@ module Google
|
|
175
152
|
|
176
153
|
# Create credentials
|
177
154
|
credentials = @config.credentials
|
178
|
-
# Use self-signed JWT if the
|
155
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
179
156
|
# but only if the default endpoint does not have a region prefix.
|
180
|
-
enable_self_signed_jwt = @config.
|
181
|
-
@config.endpoint == Client.configure.endpoint &&
|
157
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
182
158
|
!@config.endpoint.split(".").first.include?("-")
|
183
|
-
credentials ||= Credentials.default scope:
|
159
|
+
credentials ||= Credentials.default scope: @config.scope,
|
184
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
185
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
161
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
186
162
|
credentials = Credentials.new credentials, scope: @config.scope
|
187
163
|
end
|
188
164
|
@quota_project_id = @config.quota_project
|
@@ -214,7 +190,7 @@ module Google
|
|
214
190
|
##
|
215
191
|
# Creates a cluster in a project. The returned
|
216
192
|
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
217
|
-
#
|
193
|
+
# ClusterOperationMetadata.
|
218
194
|
#
|
219
195
|
# @overload create_cluster(request, options = nil)
|
220
196
|
# Pass arguments to `create_cluster` via a request object, either of type
|
@@ -279,7 +255,7 @@ module Google
|
|
279
255
|
|
280
256
|
header_params = {
|
281
257
|
"project_id" => request.project_id,
|
282
|
-
"region"
|
258
|
+
"region" => request.region
|
283
259
|
}
|
284
260
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
285
261
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
@@ -287,7 +263,9 @@ module Google
|
|
287
263
|
options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
|
288
264
|
metadata: metadata,
|
289
265
|
retry_policy: @config.rpcs.create_cluster.retry_policy
|
290
|
-
|
266
|
+
|
267
|
+
options.apply_defaults timeout: @config.timeout,
|
268
|
+
metadata: @config.metadata,
|
291
269
|
retry_policy: @config.retry_policy
|
292
270
|
|
293
271
|
@cluster_controller_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
@@ -302,7 +280,7 @@ module Google
|
|
302
280
|
##
|
303
281
|
# Updates a cluster in a project. The returned
|
304
282
|
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
305
|
-
#
|
283
|
+
# ClusterOperationMetadata.
|
306
284
|
#
|
307
285
|
# @overload update_cluster(request, options = nil)
|
308
286
|
# Pass arguments to `update_cluster` via a request object, either of type
|
@@ -439,8 +417,8 @@ module Google
|
|
439
417
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
440
418
|
|
441
419
|
header_params = {
|
442
|
-
"project_id"
|
443
|
-
"region"
|
420
|
+
"project_id" => request.project_id,
|
421
|
+
"region" => request.region,
|
444
422
|
"cluster_name" => request.cluster_name
|
445
423
|
}
|
446
424
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
@@ -449,7 +427,9 @@ module Google
|
|
449
427
|
options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
|
450
428
|
metadata: metadata,
|
451
429
|
retry_policy: @config.rpcs.update_cluster.retry_policy
|
452
|
-
|
430
|
+
|
431
|
+
options.apply_defaults timeout: @config.timeout,
|
432
|
+
metadata: @config.metadata,
|
453
433
|
retry_policy: @config.retry_policy
|
454
434
|
|
455
435
|
@cluster_controller_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
@@ -464,7 +444,7 @@ module Google
|
|
464
444
|
##
|
465
445
|
# Deletes a cluster in a project. The returned
|
466
446
|
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
467
|
-
#
|
447
|
+
# ClusterOperationMetadata.
|
468
448
|
#
|
469
449
|
# @overload delete_cluster(request, options = nil)
|
470
450
|
# Pass arguments to `delete_cluster` via a request object, either of type
|
@@ -531,8 +511,8 @@ module Google
|
|
531
511
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
532
512
|
|
533
513
|
header_params = {
|
534
|
-
"project_id"
|
535
|
-
"region"
|
514
|
+
"project_id" => request.project_id,
|
515
|
+
"region" => request.region,
|
536
516
|
"cluster_name" => request.cluster_name
|
537
517
|
}
|
538
518
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
@@ -541,7 +521,9 @@ module Google
|
|
541
521
|
options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
|
542
522
|
metadata: metadata,
|
543
523
|
retry_policy: @config.rpcs.delete_cluster.retry_policy
|
544
|
-
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.timeout,
|
526
|
+
metadata: @config.metadata,
|
545
527
|
retry_policy: @config.retry_policy
|
546
528
|
|
547
529
|
@cluster_controller_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
@@ -605,8 +587,8 @@ module Google
|
|
605
587
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
606
588
|
|
607
589
|
header_params = {
|
608
|
-
"project_id"
|
609
|
-
"region"
|
590
|
+
"project_id" => request.project_id,
|
591
|
+
"region" => request.region,
|
610
592
|
"cluster_name" => request.cluster_name
|
611
593
|
}
|
612
594
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
@@ -615,7 +597,9 @@ module Google
|
|
615
597
|
options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
|
616
598
|
metadata: metadata,
|
617
599
|
retry_policy: @config.rpcs.get_cluster.retry_policy
|
618
|
-
|
600
|
+
|
601
|
+
options.apply_defaults timeout: @config.timeout,
|
602
|
+
metadata: @config.metadata,
|
619
603
|
retry_policy: @config.retry_policy
|
620
604
|
|
621
605
|
@cluster_controller_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
@@ -701,7 +685,7 @@ module Google
|
|
701
685
|
|
702
686
|
header_params = {
|
703
687
|
"project_id" => request.project_id,
|
704
|
-
"region"
|
688
|
+
"region" => request.region
|
705
689
|
}
|
706
690
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
707
691
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
@@ -709,7 +693,9 @@ module Google
|
|
709
693
|
options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
|
710
694
|
metadata: metadata,
|
711
695
|
retry_policy: @config.rpcs.list_clusters.retry_policy
|
712
|
-
|
696
|
+
|
697
|
+
options.apply_defaults timeout: @config.timeout,
|
698
|
+
metadata: @config.metadata,
|
713
699
|
retry_policy: @config.retry_policy
|
714
700
|
|
715
701
|
@cluster_controller_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
@@ -724,7 +710,7 @@ module Google
|
|
724
710
|
##
|
725
711
|
# Gets cluster diagnostic information. The returned
|
726
712
|
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
727
|
-
#
|
713
|
+
# ClusterOperationMetadata.
|
728
714
|
# After the operation completes,
|
729
715
|
# {::Google::Longrunning::Operation#response Operation.response}
|
730
716
|
# contains
|
@@ -779,8 +765,8 @@ module Google
|
|
779
765
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
780
766
|
|
781
767
|
header_params = {
|
782
|
-
"project_id"
|
783
|
-
"region"
|
768
|
+
"project_id" => request.project_id,
|
769
|
+
"region" => request.region,
|
784
770
|
"cluster_name" => request.cluster_name
|
785
771
|
}
|
786
772
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
@@ -789,7 +775,9 @@ module Google
|
|
789
775
|
options.apply_defaults timeout: @config.rpcs.diagnose_cluster.timeout,
|
790
776
|
metadata: metadata,
|
791
777
|
retry_policy: @config.rpcs.diagnose_cluster.retry_policy
|
792
|
-
|
778
|
+
|
779
|
+
options.apply_defaults timeout: @config.timeout,
|
780
|
+
metadata: @config.metadata,
|
793
781
|
retry_policy: @config.retry_policy
|
794
782
|
|
795
783
|
@cluster_controller_stub.call_rpc :diagnose_cluster, request, options: options do |response, operation|
|
@@ -814,22 +802,21 @@ module Google
|
|
814
802
|
# Configuration can be applied globally to all clients, or to a single client
|
815
803
|
# on construction.
|
816
804
|
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
# To modify the global config, setting the timeout for create_cluster
|
820
|
-
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
821
|
-
#
|
822
|
-
# ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.configure do |config|
|
823
|
-
# config.timeout = 10.0
|
824
|
-
# config.rpcs.create_cluster.timeout = 20.0
|
825
|
-
# end
|
805
|
+
# @example
|
826
806
|
#
|
827
|
-
#
|
807
|
+
# # Modify the global config, setting the timeout for
|
808
|
+
# # create_cluster to 20 seconds,
|
809
|
+
# # and all remaining timeouts to 10 seconds.
|
810
|
+
# ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.configure do |config|
|
811
|
+
# config.timeout = 10.0
|
812
|
+
# config.rpcs.create_cluster.timeout = 20.0
|
813
|
+
# end
|
828
814
|
#
|
829
|
-
#
|
830
|
-
#
|
831
|
-
#
|
832
|
-
#
|
815
|
+
# # Apply the above configuration only to a new client.
|
816
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.new do |config|
|
817
|
+
# config.timeout = 10.0
|
818
|
+
# config.rpcs.create_cluster.timeout = 20.0
|
819
|
+
# end
|
833
820
|
#
|
834
821
|
# @!attribute [rw] endpoint
|
835
822
|
# The hostname or hostname:port of the service endpoint.
|
@@ -893,7 +880,7 @@ module Google
|
|
893
880
|
config_attr :scope, nil, ::String, ::Array, nil
|
894
881
|
config_attr :lib_name, nil, ::String, nil
|
895
882
|
config_attr :lib_version, nil, ::String, nil
|
896
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
883
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
897
884
|
config_attr :interceptors, nil, ::Array, nil
|
898
885
|
config_attr :timeout, nil, ::Numeric, nil
|
899
886
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -914,7 +901,7 @@ module Google
|
|
914
901
|
def rpcs
|
915
902
|
@rpcs ||= begin
|
916
903
|
parent_rpcs = nil
|
917
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
904
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
918
905
|
Rpcs.new parent_rpcs
|
919
906
|
end
|
920
907
|
end
|
@@ -970,17 +957,17 @@ module Google
|
|
970
957
|
|
971
958
|
# @private
|
972
959
|
def initialize parent_rpcs = nil
|
973
|
-
create_cluster_config = parent_rpcs
|
960
|
+
create_cluster_config = parent_rpcs.create_cluster if parent_rpcs.respond_to? :create_cluster
|
974
961
|
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
975
|
-
update_cluster_config = parent_rpcs
|
962
|
+
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
976
963
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
977
|
-
delete_cluster_config = parent_rpcs
|
964
|
+
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
978
965
|
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
979
|
-
get_cluster_config = parent_rpcs
|
966
|
+
get_cluster_config = parent_rpcs.get_cluster if parent_rpcs.respond_to? :get_cluster
|
980
967
|
@get_cluster = ::Gapic::Config::Method.new get_cluster_config
|
981
|
-
list_clusters_config = parent_rpcs
|
968
|
+
list_clusters_config = parent_rpcs.list_clusters if parent_rpcs.respond_to? :list_clusters
|
982
969
|
@list_clusters = ::Gapic::Config::Method.new list_clusters_config
|
983
|
-
diagnose_cluster_config = parent_rpcs
|
970
|
+
diagnose_cluster_config = parent_rpcs.diagnose_cluster if parent_rpcs.respond_to? :diagnose_cluster
|
984
971
|
@diagnose_cluster = ::Gapic::Config::Method.new diagnose_cluster_config
|
985
972
|
|
986
973
|
yield self if block_given?
|