google-cloud-dataproc-v1 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +18 -6
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/client.rb +711 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest.rb +54 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +6 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +51 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/client.rb +640 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/service_stub.rb +285 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest.rb +54 -0
- data/lib/google/cloud/dataproc/v1/batch_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/bindings_override.rb +257 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +43 -31
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/client.rb +1117 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/service_stub.rb +539 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +10 -9
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +22 -10
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/job_controller/rest/client.rb +929 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest/service_stub.rb +476 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest.rb +53 -0
- data/lib/google/cloud/dataproc/v1/job_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +13 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/client.rb +23 -9
- data/lib/google/cloud/dataproc/v1/node_group_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/client.rb +581 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/service_stub.rb +227 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +1 -0
- data/lib/google/cloud/dataproc/v1/rest.rb +43 -0
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +24 -1
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +28 -15
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/client.rb +983 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/service_stub.rb +518 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +6 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
- data/lib/google/cloud/dataproc/v1.rb +6 -1
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +8 -8
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +42 -14
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +60 -54
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/node_groups.rb +1 -1
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +3 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +174 -56
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +14 -11
- metadata +52 -7
@@ -0,0 +1,227 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/dataproc/v1/node_groups_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dataproc
|
24
|
+
module V1
|
25
|
+
module NodeGroupController
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the NodeGroupController service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: true,
|
40
|
+
raise_faraday_errors: false
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Baseline implementation for the create_node_group REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::CreateNodeGroupRequest]
|
47
|
+
# A request object representing the call parameters. Required.
|
48
|
+
# @param options [::Gapic::CallOptions]
|
49
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
50
|
+
#
|
51
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
52
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Longrunning::Operation]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def create_node_group request_pb, options = nil
|
58
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
59
|
+
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_node_group_request request_pb
|
61
|
+
query_string_params = if query_string_params.any?
|
62
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
63
|
+
else
|
64
|
+
{}
|
65
|
+
end
|
66
|
+
|
67
|
+
response = @client_stub.make_http_request(
|
68
|
+
verb,
|
69
|
+
uri: uri,
|
70
|
+
body: body || "",
|
71
|
+
params: query_string_params,
|
72
|
+
options: options
|
73
|
+
)
|
74
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
76
|
+
|
77
|
+
yield result, operation if block_given?
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Baseline implementation for the resize_node_group REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::ResizeNodeGroupRequest]
|
85
|
+
# A request object representing the call parameters. Required.
|
86
|
+
# @param options [::Gapic::CallOptions]
|
87
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
88
|
+
#
|
89
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
90
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Longrunning::Operation]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def resize_node_group request_pb, options = nil
|
96
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
97
|
+
|
98
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_resize_node_group_request request_pb
|
99
|
+
query_string_params = if query_string_params.any?
|
100
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
101
|
+
else
|
102
|
+
{}
|
103
|
+
end
|
104
|
+
|
105
|
+
response = @client_stub.make_http_request(
|
106
|
+
verb,
|
107
|
+
uri: uri,
|
108
|
+
body: body || "",
|
109
|
+
params: query_string_params,
|
110
|
+
options: options
|
111
|
+
)
|
112
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
113
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
114
|
+
|
115
|
+
yield result, operation if block_given?
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Baseline implementation for the get_node_group REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::GetNodeGroupRequest]
|
123
|
+
# A request object representing the call parameters. Required.
|
124
|
+
# @param options [::Gapic::CallOptions]
|
125
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
126
|
+
#
|
127
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
128
|
+
# @yieldparam result [::Google::Cloud::Dataproc::V1::NodeGroup]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Cloud::Dataproc::V1::NodeGroup]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def get_node_group request_pb, options = nil
|
134
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
135
|
+
|
136
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_node_group_request request_pb
|
137
|
+
query_string_params = if query_string_params.any?
|
138
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
139
|
+
else
|
140
|
+
{}
|
141
|
+
end
|
142
|
+
|
143
|
+
response = @client_stub.make_http_request(
|
144
|
+
verb,
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
options: options
|
149
|
+
)
|
150
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
151
|
+
result = ::Google::Cloud::Dataproc::V1::NodeGroup.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# @private
|
159
|
+
#
|
160
|
+
# GRPC transcoding helper method for the create_node_group REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::CreateNodeGroupRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def self.transcode_create_node_group_request request_pb
|
167
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
168
|
+
.with_bindings(
|
169
|
+
uri_method: :post,
|
170
|
+
uri_template: "/v1/{parent}/nodeGroups",
|
171
|
+
body: "node_group",
|
172
|
+
matches: [
|
173
|
+
["parent", %r{^projects/[^/]+/regions/[^/]+/clusters/[^/]+/?$}, false]
|
174
|
+
]
|
175
|
+
)
|
176
|
+
transcoder.transcode request_pb
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @private
|
181
|
+
#
|
182
|
+
# GRPC transcoding helper method for the resize_node_group REST call
|
183
|
+
#
|
184
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::ResizeNodeGroupRequest]
|
185
|
+
# A request object representing the call parameters. Required.
|
186
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
187
|
+
# Uri, Body, Query string parameters
|
188
|
+
def self.transcode_resize_node_group_request request_pb
|
189
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
190
|
+
.with_bindings(
|
191
|
+
uri_method: :post,
|
192
|
+
uri_template: "/v1/{name}:resize",
|
193
|
+
body: "*",
|
194
|
+
matches: [
|
195
|
+
["name", %r{^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+/?$}, false]
|
196
|
+
]
|
197
|
+
)
|
198
|
+
transcoder.transcode request_pb
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @private
|
203
|
+
#
|
204
|
+
# GRPC transcoding helper method for the get_node_group REST call
|
205
|
+
#
|
206
|
+
# @param request_pb [::Google::Cloud::Dataproc::V1::GetNodeGroupRequest]
|
207
|
+
# A request object representing the call parameters. Required.
|
208
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
209
|
+
# Uri, Body, Query string parameters
|
210
|
+
def self.transcode_get_node_group_request request_pb
|
211
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
212
|
+
.with_bindings(
|
213
|
+
uri_method: :get,
|
214
|
+
uri_template: "/v1/{name}",
|
215
|
+
matches: [
|
216
|
+
["name", %r{^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+/?$}, false]
|
217
|
+
]
|
218
|
+
)
|
219
|
+
transcoder.transcode request_pb
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/dataproc/v1/version"
|
24
|
+
require "google/cloud/dataproc/v1/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/dataproc/v1/node_group_controller/credentials"
|
27
|
+
require "google/cloud/dataproc/v1/node_group_controller/paths"
|
28
|
+
require "google/cloud/dataproc/v1/node_group_controller/rest/operations"
|
29
|
+
require "google/cloud/dataproc/v1/node_group_controller/rest/client"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Dataproc
|
34
|
+
module V1
|
35
|
+
##
|
36
|
+
# The `NodeGroupControllerService` provides methods to manage node groups
|
37
|
+
# of Compute Engine managed instances.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/dataproc/v1/node_group_controller/rest"
|
42
|
+
# client = ::Google::Cloud::Dataproc::V1::NodeGroupController::Rest::Client.new
|
43
|
+
#
|
44
|
+
module NodeGroupController
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
55
|
+
require "google/cloud/dataproc/v1/node_group_controller/rest/helpers" if ::File.file? helper_path
|
@@ -26,6 +26,7 @@ require "google/cloud/dataproc/v1/node_group_controller/credentials"
|
|
26
26
|
require "google/cloud/dataproc/v1/node_group_controller/paths"
|
27
27
|
require "google/cloud/dataproc/v1/node_group_controller/operations"
|
28
28
|
require "google/cloud/dataproc/v1/node_group_controller/client"
|
29
|
+
require "google/cloud/dataproc/v1/node_group_controller/rest"
|
29
30
|
|
30
31
|
module Google
|
31
32
|
module Cloud
|
@@ -40,6 +41,11 @@ module Google
|
|
40
41
|
# require "google/cloud/dataproc/v1/node_group_controller"
|
41
42
|
# client = ::Google::Cloud::Dataproc::V1::NodeGroupController::Client.new
|
42
43
|
#
|
44
|
+
# @example Load this service and instantiate a REST client
|
45
|
+
#
|
46
|
+
# require "google/cloud/dataproc/v1/node_group_controller/rest"
|
47
|
+
# client = ::Google::Cloud::Dataproc::V1::NodeGroupController::Rest::Client.new
|
48
|
+
#
|
43
49
|
module NodeGroupController
|
44
50
|
end
|
45
51
|
end
|
@@ -43,6 +43,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
43
43
|
optional :description, :string, 12
|
44
44
|
map :labels, :string, :string, 13
|
45
45
|
repeated :warnings, :string, 14
|
46
|
+
repeated :child_operation_ids, :string, 15
|
46
47
|
end
|
47
48
|
add_message "google.cloud.dataproc.v1.NodeGroupOperationMetadata" do
|
48
49
|
optional :node_group_id, :string, 1
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/dataproc/v1/autoscaling_policy_service/rest"
|
20
|
+
require "google/cloud/dataproc/v1/batch_controller/rest"
|
21
|
+
require "google/cloud/dataproc/v1/cluster_controller/rest"
|
22
|
+
require "google/cloud/dataproc/v1/job_controller/rest"
|
23
|
+
require "google/cloud/dataproc/v1/node_group_controller/rest"
|
24
|
+
require "google/cloud/dataproc/v1/workflow_template_service/rest"
|
25
|
+
require "google/cloud/dataproc/v1/bindings_override"
|
26
|
+
require "google/cloud/dataproc/v1/version"
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module Dataproc
|
31
|
+
##
|
32
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
33
|
+
#
|
34
|
+
# @example
|
35
|
+
#
|
36
|
+
# require "google/cloud/dataproc/v1/rest"
|
37
|
+
# client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Rest::Client.new
|
38
|
+
#
|
39
|
+
module V1
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -4,6 +4,9 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
7
10
|
|
8
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
12
|
add_file("google/cloud/dataproc/v1/shared.proto", :syntax => :proto3) do
|
@@ -20,6 +23,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
23
|
optional :service_account, :string, 2
|
21
24
|
repeated :network_tags, :string, 6
|
22
25
|
optional :kms_key, :string, 7
|
26
|
+
optional :ttl, :message, 9, "google.protobuf.Duration"
|
27
|
+
optional :staging_bucket, :string, 10
|
23
28
|
oneof :network do
|
24
29
|
optional :network_uri, :string, 4
|
25
30
|
optional :subnetwork_uri, :string, 5
|
@@ -36,6 +41,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
36
41
|
map :endpoints, :string, :string, 1
|
37
42
|
optional :output_uri, :string, 2
|
38
43
|
optional :diagnostic_output_uri, :string, 3
|
44
|
+
optional :approximate_usage, :message, 6, "google.cloud.dataproc.v1.UsageMetrics"
|
45
|
+
optional :current_usage, :message, 7, "google.cloud.dataproc.v1.UsageSnapshot"
|
46
|
+
end
|
47
|
+
add_message "google.cloud.dataproc.v1.UsageMetrics" do
|
48
|
+
optional :milli_dcu_seconds, :int64, 1
|
49
|
+
optional :shuffle_storage_gb_seconds, :int64, 2
|
50
|
+
end
|
51
|
+
add_message "google.cloud.dataproc.v1.UsageSnapshot" do
|
52
|
+
optional :milli_dcu, :int64, 1
|
53
|
+
optional :shuffle_storage_gb, :int64, 2
|
54
|
+
optional :snapshot_time, :message, 3, "google.protobuf.Timestamp"
|
39
55
|
end
|
40
56
|
add_message "google.cloud.dataproc.v1.GkeClusterConfig" do
|
41
57
|
optional :gke_cluster_target, :string, 2
|
@@ -71,14 +87,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
71
87
|
end
|
72
88
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig" do
|
73
89
|
optional :machine_type, :string, 1
|
74
|
-
optional :preemptible, :bool, 10
|
75
90
|
optional :local_ssd_count, :int32, 7
|
91
|
+
optional :preemptible, :bool, 10
|
76
92
|
repeated :accelerators, :message, 11, "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig"
|
77
93
|
optional :min_cpu_platform, :string, 13
|
94
|
+
optional :boot_disk_kms_key, :string, 23
|
95
|
+
optional :spot, :bool, 32
|
78
96
|
end
|
79
97
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig" do
|
80
98
|
optional :accelerator_count, :int64, 1
|
81
99
|
optional :accelerator_type, :string, 2
|
100
|
+
optional :gpu_partition_size, :string, 3
|
82
101
|
end
|
83
102
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig" do
|
84
103
|
optional :min_node_count, :int32, 2
|
@@ -92,8 +111,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
92
111
|
value :FLINK, 14
|
93
112
|
value :HBASE, 11
|
94
113
|
value :HIVE_WEBHCAT, 3
|
114
|
+
value :HUDI, 18
|
95
115
|
value :JUPYTER, 1
|
96
116
|
value :PRESTO, 6
|
117
|
+
value :TRINO, 17
|
97
118
|
value :RANGER, 12
|
98
119
|
value :SOLR, 10
|
99
120
|
value :ZEPPELIN, 4
|
@@ -117,6 +138,8 @@ module Google
|
|
117
138
|
SparkHistoryServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkHistoryServerConfig").msgclass
|
118
139
|
PeripheralsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.PeripheralsConfig").msgclass
|
119
140
|
RuntimeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.RuntimeInfo").msgclass
|
141
|
+
UsageMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UsageMetrics").msgclass
|
142
|
+
UsageSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UsageSnapshot").msgclass
|
120
143
|
GkeClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GkeClusterConfig").msgclass
|
121
144
|
KubernetesClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.KubernetesClusterConfig").msgclass
|
122
145
|
KubernetesSoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.KubernetesSoftwareConfig").msgclass
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/dataproc/v1/workflow_templates_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -175,6 +176,12 @@ module Google
|
|
175
176
|
config.endpoint = @config.endpoint
|
176
177
|
end
|
177
178
|
|
179
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
180
|
+
config.credentials = credentials
|
181
|
+
config.quota_project = @quota_project_id
|
182
|
+
config.endpoint = @config.endpoint
|
183
|
+
end
|
184
|
+
|
178
185
|
@workflow_template_service_stub = ::Gapic::ServiceStub.new(
|
179
186
|
::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Stub,
|
180
187
|
credentials: credentials,
|
@@ -191,6 +198,13 @@ module Google
|
|
191
198
|
#
|
192
199
|
attr_reader :operations_client
|
193
200
|
|
201
|
+
##
|
202
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
203
|
+
#
|
204
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
205
|
+
#
|
206
|
+
attr_reader :iam_policy_client
|
207
|
+
|
194
208
|
# Service calls
|
195
209
|
|
196
210
|
##
|
@@ -480,14 +494,14 @@ module Google
|
|
480
494
|
# # Call the instantiate_workflow_template method.
|
481
495
|
# result = client.instantiate_workflow_template request
|
482
496
|
#
|
483
|
-
# # The returned object is of type Gapic::Operation. You can use
|
484
|
-
# #
|
485
|
-
# #
|
497
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
498
|
+
# # check the status of an operation, cancel it, or wait for results.
|
499
|
+
# # Here is how to wait for a response.
|
486
500
|
# result.wait_until_done! timeout: 60
|
487
501
|
# if result.response?
|
488
502
|
# p result.response
|
489
503
|
# else
|
490
|
-
# puts "
|
504
|
+
# puts "No response received."
|
491
505
|
# end
|
492
506
|
#
|
493
507
|
def instantiate_workflow_template request, options = nil
|
@@ -536,7 +550,8 @@ module Google
|
|
536
550
|
# Instantiates a template and begins execution.
|
537
551
|
#
|
538
552
|
# This method is equivalent to executing the sequence
|
539
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
553
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
554
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
540
555
|
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
541
556
|
#
|
542
557
|
# The returned Operation can be used to track execution of
|
@@ -617,14 +632,14 @@ module Google
|
|
617
632
|
# # Call the instantiate_inline_workflow_template method.
|
618
633
|
# result = client.instantiate_inline_workflow_template request
|
619
634
|
#
|
620
|
-
# # The returned object is of type Gapic::Operation. You can use
|
621
|
-
# #
|
622
|
-
# #
|
635
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
636
|
+
# # check the status of an operation, cancel it, or wait for results.
|
637
|
+
# # Here is how to wait for a response.
|
623
638
|
# result.wait_until_done! timeout: 60
|
624
639
|
# if result.response?
|
625
640
|
# p result.response
|
626
641
|
# else
|
627
|
-
# puts "
|
642
|
+
# puts "No response received."
|
628
643
|
# end
|
629
644
|
#
|
630
645
|
def instantiate_inline_workflow_template request, options = nil
|
@@ -812,13 +827,11 @@ module Google
|
|
812
827
|
# # Call the list_workflow_templates method.
|
813
828
|
# result = client.list_workflow_templates request
|
814
829
|
#
|
815
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
816
|
-
# #
|
817
|
-
#
|
818
|
-
# # methods are also available for managing paging directly.
|
819
|
-
# result.each do |response|
|
830
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
831
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
832
|
+
# result.each do |item|
|
820
833
|
# # Each element is of type ::Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
821
|
-
# p
|
834
|
+
# p item
|
822
835
|
# end
|
823
836
|
#
|
824
837
|
def list_workflow_templates request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|