google-apis-dataproc_v1beta2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2733 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DataprocV1beta2
23
+ # Cloud Dataproc API
24
+ #
25
+ # Manages Hadoop-based clusters and jobs on Google Cloud Platform.
26
+ #
27
+ # @example
28
+ # require 'google/apis/dataproc_v1beta2'
29
+ #
30
+ # Dataproc = Google::Apis::DataprocV1beta2 # Alias the module
31
+ # service = Dataproc::DataprocService.new
32
+ #
33
+ # @see https://cloud.google.com/dataproc/
34
+ class DataprocService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://dataproc.googleapis.com/', '',
47
+ client_name: 'google-apis-dataproc_v1beta2',
48
+ client_version: Google::Apis::DataprocV1beta2::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Creates new autoscaling policy.
53
+ # @param [String] parent
54
+ # Required. The "resource name" of the region or location, as described in https:
55
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
56
+ # autoscalingPolicies.create, the resource name has the following format:
57
+ # projects/`project_id`/regions/`region` For projects.locations.
58
+ # autoscalingPolicies.create, the resource name has the following format:
59
+ # projects/`project_id`/locations/`location`
60
+ # @param [Google::Apis::DataprocV1beta2::AutoscalingPolicy] autoscaling_policy_object
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def create_project_location_autoscaling_policy(parent, autoscaling_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'v1beta2/{+parent}/autoscalingPolicies', options)
80
+ command.request_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
81
+ command.request_object = autoscaling_policy_object
82
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
83
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
84
+ command.params['parent'] = parent unless parent.nil?
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ execute_or_queue_command(command, &block)
88
+ end
89
+
90
+ # Deletes an autoscaling policy. It is an error to delete an autoscaling policy
91
+ # that is in use by one or more clusters.
92
+ # @param [String] name
93
+ # Required. The "resource name" of the autoscaling policy, as described in https:
94
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
95
+ # autoscalingPolicies.delete, the resource name of the policy has the following
96
+ # format: projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id`
97
+ # For projects.locations.autoscalingPolicies.delete, the resource name of the
98
+ # policy has the following format: projects/`project_id`/locations/`location`/
99
+ # autoscalingPolicies/`policy_id`
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::DataprocV1beta2::Empty]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def delete_project_location_autoscaling_policy(name, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:delete, 'v1beta2/{+name}', options)
119
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
120
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
121
+ command.params['name'] = name unless name.nil?
122
+ command.query['fields'] = fields unless fields.nil?
123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
124
+ execute_or_queue_command(command, &block)
125
+ end
126
+
127
+ # Retrieves autoscaling policy.
128
+ # @param [String] name
129
+ # Required. The "resource name" of the autoscaling policy, as described in https:
130
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
131
+ # autoscalingPolicies.get, the resource name of the policy has the following
132
+ # format: projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id`
133
+ # For projects.locations.autoscalingPolicies.get, the resource name of the
134
+ # policy has the following format: projects/`project_id`/locations/`location`/
135
+ # autoscalingPolicies/`policy_id`
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def get_project_location_autoscaling_policy(name, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
155
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
156
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
157
+ command.params['name'] = name unless name.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
163
+ # Gets the access control policy for a resource. Returns an empty policy if the
164
+ # resource exists and does not have a policy set.
165
+ # @param [String] resource
166
+ # REQUIRED: The resource for which the policy is being requested. See the
167
+ # operation documentation for the appropriate value for this field.
168
+ # @param [Fixnum] options_requested_policy_version
169
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
170
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
171
+ # with any conditional bindings must specify version 3. Policies without any
172
+ # conditional bindings may specify any valid value or leave the field unset.To
173
+ # learn which resources support conditions in their IAM policies, see the IAM
174
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
175
+ # @param [String] fields
176
+ # Selector specifying which fields to include in a partial response.
177
+ # @param [String] quota_user
178
+ # Available to use for quota purposes for server-side applications. Can be any
179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
180
+ # @param [Google::Apis::RequestOptions] options
181
+ # Request-specific options
182
+ #
183
+ # @yield [result, err] Result & error if block supplied
184
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
185
+ # @yieldparam err [StandardError] error object if request failed
186
+ #
187
+ # @return [Google::Apis::DataprocV1beta2::Policy]
188
+ #
189
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
190
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
191
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
192
+ def get_project_location_autoscaling_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
193
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
194
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
195
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
196
+ command.params['resource'] = resource unless resource.nil?
197
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
198
+ command.query['fields'] = fields unless fields.nil?
199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
200
+ execute_or_queue_command(command, &block)
201
+ end
202
+
203
+ # Lists autoscaling policies in the project.
204
+ # @param [String] parent
205
+ # Required. The "resource name" of the region or location, as described in https:
206
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
207
+ # autoscalingPolicies.list, the resource name of the region has the following
208
+ # format: projects/`project_id`/regions/`region` For projects.locations.
209
+ # autoscalingPolicies.list, the resource name of the location has the following
210
+ # format: projects/`project_id`/locations/`location`
211
+ # @param [Fixnum] page_size
212
+ # Optional. The maximum number of results to return in each response. Must be
213
+ # less than or equal to 1000. Defaults to 100.
214
+ # @param [String] page_token
215
+ # Optional. The page token, returned by a previous call, to request the next
216
+ # page of results.
217
+ # @param [String] fields
218
+ # Selector specifying which fields to include in a partial response.
219
+ # @param [String] quota_user
220
+ # Available to use for quota purposes for server-side applications. Can be any
221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
222
+ # @param [Google::Apis::RequestOptions] options
223
+ # Request-specific options
224
+ #
225
+ # @yield [result, err] Result & error if block supplied
226
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse] parsed result object
227
+ # @yieldparam err [StandardError] error object if request failed
228
+ #
229
+ # @return [Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse]
230
+ #
231
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
232
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
233
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
234
+ def list_project_location_autoscaling_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
235
+ command = make_simple_command(:get, 'v1beta2/{+parent}/autoscalingPolicies', options)
236
+ command.response_representation = Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse::Representation
237
+ command.response_class = Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse
238
+ command.params['parent'] = parent unless parent.nil?
239
+ command.query['pageSize'] = page_size unless page_size.nil?
240
+ command.query['pageToken'] = page_token unless page_token.nil?
241
+ command.query['fields'] = fields unless fields.nil?
242
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
243
+ execute_or_queue_command(command, &block)
244
+ end
245
+
246
+ # Sets the access control policy on the specified resource. Replaces any
247
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
248
+ # errors.
249
+ # @param [String] resource
250
+ # REQUIRED: The resource for which the policy is being specified. See the
251
+ # operation documentation for the appropriate value for this field.
252
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
253
+ # @param [String] fields
254
+ # Selector specifying which fields to include in a partial response.
255
+ # @param [String] quota_user
256
+ # Available to use for quota purposes for server-side applications. Can be any
257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
258
+ # @param [Google::Apis::RequestOptions] options
259
+ # Request-specific options
260
+ #
261
+ # @yield [result, err] Result & error if block supplied
262
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
263
+ # @yieldparam err [StandardError] error object if request failed
264
+ #
265
+ # @return [Google::Apis::DataprocV1beta2::Policy]
266
+ #
267
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
268
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
269
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
270
+ def set_project_location_autoscaling_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
271
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
272
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
273
+ command.request_object = set_iam_policy_request_object
274
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
275
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
276
+ command.params['resource'] = resource unless resource.nil?
277
+ command.query['fields'] = fields unless fields.nil?
278
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
279
+ execute_or_queue_command(command, &block)
280
+ end
281
+
282
+ # Returns permissions that a caller has on the specified resource. If the
283
+ # resource does not exist, this will return an empty set of permissions, not a
284
+ # NOT_FOUND error.Note: This operation is designed to be used for building
285
+ # permission-aware UIs and command-line tools, not for authorization checking.
286
+ # This operation may "fail open" without warning.
287
+ # @param [String] resource
288
+ # REQUIRED: The resource for which the policy detail is being requested. See the
289
+ # operation documentation for the appropriate value for this field.
290
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
291
+ # @param [String] fields
292
+ # Selector specifying which fields to include in a partial response.
293
+ # @param [String] quota_user
294
+ # Available to use for quota purposes for server-side applications. Can be any
295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
296
+ # @param [Google::Apis::RequestOptions] options
297
+ # Request-specific options
298
+ #
299
+ # @yield [result, err] Result & error if block supplied
300
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
301
+ # @yieldparam err [StandardError] error object if request failed
302
+ #
303
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
304
+ #
305
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
306
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
307
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
308
+ def test_project_location_autoscaling_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
309
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
310
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
311
+ command.request_object = test_iam_permissions_request_object
312
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
313
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
314
+ command.params['resource'] = resource unless resource.nil?
315
+ command.query['fields'] = fields unless fields.nil?
316
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
317
+ execute_or_queue_command(command, &block)
318
+ end
319
+
320
+ # Updates (replaces) autoscaling policy.Disabled check for update_mask, because
321
+ # all updates will be full replacements.
322
+ # @param [String] name
323
+ # Output only. The "resource name" of the autoscaling policy, as described in
324
+ # https://cloud.google.com/apis/design/resource_names. For projects.regions.
325
+ # autoscalingPolicies, the resource name of the policy has the following format:
326
+ # projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id` For
327
+ # projects.locations.autoscalingPolicies, the resource name of the policy has
328
+ # the following format: projects/`project_id`/locations/`location`/
329
+ # autoscalingPolicies/`policy_id`
330
+ # @param [Google::Apis::DataprocV1beta2::AutoscalingPolicy] autoscaling_policy_object
331
+ # @param [String] fields
332
+ # Selector specifying which fields to include in a partial response.
333
+ # @param [String] quota_user
334
+ # Available to use for quota purposes for server-side applications. Can be any
335
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
336
+ # @param [Google::Apis::RequestOptions] options
337
+ # Request-specific options
338
+ #
339
+ # @yield [result, err] Result & error if block supplied
340
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
341
+ # @yieldparam err [StandardError] error object if request failed
342
+ #
343
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
344
+ #
345
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
346
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
347
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
348
+ def update_project_location_autoscaling_policy(name, autoscaling_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
349
+ command = make_simple_command(:put, 'v1beta2/{+name}', options)
350
+ command.request_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
351
+ command.request_object = autoscaling_policy_object
352
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
353
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
354
+ command.params['name'] = name unless name.nil?
355
+ command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
357
+ execute_or_queue_command(command, &block)
358
+ end
359
+
360
+ # Creates new workflow template.
361
+ # @param [String] parent
362
+ # Required. The resource name of the region or location, as described in https://
363
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
364
+ # workflowTemplates,create, the resource name of the region has the following
365
+ # format: projects/`project_id`/regions/`region` For projects.locations.
366
+ # workflowTemplates.create, the resource name of the location has the following
367
+ # format: projects/`project_id`/locations/`location`
368
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
369
+ # @param [String] fields
370
+ # Selector specifying which fields to include in a partial response.
371
+ # @param [String] quota_user
372
+ # Available to use for quota purposes for server-side applications. Can be any
373
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
374
+ # @param [Google::Apis::RequestOptions] options
375
+ # Request-specific options
376
+ #
377
+ # @yield [result, err] Result & error if block supplied
378
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
379
+ # @yieldparam err [StandardError] error object if request failed
380
+ #
381
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
382
+ #
383
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
384
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
385
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
386
+ def create_project_location_workflow_template(parent, workflow_template_object = nil, fields: nil, quota_user: nil, options: nil, &block)
387
+ command = make_simple_command(:post, 'v1beta2/{+parent}/workflowTemplates', options)
388
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
389
+ command.request_object = workflow_template_object
390
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
391
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
392
+ command.params['parent'] = parent unless parent.nil?
393
+ command.query['fields'] = fields unless fields.nil?
394
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
395
+ execute_or_queue_command(command, &block)
396
+ end
397
+
398
+ # Deletes a workflow template. It does not cancel in-progress workflows.
399
+ # @param [String] name
400
+ # Required. The resource name of the workflow template, as described in https://
401
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
402
+ # workflowTemplates.delete, the resource name of the template has the following
403
+ # format: projects/`project_id`/regions/`region`/workflowTemplates/`template_id`
404
+ # For projects.locations.workflowTemplates.instantiate, the resource name of the
405
+ # template has the following format: projects/`project_id`/locations/`location`/
406
+ # workflowTemplates/`template_id`
407
+ # @param [Fixnum] version
408
+ # Optional. The version of workflow template to delete. If specified, will only
409
+ # delete the template if the current server version matches specified version.
410
+ # @param [String] fields
411
+ # Selector specifying which fields to include in a partial response.
412
+ # @param [String] quota_user
413
+ # Available to use for quota purposes for server-side applications. Can be any
414
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
415
+ # @param [Google::Apis::RequestOptions] options
416
+ # Request-specific options
417
+ #
418
+ # @yield [result, err] Result & error if block supplied
419
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
420
+ # @yieldparam err [StandardError] error object if request failed
421
+ #
422
+ # @return [Google::Apis::DataprocV1beta2::Empty]
423
+ #
424
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
425
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
426
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
427
+ def delete_project_location_workflow_template(name, version: nil, fields: nil, quota_user: nil, options: nil, &block)
428
+ command = make_simple_command(:delete, 'v1beta2/{+name}', options)
429
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
430
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
431
+ command.params['name'] = name unless name.nil?
432
+ command.query['version'] = version unless version.nil?
433
+ command.query['fields'] = fields unless fields.nil?
434
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
435
+ execute_or_queue_command(command, &block)
436
+ end
437
+
438
+ # Retrieves the latest workflow template.Can retrieve previously instantiated
439
+ # template by specifying optional version parameter.
440
+ # @param [String] name
441
+ # Required. The resource name of the workflow template, as described in https://
442
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
443
+ # workflowTemplates.get, the resource name of the template has the following
444
+ # format: projects/`project_id`/regions/`region`/workflowTemplates/`template_id`
445
+ # For projects.locations.workflowTemplates.get, the resource name of the
446
+ # template has the following format: projects/`project_id`/locations/`location`/
447
+ # workflowTemplates/`template_id`
448
+ # @param [Fixnum] version
449
+ # Optional. The version of workflow template to retrieve. Only previously
450
+ # instantiated versions can be retrieved.If unspecified, retrieves the current
451
+ # version.
452
+ # @param [String] fields
453
+ # Selector specifying which fields to include in a partial response.
454
+ # @param [String] quota_user
455
+ # Available to use for quota purposes for server-side applications. Can be any
456
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
457
+ # @param [Google::Apis::RequestOptions] options
458
+ # Request-specific options
459
+ #
460
+ # @yield [result, err] Result & error if block supplied
461
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
462
+ # @yieldparam err [StandardError] error object if request failed
463
+ #
464
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
465
+ #
466
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
467
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
468
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
469
+ def get_project_location_workflow_template(name, version: nil, fields: nil, quota_user: nil, options: nil, &block)
470
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
471
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
472
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
473
+ command.params['name'] = name unless name.nil?
474
+ command.query['version'] = version unless version.nil?
475
+ command.query['fields'] = fields unless fields.nil?
476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
477
+ execute_or_queue_command(command, &block)
478
+ end
479
+
480
+ # Gets the access control policy for a resource. Returns an empty policy if the
481
+ # resource exists and does not have a policy set.
482
+ # @param [String] resource
483
+ # REQUIRED: The resource for which the policy is being requested. See the
484
+ # operation documentation for the appropriate value for this field.
485
+ # @param [Fixnum] options_requested_policy_version
486
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
487
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
488
+ # with any conditional bindings must specify version 3. Policies without any
489
+ # conditional bindings may specify any valid value or leave the field unset.To
490
+ # learn which resources support conditions in their IAM policies, see the IAM
491
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
492
+ # @param [String] fields
493
+ # Selector specifying which fields to include in a partial response.
494
+ # @param [String] quota_user
495
+ # Available to use for quota purposes for server-side applications. Can be any
496
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
497
+ # @param [Google::Apis::RequestOptions] options
498
+ # Request-specific options
499
+ #
500
+ # @yield [result, err] Result & error if block supplied
501
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
502
+ # @yieldparam err [StandardError] error object if request failed
503
+ #
504
+ # @return [Google::Apis::DataprocV1beta2::Policy]
505
+ #
506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
509
+ def get_project_location_workflow_template_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
510
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
511
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
512
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
513
+ command.params['resource'] = resource unless resource.nil?
514
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Instantiates a template and begins execution.The returned Operation can be
521
+ # used to track execution of workflow by polling operations.get. The Operation
522
+ # will complete when entire workflow is finished.The running workflow can be
523
+ # aborted via operations.cancel. This will cause any inflight jobs to be
524
+ # cancelled and workflow-owned clusters to be deleted.The Operation.metadata
525
+ # will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
526
+ # google.cloud.dataproc.v1beta2#workflowmetadata). Also see Using
527
+ # WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/
528
+ # debugging#using_workflowmetadata).On successful completion, Operation.response
529
+ # will be Empty.
530
+ # @param [String] name
531
+ # Required. The resource name of the workflow template, as described in https://
532
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
533
+ # workflowTemplates.instantiate, the resource name of the template has the
534
+ # following format: projects/`project_id`/regions/`region`/workflowTemplates/`
535
+ # template_id` For projects.locations.workflowTemplates.instantiate, the
536
+ # resource name of the template has the following format: projects/`project_id`/
537
+ # locations/`location`/workflowTemplates/`template_id`
538
+ # @param [Google::Apis::DataprocV1beta2::InstantiateWorkflowTemplateRequest] instantiate_workflow_template_request_object
539
+ # @param [String] fields
540
+ # Selector specifying which fields to include in a partial response.
541
+ # @param [String] quota_user
542
+ # Available to use for quota purposes for server-side applications. Can be any
543
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
544
+ # @param [Google::Apis::RequestOptions] options
545
+ # Request-specific options
546
+ #
547
+ # @yield [result, err] Result & error if block supplied
548
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
549
+ # @yieldparam err [StandardError] error object if request failed
550
+ #
551
+ # @return [Google::Apis::DataprocV1beta2::Operation]
552
+ #
553
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
554
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
555
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
556
+ def instantiate_project_location_workflow_template(name, instantiate_workflow_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
557
+ command = make_simple_command(:post, 'v1beta2/{+name}:instantiate', options)
558
+ command.request_representation = Google::Apis::DataprocV1beta2::InstantiateWorkflowTemplateRequest::Representation
559
+ command.request_object = instantiate_workflow_template_request_object
560
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
561
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
562
+ command.params['name'] = name unless name.nil?
563
+ command.query['fields'] = fields unless fields.nil?
564
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
565
+ execute_or_queue_command(command, &block)
566
+ end
567
+
568
+ # Instantiates a template and begins execution.This method is equivalent to
569
+ # executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate,
570
+ # DeleteWorkflowTemplate.The returned Operation can be used to track execution
571
+ # of workflow by polling operations.get. The Operation will complete when entire
572
+ # workflow is finished.The running workflow can be aborted via operations.cancel.
573
+ # This will cause any inflight jobs to be cancelled and workflow-owned clusters
574
+ # to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.
575
+ # google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#
576
+ # workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/
577
+ # dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
578
+ # successful completion, Operation.response will be Empty.
579
+ # @param [String] parent
580
+ # Required. The resource name of the region or location, as described in https://
581
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
582
+ # workflowTemplates,instantiateinline, the resource name of the region has the
583
+ # following format: projects/`project_id`/regions/`region` For projects.
584
+ # locations.workflowTemplates.instantiateinline, the resource name of the
585
+ # location has the following format: projects/`project_id`/locations/`location`
586
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
587
+ # @param [String] instance_id
588
+ # Deprecated. Please use request_id field instead.
589
+ # @param [String] request_id
590
+ # Optional. A tag that prevents multiple concurrent workflow instances with the
591
+ # same tag from running. This mitigates risk of concurrent instances started due
592
+ # to retries.It is recommended to always set this value to a UUID (https://en.
593
+ # wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only
594
+ # letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The
595
+ # maximum length is 40 characters.
596
+ # @param [String] fields
597
+ # Selector specifying which fields to include in a partial response.
598
+ # @param [String] quota_user
599
+ # Available to use for quota purposes for server-side applications. Can be any
600
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
601
+ # @param [Google::Apis::RequestOptions] options
602
+ # Request-specific options
603
+ #
604
+ # @yield [result, err] Result & error if block supplied
605
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
606
+ # @yieldparam err [StandardError] error object if request failed
607
+ #
608
+ # @return [Google::Apis::DataprocV1beta2::Operation]
609
+ #
610
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
611
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
612
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
613
+ def instantiate_project_location_workflow_template_inline(parent, workflow_template_object = nil, instance_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
614
+ command = make_simple_command(:post, 'v1beta2/{+parent}/workflowTemplates:instantiateInline', options)
615
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
616
+ command.request_object = workflow_template_object
617
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
618
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
619
+ command.params['parent'] = parent unless parent.nil?
620
+ command.query['instanceId'] = instance_id unless instance_id.nil?
621
+ command.query['requestId'] = request_id unless request_id.nil?
622
+ command.query['fields'] = fields unless fields.nil?
623
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
624
+ execute_or_queue_command(command, &block)
625
+ end
626
+
627
+ # Lists workflows that match the specified filter in the request.
628
+ # @param [String] parent
629
+ # Required. The resource name of the region or location, as described in https://
630
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
631
+ # workflowTemplates,list, the resource name of the region has the following
632
+ # format: projects/`project_id`/regions/`region` For projects.locations.
633
+ # workflowTemplates.list, the resource name of the location has the following
634
+ # format: projects/`project_id`/locations/`location`
635
+ # @param [Fixnum] page_size
636
+ # Optional. The maximum number of results to return in each response.
637
+ # @param [String] page_token
638
+ # Optional. The page token, returned by a previous call, to request the next
639
+ # page of results.
640
+ # @param [String] fields
641
+ # Selector specifying which fields to include in a partial response.
642
+ # @param [String] quota_user
643
+ # Available to use for quota purposes for server-side applications. Can be any
644
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
645
+ # @param [Google::Apis::RequestOptions] options
646
+ # Request-specific options
647
+ #
648
+ # @yield [result, err] Result & error if block supplied
649
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse] parsed result object
650
+ # @yieldparam err [StandardError] error object if request failed
651
+ #
652
+ # @return [Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse]
653
+ #
654
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
655
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
656
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
657
+ def list_project_location_workflow_templates(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
658
+ command = make_simple_command(:get, 'v1beta2/{+parent}/workflowTemplates', options)
659
+ command.response_representation = Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse::Representation
660
+ command.response_class = Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse
661
+ command.params['parent'] = parent unless parent.nil?
662
+ command.query['pageSize'] = page_size unless page_size.nil?
663
+ command.query['pageToken'] = page_token unless page_token.nil?
664
+ command.query['fields'] = fields unless fields.nil?
665
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
666
+ execute_or_queue_command(command, &block)
667
+ end
668
+
669
+ # Sets the access control policy on the specified resource. Replaces any
670
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
671
+ # errors.
672
+ # @param [String] resource
673
+ # REQUIRED: The resource for which the policy is being specified. See the
674
+ # operation documentation for the appropriate value for this field.
675
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
676
+ # @param [String] fields
677
+ # Selector specifying which fields to include in a partial response.
678
+ # @param [String] quota_user
679
+ # Available to use for quota purposes for server-side applications. Can be any
680
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
681
+ # @param [Google::Apis::RequestOptions] options
682
+ # Request-specific options
683
+ #
684
+ # @yield [result, err] Result & error if block supplied
685
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
686
+ # @yieldparam err [StandardError] error object if request failed
687
+ #
688
+ # @return [Google::Apis::DataprocV1beta2::Policy]
689
+ #
690
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
691
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
692
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
693
+ def set_project_location_workflow_template_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
694
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
695
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
696
+ command.request_object = set_iam_policy_request_object
697
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
698
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
699
+ command.params['resource'] = resource unless resource.nil?
700
+ command.query['fields'] = fields unless fields.nil?
701
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
702
+ execute_or_queue_command(command, &block)
703
+ end
704
+
705
+ # Returns permissions that a caller has on the specified resource. If the
706
+ # resource does not exist, this will return an empty set of permissions, not a
707
+ # NOT_FOUND error.Note: This operation is designed to be used for building
708
+ # permission-aware UIs and command-line tools, not for authorization checking.
709
+ # This operation may "fail open" without warning.
710
+ # @param [String] resource
711
+ # REQUIRED: The resource for which the policy detail is being requested. See the
712
+ # operation documentation for the appropriate value for this field.
713
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
714
+ # @param [String] fields
715
+ # Selector specifying which fields to include in a partial response.
716
+ # @param [String] quota_user
717
+ # Available to use for quota purposes for server-side applications. Can be any
718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
719
+ # @param [Google::Apis::RequestOptions] options
720
+ # Request-specific options
721
+ #
722
+ # @yield [result, err] Result & error if block supplied
723
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
724
+ # @yieldparam err [StandardError] error object if request failed
725
+ #
726
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
727
+ #
728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
731
+ def test_project_location_workflow_template_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
732
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
733
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
734
+ command.request_object = test_iam_permissions_request_object
735
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
736
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
737
+ command.params['resource'] = resource unless resource.nil?
738
+ command.query['fields'] = fields unless fields.nil?
739
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
740
+ execute_or_queue_command(command, &block)
741
+ end
742
+
743
+ # Updates (replaces) workflow template. The updated template must contain
744
+ # version that matches the current server version.
745
+ # @param [String] name
746
+ # Output only. The resource name of the workflow template, as described in https:
747
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
748
+ # workflowTemplates, the resource name of the template has the following format:
749
+ # projects/`project_id`/regions/`region`/workflowTemplates/`template_id` For
750
+ # projects.locations.workflowTemplates, the resource name of the template has
751
+ # the following format: projects/`project_id`/locations/`location`/
752
+ # workflowTemplates/`template_id`
753
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
754
+ # @param [String] fields
755
+ # Selector specifying which fields to include in a partial response.
756
+ # @param [String] quota_user
757
+ # Available to use for quota purposes for server-side applications. Can be any
758
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
759
+ # @param [Google::Apis::RequestOptions] options
760
+ # Request-specific options
761
+ #
762
+ # @yield [result, err] Result & error if block supplied
763
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
764
+ # @yieldparam err [StandardError] error object if request failed
765
+ #
766
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
767
+ #
768
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
769
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
770
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
771
+ def update_project_location_workflow_template(name, workflow_template_object = nil, fields: nil, quota_user: nil, options: nil, &block)
772
+ command = make_simple_command(:put, 'v1beta2/{+name}', options)
773
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
774
+ command.request_object = workflow_template_object
775
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
776
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
777
+ command.params['name'] = name unless name.nil?
778
+ command.query['fields'] = fields unless fields.nil?
779
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
780
+ execute_or_queue_command(command, &block)
781
+ end
782
+
783
+ # Creates new autoscaling policy.
784
+ # @param [String] parent
785
+ # Required. The "resource name" of the region or location, as described in https:
786
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
787
+ # autoscalingPolicies.create, the resource name has the following format:
788
+ # projects/`project_id`/regions/`region` For projects.locations.
789
+ # autoscalingPolicies.create, the resource name has the following format:
790
+ # projects/`project_id`/locations/`location`
791
+ # @param [Google::Apis::DataprocV1beta2::AutoscalingPolicy] autoscaling_policy_object
792
+ # @param [String] fields
793
+ # Selector specifying which fields to include in a partial response.
794
+ # @param [String] quota_user
795
+ # Available to use for quota purposes for server-side applications. Can be any
796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
797
+ # @param [Google::Apis::RequestOptions] options
798
+ # Request-specific options
799
+ #
800
+ # @yield [result, err] Result & error if block supplied
801
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
802
+ # @yieldparam err [StandardError] error object if request failed
803
+ #
804
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
805
+ #
806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
809
+ def create_project_region_autoscaling_policy(parent, autoscaling_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
810
+ command = make_simple_command(:post, 'v1beta2/{+parent}/autoscalingPolicies', options)
811
+ command.request_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
812
+ command.request_object = autoscaling_policy_object
813
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
814
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
815
+ command.params['parent'] = parent unless parent.nil?
816
+ command.query['fields'] = fields unless fields.nil?
817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
818
+ execute_or_queue_command(command, &block)
819
+ end
820
+
821
+ # Deletes an autoscaling policy. It is an error to delete an autoscaling policy
822
+ # that is in use by one or more clusters.
823
+ # @param [String] name
824
+ # Required. The "resource name" of the autoscaling policy, as described in https:
825
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
826
+ # autoscalingPolicies.delete, the resource name of the policy has the following
827
+ # format: projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id`
828
+ # For projects.locations.autoscalingPolicies.delete, the resource name of the
829
+ # policy has the following format: projects/`project_id`/locations/`location`/
830
+ # autoscalingPolicies/`policy_id`
831
+ # @param [String] fields
832
+ # Selector specifying which fields to include in a partial response.
833
+ # @param [String] quota_user
834
+ # Available to use for quota purposes for server-side applications. Can be any
835
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
836
+ # @param [Google::Apis::RequestOptions] options
837
+ # Request-specific options
838
+ #
839
+ # @yield [result, err] Result & error if block supplied
840
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
841
+ # @yieldparam err [StandardError] error object if request failed
842
+ #
843
+ # @return [Google::Apis::DataprocV1beta2::Empty]
844
+ #
845
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
846
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
847
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
848
+ def delete_project_region_autoscaling_policy(name, fields: nil, quota_user: nil, options: nil, &block)
849
+ command = make_simple_command(:delete, 'v1beta2/{+name}', options)
850
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
851
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
852
+ command.params['name'] = name unless name.nil?
853
+ command.query['fields'] = fields unless fields.nil?
854
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
855
+ execute_or_queue_command(command, &block)
856
+ end
857
+
858
+ # Retrieves autoscaling policy.
859
+ # @param [String] name
860
+ # Required. The "resource name" of the autoscaling policy, as described in https:
861
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
862
+ # autoscalingPolicies.get, the resource name of the policy has the following
863
+ # format: projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id`
864
+ # For projects.locations.autoscalingPolicies.get, the resource name of the
865
+ # policy has the following format: projects/`project_id`/locations/`location`/
866
+ # autoscalingPolicies/`policy_id`
867
+ # @param [String] fields
868
+ # Selector specifying which fields to include in a partial response.
869
+ # @param [String] quota_user
870
+ # Available to use for quota purposes for server-side applications. Can be any
871
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
872
+ # @param [Google::Apis::RequestOptions] options
873
+ # Request-specific options
874
+ #
875
+ # @yield [result, err] Result & error if block supplied
876
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
877
+ # @yieldparam err [StandardError] error object if request failed
878
+ #
879
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
880
+ #
881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
884
+ def get_project_region_autoscaling_policy(name, fields: nil, quota_user: nil, options: nil, &block)
885
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
886
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
887
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
888
+ command.params['name'] = name unless name.nil?
889
+ command.query['fields'] = fields unless fields.nil?
890
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
891
+ execute_or_queue_command(command, &block)
892
+ end
893
+
894
+ # Gets the access control policy for a resource. Returns an empty policy if the
895
+ # resource exists and does not have a policy set.
896
+ # @param [String] resource
897
+ # REQUIRED: The resource for which the policy is being requested. See the
898
+ # operation documentation for the appropriate value for this field.
899
+ # @param [Fixnum] options_requested_policy_version
900
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
901
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
902
+ # with any conditional bindings must specify version 3. Policies without any
903
+ # conditional bindings may specify any valid value or leave the field unset.To
904
+ # learn which resources support conditions in their IAM policies, see the IAM
905
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
906
+ # @param [String] fields
907
+ # Selector specifying which fields to include in a partial response.
908
+ # @param [String] quota_user
909
+ # Available to use for quota purposes for server-side applications. Can be any
910
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
911
+ # @param [Google::Apis::RequestOptions] options
912
+ # Request-specific options
913
+ #
914
+ # @yield [result, err] Result & error if block supplied
915
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
916
+ # @yieldparam err [StandardError] error object if request failed
917
+ #
918
+ # @return [Google::Apis::DataprocV1beta2::Policy]
919
+ #
920
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
921
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
922
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
923
+ def get_autoscaling_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
924
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
925
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
926
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
927
+ command.params['resource'] = resource unless resource.nil?
928
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
929
+ command.query['fields'] = fields unless fields.nil?
930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
931
+ execute_or_queue_command(command, &block)
932
+ end
933
+
934
+ # Lists autoscaling policies in the project.
935
+ # @param [String] parent
936
+ # Required. The "resource name" of the region or location, as described in https:
937
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
938
+ # autoscalingPolicies.list, the resource name of the region has the following
939
+ # format: projects/`project_id`/regions/`region` For projects.locations.
940
+ # autoscalingPolicies.list, the resource name of the location has the following
941
+ # format: projects/`project_id`/locations/`location`
942
+ # @param [Fixnum] page_size
943
+ # Optional. The maximum number of results to return in each response. Must be
944
+ # less than or equal to 1000. Defaults to 100.
945
+ # @param [String] page_token
946
+ # Optional. The page token, returned by a previous call, to request the next
947
+ # page of results.
948
+ # @param [String] fields
949
+ # Selector specifying which fields to include in a partial response.
950
+ # @param [String] quota_user
951
+ # Available to use for quota purposes for server-side applications. Can be any
952
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
953
+ # @param [Google::Apis::RequestOptions] options
954
+ # Request-specific options
955
+ #
956
+ # @yield [result, err] Result & error if block supplied
957
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse] parsed result object
958
+ # @yieldparam err [StandardError] error object if request failed
959
+ #
960
+ # @return [Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse]
961
+ #
962
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
963
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
964
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
965
+ def list_project_region_autoscaling_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
966
+ command = make_simple_command(:get, 'v1beta2/{+parent}/autoscalingPolicies', options)
967
+ command.response_representation = Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse::Representation
968
+ command.response_class = Google::Apis::DataprocV1beta2::ListAutoscalingPoliciesResponse
969
+ command.params['parent'] = parent unless parent.nil?
970
+ command.query['pageSize'] = page_size unless page_size.nil?
971
+ command.query['pageToken'] = page_token unless page_token.nil?
972
+ command.query['fields'] = fields unless fields.nil?
973
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
974
+ execute_or_queue_command(command, &block)
975
+ end
976
+
977
+ # Sets the access control policy on the specified resource. Replaces any
978
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
979
+ # errors.
980
+ # @param [String] resource
981
+ # REQUIRED: The resource for which the policy is being specified. See the
982
+ # operation documentation for the appropriate value for this field.
983
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
984
+ # @param [String] fields
985
+ # Selector specifying which fields to include in a partial response.
986
+ # @param [String] quota_user
987
+ # Available to use for quota purposes for server-side applications. Can be any
988
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
989
+ # @param [Google::Apis::RequestOptions] options
990
+ # Request-specific options
991
+ #
992
+ # @yield [result, err] Result & error if block supplied
993
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
994
+ # @yieldparam err [StandardError] error object if request failed
995
+ #
996
+ # @return [Google::Apis::DataprocV1beta2::Policy]
997
+ #
998
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
999
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1000
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1001
+ def set_project_region_autoscaling_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1002
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
1003
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
1004
+ command.request_object = set_iam_policy_request_object
1005
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
1006
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
1007
+ command.params['resource'] = resource unless resource.nil?
1008
+ command.query['fields'] = fields unless fields.nil?
1009
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1010
+ execute_or_queue_command(command, &block)
1011
+ end
1012
+
1013
+ # Returns permissions that a caller has on the specified resource. If the
1014
+ # resource does not exist, this will return an empty set of permissions, not a
1015
+ # NOT_FOUND error.Note: This operation is designed to be used for building
1016
+ # permission-aware UIs and command-line tools, not for authorization checking.
1017
+ # This operation may "fail open" without warning.
1018
+ # @param [String] resource
1019
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1020
+ # operation documentation for the appropriate value for this field.
1021
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
1022
+ # @param [String] fields
1023
+ # Selector specifying which fields to include in a partial response.
1024
+ # @param [String] quota_user
1025
+ # Available to use for quota purposes for server-side applications. Can be any
1026
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1027
+ # @param [Google::Apis::RequestOptions] options
1028
+ # Request-specific options
1029
+ #
1030
+ # @yield [result, err] Result & error if block supplied
1031
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
1032
+ # @yieldparam err [StandardError] error object if request failed
1033
+ #
1034
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
1035
+ #
1036
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1037
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1038
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1039
+ def test_project_region_autoscaling_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1040
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
1041
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
1042
+ command.request_object = test_iam_permissions_request_object
1043
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
1044
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
1045
+ command.params['resource'] = resource unless resource.nil?
1046
+ command.query['fields'] = fields unless fields.nil?
1047
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1048
+ execute_or_queue_command(command, &block)
1049
+ end
1050
+
1051
+ # Updates (replaces) autoscaling policy.Disabled check for update_mask, because
1052
+ # all updates will be full replacements.
1053
+ # @param [String] name
1054
+ # Output only. The "resource name" of the autoscaling policy, as described in
1055
+ # https://cloud.google.com/apis/design/resource_names. For projects.regions.
1056
+ # autoscalingPolicies, the resource name of the policy has the following format:
1057
+ # projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id` For
1058
+ # projects.locations.autoscalingPolicies, the resource name of the policy has
1059
+ # the following format: projects/`project_id`/locations/`location`/
1060
+ # autoscalingPolicies/`policy_id`
1061
+ # @param [Google::Apis::DataprocV1beta2::AutoscalingPolicy] autoscaling_policy_object
1062
+ # @param [String] fields
1063
+ # Selector specifying which fields to include in a partial response.
1064
+ # @param [String] quota_user
1065
+ # Available to use for quota purposes for server-side applications. Can be any
1066
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1067
+ # @param [Google::Apis::RequestOptions] options
1068
+ # Request-specific options
1069
+ #
1070
+ # @yield [result, err] Result & error if block supplied
1071
+ # @yieldparam result [Google::Apis::DataprocV1beta2::AutoscalingPolicy] parsed result object
1072
+ # @yieldparam err [StandardError] error object if request failed
1073
+ #
1074
+ # @return [Google::Apis::DataprocV1beta2::AutoscalingPolicy]
1075
+ #
1076
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1077
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1078
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1079
+ def update_project_region_autoscaling_policy(name, autoscaling_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1080
+ command = make_simple_command(:put, 'v1beta2/{+name}', options)
1081
+ command.request_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
1082
+ command.request_object = autoscaling_policy_object
1083
+ command.response_representation = Google::Apis::DataprocV1beta2::AutoscalingPolicy::Representation
1084
+ command.response_class = Google::Apis::DataprocV1beta2::AutoscalingPolicy
1085
+ command.params['name'] = name unless name.nil?
1086
+ command.query['fields'] = fields unless fields.nil?
1087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1088
+ execute_or_queue_command(command, &block)
1089
+ end
1090
+
1091
+ # Creates a cluster in a project. The returned Operation.metadata will be
1092
+ # ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
1093
+ # google.cloud.dataproc.v1beta2#clusteroperationmetadata).
1094
+ # @param [String] project_id
1095
+ # Required. The ID of the Google Cloud Platform project that the cluster belongs
1096
+ # to.
1097
+ # @param [String] region
1098
+ # Required. The Dataproc region in which to handle the request.
1099
+ # @param [Google::Apis::DataprocV1beta2::Cluster] cluster_object
1100
+ # @param [String] request_id
1101
+ # Optional. A unique id used to identify the request. If the server receives two
1102
+ # CreateClusterRequest requests with the same id, then the second request will
1103
+ # be ignored and the first google.longrunning.Operation created and stored in
1104
+ # the backend is returned.It is recommended to always set this value to a UUID (
1105
+ # https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must
1106
+ # contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-
1107
+ # ). The maximum length is 40 characters.
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def create_project_region_cluster(project_id, region, cluster_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1126
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters', options)
1127
+ command.request_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
1128
+ command.request_object = cluster_object
1129
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1130
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1131
+ command.params['projectId'] = project_id unless project_id.nil?
1132
+ command.params['region'] = region unless region.nil?
1133
+ command.query['requestId'] = request_id unless request_id.nil?
1134
+ command.query['fields'] = fields unless fields.nil?
1135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1136
+ execute_or_queue_command(command, &block)
1137
+ end
1138
+
1139
+ # Deletes a cluster in a project. The returned Operation.metadata will be
1140
+ # ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
1141
+ # google.cloud.dataproc.v1beta2#clusteroperationmetadata).
1142
+ # @param [String] project_id
1143
+ # Required. The ID of the Google Cloud Platform project that the cluster belongs
1144
+ # to.
1145
+ # @param [String] region
1146
+ # Required. The Dataproc region in which to handle the request.
1147
+ # @param [String] cluster_name
1148
+ # Required. The cluster name.
1149
+ # @param [String] cluster_uuid
1150
+ # Optional. Specifying the cluster_uuid means the RPC should fail (with error
1151
+ # NOT_FOUND) if cluster with specified UUID does not exist.
1152
+ # @param [String] request_id
1153
+ # Optional. A unique id used to identify the request. If the server receives two
1154
+ # DeleteClusterRequest requests with the same id, then the second request will
1155
+ # be ignored and the first google.longrunning.Operation created and stored in
1156
+ # the backend is returned.It is recommended to always set this value to a UUID (
1157
+ # https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must
1158
+ # contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-
1159
+ # ). The maximum length is 40 characters.
1160
+ # @param [String] fields
1161
+ # Selector specifying which fields to include in a partial response.
1162
+ # @param [String] quota_user
1163
+ # Available to use for quota purposes for server-side applications. Can be any
1164
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1165
+ # @param [Google::Apis::RequestOptions] options
1166
+ # Request-specific options
1167
+ #
1168
+ # @yield [result, err] Result & error if block supplied
1169
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1170
+ # @yieldparam err [StandardError] error object if request failed
1171
+ #
1172
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1173
+ #
1174
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1175
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1176
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1177
+ def delete_project_region_cluster(project_id, region, cluster_name, cluster_uuid: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1178
+ command = make_simple_command(:delete, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
1179
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1180
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1181
+ command.params['projectId'] = project_id unless project_id.nil?
1182
+ command.params['region'] = region unless region.nil?
1183
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1184
+ command.query['clusterUuid'] = cluster_uuid unless cluster_uuid.nil?
1185
+ command.query['requestId'] = request_id unless request_id.nil?
1186
+ command.query['fields'] = fields unless fields.nil?
1187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1188
+ execute_or_queue_command(command, &block)
1189
+ end
1190
+
1191
+ # Gets cluster diagnostic information. The returned Operation.metadata will be
1192
+ # ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
1193
+ # google.cloud.dataproc.v1beta2#clusteroperationmetadata). After the operation
1194
+ # completes, Operation.response contains Empty.
1195
+ # @param [String] project_id
1196
+ # Required. The ID of the Google Cloud Platform project that the cluster belongs
1197
+ # to.
1198
+ # @param [String] region
1199
+ # Required. The Dataproc region in which to handle the request.
1200
+ # @param [String] cluster_name
1201
+ # Required. The cluster name.
1202
+ # @param [Google::Apis::DataprocV1beta2::DiagnoseClusterRequest] diagnose_cluster_request_object
1203
+ # @param [String] fields
1204
+ # Selector specifying which fields to include in a partial response.
1205
+ # @param [String] quota_user
1206
+ # Available to use for quota purposes for server-side applications. Can be any
1207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1208
+ # @param [Google::Apis::RequestOptions] options
1209
+ # Request-specific options
1210
+ #
1211
+ # @yield [result, err] Result & error if block supplied
1212
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1213
+ # @yieldparam err [StandardError] error object if request failed
1214
+ #
1215
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1216
+ #
1217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1220
+ def diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1221
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
1222
+ command.request_representation = Google::Apis::DataprocV1beta2::DiagnoseClusterRequest::Representation
1223
+ command.request_object = diagnose_cluster_request_object
1224
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1225
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1226
+ command.params['projectId'] = project_id unless project_id.nil?
1227
+ command.params['region'] = region unless region.nil?
1228
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1229
+ command.query['fields'] = fields unless fields.nil?
1230
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1231
+ execute_or_queue_command(command, &block)
1232
+ end
1233
+
1234
+ # Gets the resource representation for a cluster in a project.
1235
+ # @param [String] project_id
1236
+ # Required. The ID of the Google Cloud Platform project that the cluster belongs
1237
+ # to.
1238
+ # @param [String] region
1239
+ # Required. The Dataproc region in which to handle the request.
1240
+ # @param [String] cluster_name
1241
+ # Required. The cluster name.
1242
+ # @param [String] fields
1243
+ # Selector specifying which fields to include in a partial response.
1244
+ # @param [String] quota_user
1245
+ # Available to use for quota purposes for server-side applications. Can be any
1246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1247
+ # @param [Google::Apis::RequestOptions] options
1248
+ # Request-specific options
1249
+ #
1250
+ # @yield [result, err] Result & error if block supplied
1251
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Cluster] parsed result object
1252
+ # @yieldparam err [StandardError] error object if request failed
1253
+ #
1254
+ # @return [Google::Apis::DataprocV1beta2::Cluster]
1255
+ #
1256
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1257
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1258
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1259
+ def get_project_region_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
1260
+ command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
1261
+ command.response_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
1262
+ command.response_class = Google::Apis::DataprocV1beta2::Cluster
1263
+ command.params['projectId'] = project_id unless project_id.nil?
1264
+ command.params['region'] = region unless region.nil?
1265
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1266
+ command.query['fields'] = fields unless fields.nil?
1267
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1268
+ execute_or_queue_command(command, &block)
1269
+ end
1270
+
1271
+ # Gets the access control policy for a resource. Returns an empty policy if the
1272
+ # resource exists and does not have a policy set.
1273
+ # @param [String] resource
1274
+ # REQUIRED: The resource for which the policy is being requested. See the
1275
+ # operation documentation for the appropriate value for this field.
1276
+ # @param [Fixnum] options_requested_policy_version
1277
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
1278
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
1279
+ # with any conditional bindings must specify version 3. Policies without any
1280
+ # conditional bindings may specify any valid value or leave the field unset.To
1281
+ # learn which resources support conditions in their IAM policies, see the IAM
1282
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1283
+ # @param [String] fields
1284
+ # Selector specifying which fields to include in a partial response.
1285
+ # @param [String] quota_user
1286
+ # Available to use for quota purposes for server-side applications. Can be any
1287
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1288
+ # @param [Google::Apis::RequestOptions] options
1289
+ # Request-specific options
1290
+ #
1291
+ # @yield [result, err] Result & error if block supplied
1292
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
1293
+ # @yieldparam err [StandardError] error object if request failed
1294
+ #
1295
+ # @return [Google::Apis::DataprocV1beta2::Policy]
1296
+ #
1297
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1298
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1299
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1300
+ def get_project_region_cluster_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
1301
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
1302
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
1303
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
1304
+ command.params['resource'] = resource unless resource.nil?
1305
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
1306
+ command.query['fields'] = fields unless fields.nil?
1307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1308
+ execute_or_queue_command(command, &block)
1309
+ end
1310
+
1311
+ # Inject encrypted credentials into all of the VMs in a cluster.The target
1312
+ # cluster must be a personal auth cluster assigned to the user who is issuing
1313
+ # the RPC.
1314
+ # @param [String] project
1315
+ # Required. The ID of the Google Cloud Platform project the cluster belongs to,
1316
+ # of the form projects/.
1317
+ # @param [String] region
1318
+ # Required. The region containing the cluster, of the form regions/.
1319
+ # @param [String] cluster
1320
+ # Required. The cluster, in the form clusters/.
1321
+ # @param [Google::Apis::DataprocV1beta2::InjectCredentialsRequest] inject_credentials_request_object
1322
+ # @param [String] fields
1323
+ # Selector specifying which fields to include in a partial response.
1324
+ # @param [String] quota_user
1325
+ # Available to use for quota purposes for server-side applications. Can be any
1326
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1327
+ # @param [Google::Apis::RequestOptions] options
1328
+ # Request-specific options
1329
+ #
1330
+ # @yield [result, err] Result & error if block supplied
1331
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1332
+ # @yieldparam err [StandardError] error object if request failed
1333
+ #
1334
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1335
+ #
1336
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1337
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1338
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1339
+ def inject_cluster_credentials(project, region, cluster, inject_credentials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1340
+ command = make_simple_command(:post, 'v1beta2/{+project}/{+region}/{+cluster}:injectCredentials', options)
1341
+ command.request_representation = Google::Apis::DataprocV1beta2::InjectCredentialsRequest::Representation
1342
+ command.request_object = inject_credentials_request_object
1343
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1344
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1345
+ command.params['project'] = project unless project.nil?
1346
+ command.params['region'] = region unless region.nil?
1347
+ command.params['cluster'] = cluster unless cluster.nil?
1348
+ command.query['fields'] = fields unless fields.nil?
1349
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1350
+ execute_or_queue_command(command, &block)
1351
+ end
1352
+
1353
+ # Lists all regions/`region`/clusters in a project alphabetically.
1354
+ # @param [String] project_id
1355
+ # Required. The ID of the Google Cloud Platform project that the cluster belongs
1356
+ # to.
1357
+ # @param [String] region
1358
+ # Required. The Dataproc region in which to handle the request.
1359
+ # @param [String] filter
1360
+ # Optional. A filter constraining the clusters to list. Filters are case-
1361
+ # sensitive and have the following syntax:field = value AND field = value ...
1362
+ # where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is
1363
+ # a label key. value can be * to match all values. status.state can be one of
1364
+ # the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or
1365
+ # UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE
1366
+ # contains the DELETING and ERROR states. clusterName is the name of the cluster
1367
+ # provided at creation time. Only the logical AND operator is supported; space-
1368
+ # separated items are treated as having an implicit AND operator.Example filter:
1369
+ # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
1370
+ # labels.starred = *
1371
+ # @param [Fixnum] page_size
1372
+ # Optional. The standard List page size.
1373
+ # @param [String] page_token
1374
+ # Optional. The standard List page token.
1375
+ # @param [String] fields
1376
+ # Selector specifying which fields to include in a partial response.
1377
+ # @param [String] quota_user
1378
+ # Available to use for quota purposes for server-side applications. Can be any
1379
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1380
+ # @param [Google::Apis::RequestOptions] options
1381
+ # Request-specific options
1382
+ #
1383
+ # @yield [result, err] Result & error if block supplied
1384
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListClustersResponse] parsed result object
1385
+ # @yieldparam err [StandardError] error object if request failed
1386
+ #
1387
+ # @return [Google::Apis::DataprocV1beta2::ListClustersResponse]
1388
+ #
1389
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1390
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1391
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1392
+ def list_project_region_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1393
+ command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/clusters', options)
1394
+ command.response_representation = Google::Apis::DataprocV1beta2::ListClustersResponse::Representation
1395
+ command.response_class = Google::Apis::DataprocV1beta2::ListClustersResponse
1396
+ command.params['projectId'] = project_id unless project_id.nil?
1397
+ command.params['region'] = region unless region.nil?
1398
+ command.query['filter'] = filter unless filter.nil?
1399
+ command.query['pageSize'] = page_size unless page_size.nil?
1400
+ command.query['pageToken'] = page_token unless page_token.nil?
1401
+ command.query['fields'] = fields unless fields.nil?
1402
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1403
+ execute_or_queue_command(command, &block)
1404
+ end
1405
+
1406
+ # Updates a cluster in a project. The returned Operation.metadata will be
1407
+ # ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
1408
+ # google.cloud.dataproc.v1beta2#clusteroperationmetadata).
1409
+ # @param [String] project_id
1410
+ # Required. The ID of the Google Cloud Platform project the cluster belongs to.
1411
+ # @param [String] region
1412
+ # Required. The Dataproc region in which to handle the request.
1413
+ # @param [String] cluster_name
1414
+ # Required. The cluster name.
1415
+ # @param [Google::Apis::DataprocV1beta2::Cluster] cluster_object
1416
+ # @param [String] graceful_decommission_timeout
1417
+ # Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning
1418
+ # allows removing nodes from the cluster without interrupting jobs in progress.
1419
+ # Timeout specifies how long to wait for jobs in progress to finish before
1420
+ # forcefully removing nodes (and potentially interrupting jobs). Default timeout
1421
+ # is 0 (for forceful decommission), and the maximum allowed timeout is 1 day (
1422
+ # see JSON representation of Duration (https://developers.google.com/protocol-
1423
+ # buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and
1424
+ # higher.
1425
+ # @param [String] request_id
1426
+ # Optional. A unique id used to identify the request. If the server receives two
1427
+ # UpdateClusterRequest requests with the same id, then the second request will
1428
+ # be ignored and the first google.longrunning.Operation created and stored in
1429
+ # the backend is returned.It is recommended to always set this value to a UUID (
1430
+ # https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must
1431
+ # contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-
1432
+ # ). The maximum length is 40 characters.
1433
+ # @param [String] update_mask
1434
+ # Required. Specifies the path, relative to Cluster, of the field to update. For
1435
+ # example, to change the number of workers in a cluster to 5, the update_mask
1436
+ # parameter would be specified as config.worker_config.num_instances, and the
1437
+ # PATCH request body would specify the new value, as follows: ` "config":` "
1438
+ # workerConfig":` "numInstances":"5" ` ` ` Similarly, to change the number of
1439
+ # preemptible workers in a cluster to 5, the update_mask parameter would be
1440
+ # config.secondary_worker_config.num_instances, and the PATCH request body would
1441
+ # be set as follows: ` "config":` "secondaryWorkerConfig":` "numInstances":"5" `
1442
+ # ` ` *Note:* currently only the following fields can be updated: *Mask* *
1443
+ # Purpose* labels Updates labels config.worker_config.num_instances Resize
1444
+ # primary worker group config.secondary_worker_config.num_instances Resize
1445
+ # secondary worker group config.lifecycle_config.auto_delete_ttl Reset MAX TTL
1446
+ # duration config.lifecycle_config.auto_delete_time Update MAX TTL deletion
1447
+ # timestamp config.lifecycle_config.idle_delete_ttl Update Idle TTL duration
1448
+ # config.autoscaling_config.policy_uri Use, stop using, or change autoscaling
1449
+ # policies
1450
+ # @param [String] fields
1451
+ # Selector specifying which fields to include in a partial response.
1452
+ # @param [String] quota_user
1453
+ # Available to use for quota purposes for server-side applications. Can be any
1454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1455
+ # @param [Google::Apis::RequestOptions] options
1456
+ # Request-specific options
1457
+ #
1458
+ # @yield [result, err] Result & error if block supplied
1459
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1460
+ # @yieldparam err [StandardError] error object if request failed
1461
+ #
1462
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1463
+ #
1464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1467
+ def patch_project_region_cluster(project_id, region, cluster_name, cluster_object = nil, graceful_decommission_timeout: nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1468
+ command = make_simple_command(:patch, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
1469
+ command.request_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
1470
+ command.request_object = cluster_object
1471
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1472
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1473
+ command.params['projectId'] = project_id unless project_id.nil?
1474
+ command.params['region'] = region unless region.nil?
1475
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1476
+ command.query['gracefulDecommissionTimeout'] = graceful_decommission_timeout unless graceful_decommission_timeout.nil?
1477
+ command.query['requestId'] = request_id unless request_id.nil?
1478
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1479
+ command.query['fields'] = fields unless fields.nil?
1480
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1481
+ execute_or_queue_command(command, &block)
1482
+ end
1483
+
1484
+ # Sets the access control policy on the specified resource. Replaces any
1485
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
1486
+ # errors.
1487
+ # @param [String] resource
1488
+ # REQUIRED: The resource for which the policy is being specified. See the
1489
+ # operation documentation for the appropriate value for this field.
1490
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
1491
+ # @param [String] fields
1492
+ # Selector specifying which fields to include in a partial response.
1493
+ # @param [String] quota_user
1494
+ # Available to use for quota purposes for server-side applications. Can be any
1495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1496
+ # @param [Google::Apis::RequestOptions] options
1497
+ # Request-specific options
1498
+ #
1499
+ # @yield [result, err] Result & error if block supplied
1500
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
1501
+ # @yieldparam err [StandardError] error object if request failed
1502
+ #
1503
+ # @return [Google::Apis::DataprocV1beta2::Policy]
1504
+ #
1505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1508
+ def set_cluster_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1509
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
1510
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
1511
+ command.request_object = set_iam_policy_request_object
1512
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
1513
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
1514
+ command.params['resource'] = resource unless resource.nil?
1515
+ command.query['fields'] = fields unless fields.nil?
1516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1517
+ execute_or_queue_command(command, &block)
1518
+ end
1519
+
1520
+ # Starts a cluster in a project.
1521
+ # @param [String] project_id
1522
+ # Required. The ID of the Google Cloud Platform project the cluster belongs to.
1523
+ # @param [String] region
1524
+ # Required. The Dataproc region in which to handle the request.
1525
+ # @param [String] cluster_name
1526
+ # Required. The cluster name.
1527
+ # @param [Google::Apis::DataprocV1beta2::StartClusterRequest] start_cluster_request_object
1528
+ # @param [String] fields
1529
+ # Selector specifying which fields to include in a partial response.
1530
+ # @param [String] quota_user
1531
+ # Available to use for quota purposes for server-side applications. Can be any
1532
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1533
+ # @param [Google::Apis::RequestOptions] options
1534
+ # Request-specific options
1535
+ #
1536
+ # @yield [result, err] Result & error if block supplied
1537
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1538
+ # @yieldparam err [StandardError] error object if request failed
1539
+ #
1540
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1541
+ #
1542
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1543
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1544
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1545
+ def start_cluster(project_id, region, cluster_name, start_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1546
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start', options)
1547
+ command.request_representation = Google::Apis::DataprocV1beta2::StartClusterRequest::Representation
1548
+ command.request_object = start_cluster_request_object
1549
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1550
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1551
+ command.params['projectId'] = project_id unless project_id.nil?
1552
+ command.params['region'] = region unless region.nil?
1553
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1554
+ command.query['fields'] = fields unless fields.nil?
1555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1556
+ execute_or_queue_command(command, &block)
1557
+ end
1558
+
1559
+ # Stops a cluster in a project.
1560
+ # @param [String] project_id
1561
+ # Required. The ID of the Google Cloud Platform project the cluster belongs to.
1562
+ # @param [String] region
1563
+ # Required. The Dataproc region in which to handle the request.
1564
+ # @param [String] cluster_name
1565
+ # Required. The cluster name.
1566
+ # @param [Google::Apis::DataprocV1beta2::StopClusterRequest] stop_cluster_request_object
1567
+ # @param [String] fields
1568
+ # Selector specifying which fields to include in a partial response.
1569
+ # @param [String] quota_user
1570
+ # Available to use for quota purposes for server-side applications. Can be any
1571
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1572
+ # @param [Google::Apis::RequestOptions] options
1573
+ # Request-specific options
1574
+ #
1575
+ # @yield [result, err] Result & error if block supplied
1576
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1577
+ # @yieldparam err [StandardError] error object if request failed
1578
+ #
1579
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1580
+ #
1581
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1582
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1583
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1584
+ def stop_cluster(project_id, region, cluster_name, stop_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1585
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop', options)
1586
+ command.request_representation = Google::Apis::DataprocV1beta2::StopClusterRequest::Representation
1587
+ command.request_object = stop_cluster_request_object
1588
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1589
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1590
+ command.params['projectId'] = project_id unless project_id.nil?
1591
+ command.params['region'] = region unless region.nil?
1592
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
1593
+ command.query['fields'] = fields unless fields.nil?
1594
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1595
+ execute_or_queue_command(command, &block)
1596
+ end
1597
+
1598
+ # Returns permissions that a caller has on the specified resource. If the
1599
+ # resource does not exist, this will return an empty set of permissions, not a
1600
+ # NOT_FOUND error.Note: This operation is designed to be used for building
1601
+ # permission-aware UIs and command-line tools, not for authorization checking.
1602
+ # This operation may "fail open" without warning.
1603
+ # @param [String] resource
1604
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1605
+ # operation documentation for the appropriate value for this field.
1606
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
1607
+ # @param [String] fields
1608
+ # Selector specifying which fields to include in a partial response.
1609
+ # @param [String] quota_user
1610
+ # Available to use for quota purposes for server-side applications. Can be any
1611
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1612
+ # @param [Google::Apis::RequestOptions] options
1613
+ # Request-specific options
1614
+ #
1615
+ # @yield [result, err] Result & error if block supplied
1616
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
1617
+ # @yieldparam err [StandardError] error object if request failed
1618
+ #
1619
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
1620
+ #
1621
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1622
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1623
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1624
+ def test_cluster_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1625
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
1626
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
1627
+ command.request_object = test_iam_permissions_request_object
1628
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
1629
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
1630
+ command.params['resource'] = resource unless resource.nil?
1631
+ command.query['fields'] = fields unless fields.nil?
1632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1633
+ execute_or_queue_command(command, &block)
1634
+ end
1635
+
1636
+ # Starts a job cancellation request. To access the job resource after
1637
+ # cancellation, call regions/`region`/jobs.list (https://cloud.google.com/
1638
+ # dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) or regions/`
1639
+ # region`/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/
1640
+ # v1beta2/projects.regions.jobs/get).
1641
+ # @param [String] project_id
1642
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1643
+ # @param [String] region
1644
+ # Required. The Dataproc region in which to handle the request.
1645
+ # @param [String] job_id
1646
+ # Required. The job ID.
1647
+ # @param [Google::Apis::DataprocV1beta2::CancelJobRequest] cancel_job_request_object
1648
+ # @param [String] fields
1649
+ # Selector specifying which fields to include in a partial response.
1650
+ # @param [String] quota_user
1651
+ # Available to use for quota purposes for server-side applications. Can be any
1652
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1653
+ # @param [Google::Apis::RequestOptions] options
1654
+ # Request-specific options
1655
+ #
1656
+ # @yield [result, err] Result & error if block supplied
1657
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Job] parsed result object
1658
+ # @yieldparam err [StandardError] error object if request failed
1659
+ #
1660
+ # @return [Google::Apis::DataprocV1beta2::Job]
1661
+ #
1662
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1663
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1664
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1665
+ def cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1666
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
1667
+ command.request_representation = Google::Apis::DataprocV1beta2::CancelJobRequest::Representation
1668
+ command.request_object = cancel_job_request_object
1669
+ command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
1670
+ command.response_class = Google::Apis::DataprocV1beta2::Job
1671
+ command.params['projectId'] = project_id unless project_id.nil?
1672
+ command.params['region'] = region unless region.nil?
1673
+ command.params['jobId'] = job_id unless job_id.nil?
1674
+ command.query['fields'] = fields unless fields.nil?
1675
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1676
+ execute_or_queue_command(command, &block)
1677
+ end
1678
+
1679
+ # Deletes the job from the project. If the job is active, the delete fails, and
1680
+ # the response returns FAILED_PRECONDITION.
1681
+ # @param [String] project_id
1682
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1683
+ # @param [String] region
1684
+ # Required. The Dataproc region in which to handle the request.
1685
+ # @param [String] job_id
1686
+ # Required. The job ID.
1687
+ # @param [String] fields
1688
+ # Selector specifying which fields to include in a partial response.
1689
+ # @param [String] quota_user
1690
+ # Available to use for quota purposes for server-side applications. Can be any
1691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1692
+ # @param [Google::Apis::RequestOptions] options
1693
+ # Request-specific options
1694
+ #
1695
+ # @yield [result, err] Result & error if block supplied
1696
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
1697
+ # @yieldparam err [StandardError] error object if request failed
1698
+ #
1699
+ # @return [Google::Apis::DataprocV1beta2::Empty]
1700
+ #
1701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1704
+ def delete_project_region_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
1705
+ command = make_simple_command(:delete, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
1706
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
1707
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
1708
+ command.params['projectId'] = project_id unless project_id.nil?
1709
+ command.params['region'] = region unless region.nil?
1710
+ command.params['jobId'] = job_id unless job_id.nil?
1711
+ command.query['fields'] = fields unless fields.nil?
1712
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1713
+ execute_or_queue_command(command, &block)
1714
+ end
1715
+
1716
+ # Gets the resource representation for a job in a project.
1717
+ # @param [String] project_id
1718
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1719
+ # @param [String] region
1720
+ # Required. The Dataproc region in which to handle the request.
1721
+ # @param [String] job_id
1722
+ # Required. The job ID.
1723
+ # @param [String] fields
1724
+ # Selector specifying which fields to include in a partial response.
1725
+ # @param [String] quota_user
1726
+ # Available to use for quota purposes for server-side applications. Can be any
1727
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1728
+ # @param [Google::Apis::RequestOptions] options
1729
+ # Request-specific options
1730
+ #
1731
+ # @yield [result, err] Result & error if block supplied
1732
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Job] parsed result object
1733
+ # @yieldparam err [StandardError] error object if request failed
1734
+ #
1735
+ # @return [Google::Apis::DataprocV1beta2::Job]
1736
+ #
1737
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1738
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1739
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1740
+ def get_project_region_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
1741
+ command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
1742
+ command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
1743
+ command.response_class = Google::Apis::DataprocV1beta2::Job
1744
+ command.params['projectId'] = project_id unless project_id.nil?
1745
+ command.params['region'] = region unless region.nil?
1746
+ command.params['jobId'] = job_id unless job_id.nil?
1747
+ command.query['fields'] = fields unless fields.nil?
1748
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1749
+ execute_or_queue_command(command, &block)
1750
+ end
1751
+
1752
+ # Gets the access control policy for a resource. Returns an empty policy if the
1753
+ # resource exists and does not have a policy set.
1754
+ # @param [String] resource
1755
+ # REQUIRED: The resource for which the policy is being requested. See the
1756
+ # operation documentation for the appropriate value for this field.
1757
+ # @param [Fixnum] options_requested_policy_version
1758
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
1759
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
1760
+ # with any conditional bindings must specify version 3. Policies without any
1761
+ # conditional bindings may specify any valid value or leave the field unset.To
1762
+ # learn which resources support conditions in their IAM policies, see the IAM
1763
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
1764
+ # @param [String] fields
1765
+ # Selector specifying which fields to include in a partial response.
1766
+ # @param [String] quota_user
1767
+ # Available to use for quota purposes for server-side applications. Can be any
1768
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1769
+ # @param [Google::Apis::RequestOptions] options
1770
+ # Request-specific options
1771
+ #
1772
+ # @yield [result, err] Result & error if block supplied
1773
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
1774
+ # @yieldparam err [StandardError] error object if request failed
1775
+ #
1776
+ # @return [Google::Apis::DataprocV1beta2::Policy]
1777
+ #
1778
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1779
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1780
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1781
+ def get_project_region_job_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
1782
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
1783
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
1784
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
1785
+ command.params['resource'] = resource unless resource.nil?
1786
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
1787
+ command.query['fields'] = fields unless fields.nil?
1788
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1789
+ execute_or_queue_command(command, &block)
1790
+ end
1791
+
1792
+ # Lists regions/`region`/jobs in a project.
1793
+ # @param [String] project_id
1794
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1795
+ # @param [String] region
1796
+ # Required. The Dataproc region in which to handle the request.
1797
+ # @param [String] cluster_name
1798
+ # Optional. If set, the returned jobs list includes only jobs that were
1799
+ # submitted to the named cluster.
1800
+ # @param [String] filter
1801
+ # Optional. A filter constraining the jobs to list. Filters are case-sensitive
1802
+ # and have the following syntax:field = value AND field = value ...where field
1803
+ # is status.state or labels.[KEY], and [KEY] is a label key. value can be * to
1804
+ # match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the
1805
+ # logical AND operator is supported; space-separated items are treated as having
1806
+ # an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env =
1807
+ # staging AND labels.starred = *
1808
+ # @param [String] job_state_matcher
1809
+ # Optional. Specifies enumerated categories of jobs to list. (default = match
1810
+ # ALL jobs).If filter is provided, jobStateMatcher will be ignored.
1811
+ # @param [Fixnum] page_size
1812
+ # Optional. The number of results to return in each response.
1813
+ # @param [String] page_token
1814
+ # Optional. The page token, returned by a previous call, to request the next
1815
+ # page of results.
1816
+ # @param [String] fields
1817
+ # Selector specifying which fields to include in a partial response.
1818
+ # @param [String] quota_user
1819
+ # Available to use for quota purposes for server-side applications. Can be any
1820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1821
+ # @param [Google::Apis::RequestOptions] options
1822
+ # Request-specific options
1823
+ #
1824
+ # @yield [result, err] Result & error if block supplied
1825
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListJobsResponse] parsed result object
1826
+ # @yieldparam err [StandardError] error object if request failed
1827
+ #
1828
+ # @return [Google::Apis::DataprocV1beta2::ListJobsResponse]
1829
+ #
1830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1833
+ def list_project_region_jobs(project_id, region, cluster_name: nil, filter: nil, job_state_matcher: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1834
+ command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/jobs', options)
1835
+ command.response_representation = Google::Apis::DataprocV1beta2::ListJobsResponse::Representation
1836
+ command.response_class = Google::Apis::DataprocV1beta2::ListJobsResponse
1837
+ command.params['projectId'] = project_id unless project_id.nil?
1838
+ command.params['region'] = region unless region.nil?
1839
+ command.query['clusterName'] = cluster_name unless cluster_name.nil?
1840
+ command.query['filter'] = filter unless filter.nil?
1841
+ command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
1842
+ command.query['pageSize'] = page_size unless page_size.nil?
1843
+ command.query['pageToken'] = page_token unless page_token.nil?
1844
+ command.query['fields'] = fields unless fields.nil?
1845
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1846
+ execute_or_queue_command(command, &block)
1847
+ end
1848
+
1849
+ # Updates a job in a project.
1850
+ # @param [String] project_id
1851
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1852
+ # @param [String] region
1853
+ # Required. The Dataproc region in which to handle the request.
1854
+ # @param [String] job_id
1855
+ # Required. The job ID.
1856
+ # @param [Google::Apis::DataprocV1beta2::Job] job_object
1857
+ # @param [String] update_mask
1858
+ # Required. Specifies the path, relative to Job, of the field to update. For
1859
+ # example, to update the labels of a Job the update_mask parameter would be
1860
+ # specified as labels, and the PATCH request body would specify the new value. *
1861
+ # Note:* Currently, labels is the only field that can be updated.
1862
+ # @param [String] fields
1863
+ # Selector specifying which fields to include in a partial response.
1864
+ # @param [String] quota_user
1865
+ # Available to use for quota purposes for server-side applications. Can be any
1866
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1867
+ # @param [Google::Apis::RequestOptions] options
1868
+ # Request-specific options
1869
+ #
1870
+ # @yield [result, err] Result & error if block supplied
1871
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Job] parsed result object
1872
+ # @yieldparam err [StandardError] error object if request failed
1873
+ #
1874
+ # @return [Google::Apis::DataprocV1beta2::Job]
1875
+ #
1876
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1877
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1878
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1879
+ def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1880
+ command = make_simple_command(:patch, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
1881
+ command.request_representation = Google::Apis::DataprocV1beta2::Job::Representation
1882
+ command.request_object = job_object
1883
+ command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
1884
+ command.response_class = Google::Apis::DataprocV1beta2::Job
1885
+ command.params['projectId'] = project_id unless project_id.nil?
1886
+ command.params['region'] = region unless region.nil?
1887
+ command.params['jobId'] = job_id unless job_id.nil?
1888
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1889
+ command.query['fields'] = fields unless fields.nil?
1890
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1891
+ execute_or_queue_command(command, &block)
1892
+ end
1893
+
1894
+ # Sets the access control policy on the specified resource. Replaces any
1895
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
1896
+ # errors.
1897
+ # @param [String] resource
1898
+ # REQUIRED: The resource for which the policy is being specified. See the
1899
+ # operation documentation for the appropriate value for this field.
1900
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
1901
+ # @param [String] fields
1902
+ # Selector specifying which fields to include in a partial response.
1903
+ # @param [String] quota_user
1904
+ # Available to use for quota purposes for server-side applications. Can be any
1905
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1906
+ # @param [Google::Apis::RequestOptions] options
1907
+ # Request-specific options
1908
+ #
1909
+ # @yield [result, err] Result & error if block supplied
1910
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
1911
+ # @yieldparam err [StandardError] error object if request failed
1912
+ #
1913
+ # @return [Google::Apis::DataprocV1beta2::Policy]
1914
+ #
1915
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1916
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1917
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1918
+ def set_job_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1919
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
1920
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
1921
+ command.request_object = set_iam_policy_request_object
1922
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
1923
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
1924
+ command.params['resource'] = resource unless resource.nil?
1925
+ command.query['fields'] = fields unless fields.nil?
1926
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1927
+ execute_or_queue_command(command, &block)
1928
+ end
1929
+
1930
+ # Submits a job to a cluster.
1931
+ # @param [String] project_id
1932
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1933
+ # @param [String] region
1934
+ # Required. The Dataproc region in which to handle the request.
1935
+ # @param [Google::Apis::DataprocV1beta2::SubmitJobRequest] submit_job_request_object
1936
+ # @param [String] fields
1937
+ # Selector specifying which fields to include in a partial response.
1938
+ # @param [String] quota_user
1939
+ # Available to use for quota purposes for server-side applications. Can be any
1940
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1941
+ # @param [Google::Apis::RequestOptions] options
1942
+ # Request-specific options
1943
+ #
1944
+ # @yield [result, err] Result & error if block supplied
1945
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Job] parsed result object
1946
+ # @yieldparam err [StandardError] error object if request failed
1947
+ #
1948
+ # @return [Google::Apis::DataprocV1beta2::Job]
1949
+ #
1950
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1951
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1952
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1953
+ def submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1954
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/jobs:submit', options)
1955
+ command.request_representation = Google::Apis::DataprocV1beta2::SubmitJobRequest::Representation
1956
+ command.request_object = submit_job_request_object
1957
+ command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
1958
+ command.response_class = Google::Apis::DataprocV1beta2::Job
1959
+ command.params['projectId'] = project_id unless project_id.nil?
1960
+ command.params['region'] = region unless region.nil?
1961
+ command.query['fields'] = fields unless fields.nil?
1962
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1963
+ execute_or_queue_command(command, &block)
1964
+ end
1965
+
1966
+ # Submits job to a cluster.
1967
+ # @param [String] project_id
1968
+ # Required. The ID of the Google Cloud Platform project that the job belongs to.
1969
+ # @param [String] region
1970
+ # Required. The Dataproc region in which to handle the request.
1971
+ # @param [Google::Apis::DataprocV1beta2::SubmitJobRequest] submit_job_request_object
1972
+ # @param [String] fields
1973
+ # Selector specifying which fields to include in a partial response.
1974
+ # @param [String] quota_user
1975
+ # Available to use for quota purposes for server-side applications. Can be any
1976
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1977
+ # @param [Google::Apis::RequestOptions] options
1978
+ # Request-specific options
1979
+ #
1980
+ # @yield [result, err] Result & error if block supplied
1981
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
1982
+ # @yieldparam err [StandardError] error object if request failed
1983
+ #
1984
+ # @return [Google::Apis::DataprocV1beta2::Operation]
1985
+ #
1986
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1987
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1988
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1989
+ def submit_project_region_job_as_operation(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1990
+ command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation', options)
1991
+ command.request_representation = Google::Apis::DataprocV1beta2::SubmitJobRequest::Representation
1992
+ command.request_object = submit_job_request_object
1993
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
1994
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
1995
+ command.params['projectId'] = project_id unless project_id.nil?
1996
+ command.params['region'] = region unless region.nil?
1997
+ command.query['fields'] = fields unless fields.nil?
1998
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1999
+ execute_or_queue_command(command, &block)
2000
+ end
2001
+
2002
+ # Returns permissions that a caller has on the specified resource. If the
2003
+ # resource does not exist, this will return an empty set of permissions, not a
2004
+ # NOT_FOUND error.Note: This operation is designed to be used for building
2005
+ # permission-aware UIs and command-line tools, not for authorization checking.
2006
+ # This operation may "fail open" without warning.
2007
+ # @param [String] resource
2008
+ # REQUIRED: The resource for which the policy detail is being requested. See the
2009
+ # operation documentation for the appropriate value for this field.
2010
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
2011
+ # @param [String] fields
2012
+ # Selector specifying which fields to include in a partial response.
2013
+ # @param [String] quota_user
2014
+ # Available to use for quota purposes for server-side applications. Can be any
2015
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2016
+ # @param [Google::Apis::RequestOptions] options
2017
+ # Request-specific options
2018
+ #
2019
+ # @yield [result, err] Result & error if block supplied
2020
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
2021
+ # @yieldparam err [StandardError] error object if request failed
2022
+ #
2023
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
2024
+ #
2025
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2026
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2027
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2028
+ def test_job_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2029
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
2030
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
2031
+ command.request_object = test_iam_permissions_request_object
2032
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
2033
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
2034
+ command.params['resource'] = resource unless resource.nil?
2035
+ command.query['fields'] = fields unless fields.nil?
2036
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2037
+ execute_or_queue_command(command, &block)
2038
+ end
2039
+
2040
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2041
+ # a best effort to cancel the operation, but success is not guaranteed. If the
2042
+ # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
2043
+ # Clients can use Operations.GetOperation or other methods to check whether the
2044
+ # cancellation succeeded or whether the operation completed despite cancellation.
2045
+ # On successful cancellation, the operation is not deleted; instead, it becomes
2046
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
2047
+ # corresponding to Code.CANCELLED.
2048
+ # @param [String] name
2049
+ # The name of the operation resource to be cancelled.
2050
+ # @param [String] fields
2051
+ # Selector specifying which fields to include in a partial response.
2052
+ # @param [String] quota_user
2053
+ # Available to use for quota purposes for server-side applications. Can be any
2054
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2055
+ # @param [Google::Apis::RequestOptions] options
2056
+ # Request-specific options
2057
+ #
2058
+ # @yield [result, err] Result & error if block supplied
2059
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
2060
+ # @yieldparam err [StandardError] error object if request failed
2061
+ #
2062
+ # @return [Google::Apis::DataprocV1beta2::Empty]
2063
+ #
2064
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2065
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2066
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2067
+ def cancel_project_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2068
+ command = make_simple_command(:post, 'v1beta2/{+name}:cancel', options)
2069
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
2070
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
2071
+ command.params['name'] = name unless name.nil?
2072
+ command.query['fields'] = fields unless fields.nil?
2073
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2074
+ execute_or_queue_command(command, &block)
2075
+ end
2076
+
2077
+ # Deletes a long-running operation. This method indicates that the client is no
2078
+ # longer interested in the operation result. It does not cancel the operation.
2079
+ # If the server doesn't support this method, it returns google.rpc.Code.
2080
+ # UNIMPLEMENTED.
2081
+ # @param [String] name
2082
+ # The name of the operation resource to be deleted.
2083
+ # @param [String] fields
2084
+ # Selector specifying which fields to include in a partial response.
2085
+ # @param [String] quota_user
2086
+ # Available to use for quota purposes for server-side applications. Can be any
2087
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2088
+ # @param [Google::Apis::RequestOptions] options
2089
+ # Request-specific options
2090
+ #
2091
+ # @yield [result, err] Result & error if block supplied
2092
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
2093
+ # @yieldparam err [StandardError] error object if request failed
2094
+ #
2095
+ # @return [Google::Apis::DataprocV1beta2::Empty]
2096
+ #
2097
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2098
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2099
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2100
+ def delete_project_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2101
+ command = make_simple_command(:delete, 'v1beta2/{+name}', options)
2102
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
2103
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
2104
+ command.params['name'] = name unless name.nil?
2105
+ command.query['fields'] = fields unless fields.nil?
2106
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2107
+ execute_or_queue_command(command, &block)
2108
+ end
2109
+
2110
+ # Gets the latest state of a long-running operation. Clients can use this method
2111
+ # to poll the operation result at intervals as recommended by the API service.
2112
+ # @param [String] name
2113
+ # The name of the operation resource.
2114
+ # @param [String] fields
2115
+ # Selector specifying which fields to include in a partial response.
2116
+ # @param [String] quota_user
2117
+ # Available to use for quota purposes for server-side applications. Can be any
2118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2119
+ # @param [Google::Apis::RequestOptions] options
2120
+ # Request-specific options
2121
+ #
2122
+ # @yield [result, err] Result & error if block supplied
2123
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
2124
+ # @yieldparam err [StandardError] error object if request failed
2125
+ #
2126
+ # @return [Google::Apis::DataprocV1beta2::Operation]
2127
+ #
2128
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2129
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2130
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2131
+ def get_project_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2132
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
2133
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
2134
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
2135
+ command.params['name'] = name unless name.nil?
2136
+ command.query['fields'] = fields unless fields.nil?
2137
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2138
+ execute_or_queue_command(command, &block)
2139
+ end
2140
+
2141
+ # Gets the access control policy for a resource. Returns an empty policy if the
2142
+ # resource exists and does not have a policy set.
2143
+ # @param [String] resource
2144
+ # REQUIRED: The resource for which the policy is being requested. See the
2145
+ # operation documentation for the appropriate value for this field.
2146
+ # @param [Fixnum] options_requested_policy_version
2147
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
2148
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
2149
+ # with any conditional bindings must specify version 3. Policies without any
2150
+ # conditional bindings may specify any valid value or leave the field unset.To
2151
+ # learn which resources support conditions in their IAM policies, see the IAM
2152
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
2153
+ # @param [String] fields
2154
+ # Selector specifying which fields to include in a partial response.
2155
+ # @param [String] quota_user
2156
+ # Available to use for quota purposes for server-side applications. Can be any
2157
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2158
+ # @param [Google::Apis::RequestOptions] options
2159
+ # Request-specific options
2160
+ #
2161
+ # @yield [result, err] Result & error if block supplied
2162
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
2163
+ # @yieldparam err [StandardError] error object if request failed
2164
+ #
2165
+ # @return [Google::Apis::DataprocV1beta2::Policy]
2166
+ #
2167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2170
+ def get_project_region_operation_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
2171
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
2172
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
2173
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
2174
+ command.params['resource'] = resource unless resource.nil?
2175
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
2176
+ command.query['fields'] = fields unless fields.nil?
2177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2178
+ execute_or_queue_command(command, &block)
2179
+ end
2180
+
2181
+ # Lists operations that match the specified filter in the request. If the server
2182
+ # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
2183
+ # allows API services to override the binding to use different resource name
2184
+ # schemes, such as users/*/operations. To override the binding, API services can
2185
+ # add a binding such as "/v1/`name=users/*`/operations" to their service
2186
+ # configuration. For backwards compatibility, the default name includes the
2187
+ # operations collection id, however overriding users must ensure the name
2188
+ # binding is the parent resource, without the operations collection id.
2189
+ # @param [String] name
2190
+ # The name of the operation's parent resource.
2191
+ # @param [String] filter
2192
+ # The standard list filter.
2193
+ # @param [Fixnum] page_size
2194
+ # The standard list page size.
2195
+ # @param [String] page_token
2196
+ # The standard list page token.
2197
+ # @param [String] fields
2198
+ # Selector specifying which fields to include in a partial response.
2199
+ # @param [String] quota_user
2200
+ # Available to use for quota purposes for server-side applications. Can be any
2201
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2202
+ # @param [Google::Apis::RequestOptions] options
2203
+ # Request-specific options
2204
+ #
2205
+ # @yield [result, err] Result & error if block supplied
2206
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListOperationsResponse] parsed result object
2207
+ # @yieldparam err [StandardError] error object if request failed
2208
+ #
2209
+ # @return [Google::Apis::DataprocV1beta2::ListOperationsResponse]
2210
+ #
2211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2214
+ def list_project_region_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2215
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
2216
+ command.response_representation = Google::Apis::DataprocV1beta2::ListOperationsResponse::Representation
2217
+ command.response_class = Google::Apis::DataprocV1beta2::ListOperationsResponse
2218
+ command.params['name'] = name unless name.nil?
2219
+ command.query['filter'] = filter unless filter.nil?
2220
+ command.query['pageSize'] = page_size unless page_size.nil?
2221
+ command.query['pageToken'] = page_token unless page_token.nil?
2222
+ command.query['fields'] = fields unless fields.nil?
2223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2224
+ execute_or_queue_command(command, &block)
2225
+ end
2226
+
2227
+ # Sets the access control policy on the specified resource. Replaces any
2228
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
2229
+ # errors.
2230
+ # @param [String] resource
2231
+ # REQUIRED: The resource for which the policy is being specified. See the
2232
+ # operation documentation for the appropriate value for this field.
2233
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
2234
+ # @param [String] fields
2235
+ # Selector specifying which fields to include in a partial response.
2236
+ # @param [String] quota_user
2237
+ # Available to use for quota purposes for server-side applications. Can be any
2238
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2239
+ # @param [Google::Apis::RequestOptions] options
2240
+ # Request-specific options
2241
+ #
2242
+ # @yield [result, err] Result & error if block supplied
2243
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
2244
+ # @yieldparam err [StandardError] error object if request failed
2245
+ #
2246
+ # @return [Google::Apis::DataprocV1beta2::Policy]
2247
+ #
2248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2251
+ def set_operation_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2252
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
2253
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
2254
+ command.request_object = set_iam_policy_request_object
2255
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
2256
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
2257
+ command.params['resource'] = resource unless resource.nil?
2258
+ command.query['fields'] = fields unless fields.nil?
2259
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2260
+ execute_or_queue_command(command, &block)
2261
+ end
2262
+
2263
+ # Returns permissions that a caller has on the specified resource. If the
2264
+ # resource does not exist, this will return an empty set of permissions, not a
2265
+ # NOT_FOUND error.Note: This operation is designed to be used for building
2266
+ # permission-aware UIs and command-line tools, not for authorization checking.
2267
+ # This operation may "fail open" without warning.
2268
+ # @param [String] resource
2269
+ # REQUIRED: The resource for which the policy detail is being requested. See the
2270
+ # operation documentation for the appropriate value for this field.
2271
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
2272
+ # @param [String] fields
2273
+ # Selector specifying which fields to include in a partial response.
2274
+ # @param [String] quota_user
2275
+ # Available to use for quota purposes for server-side applications. Can be any
2276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2277
+ # @param [Google::Apis::RequestOptions] options
2278
+ # Request-specific options
2279
+ #
2280
+ # @yield [result, err] Result & error if block supplied
2281
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
2282
+ # @yieldparam err [StandardError] error object if request failed
2283
+ #
2284
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
2285
+ #
2286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2289
+ def test_operation_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2290
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
2291
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
2292
+ command.request_object = test_iam_permissions_request_object
2293
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
2294
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
2295
+ command.params['resource'] = resource unless resource.nil?
2296
+ command.query['fields'] = fields unless fields.nil?
2297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2298
+ execute_or_queue_command(command, &block)
2299
+ end
2300
+
2301
+ # Creates new workflow template.
2302
+ # @param [String] parent
2303
+ # Required. The resource name of the region or location, as described in https://
2304
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2305
+ # workflowTemplates,create, the resource name of the region has the following
2306
+ # format: projects/`project_id`/regions/`region` For projects.locations.
2307
+ # workflowTemplates.create, the resource name of the location has the following
2308
+ # format: projects/`project_id`/locations/`location`
2309
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
2310
+ # @param [String] fields
2311
+ # Selector specifying which fields to include in a partial response.
2312
+ # @param [String] quota_user
2313
+ # Available to use for quota purposes for server-side applications. Can be any
2314
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2315
+ # @param [Google::Apis::RequestOptions] options
2316
+ # Request-specific options
2317
+ #
2318
+ # @yield [result, err] Result & error if block supplied
2319
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
2320
+ # @yieldparam err [StandardError] error object if request failed
2321
+ #
2322
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
2323
+ #
2324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2327
+ def create_project_region_workflow_template(parent, workflow_template_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2328
+ command = make_simple_command(:post, 'v1beta2/{+parent}/workflowTemplates', options)
2329
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2330
+ command.request_object = workflow_template_object
2331
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2332
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
2333
+ command.params['parent'] = parent unless parent.nil?
2334
+ command.query['fields'] = fields unless fields.nil?
2335
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2336
+ execute_or_queue_command(command, &block)
2337
+ end
2338
+
2339
+ # Deletes a workflow template. It does not cancel in-progress workflows.
2340
+ # @param [String] name
2341
+ # Required. The resource name of the workflow template, as described in https://
2342
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2343
+ # workflowTemplates.delete, the resource name of the template has the following
2344
+ # format: projects/`project_id`/regions/`region`/workflowTemplates/`template_id`
2345
+ # For projects.locations.workflowTemplates.instantiate, the resource name of the
2346
+ # template has the following format: projects/`project_id`/locations/`location`/
2347
+ # workflowTemplates/`template_id`
2348
+ # @param [Fixnum] version
2349
+ # Optional. The version of workflow template to delete. If specified, will only
2350
+ # delete the template if the current server version matches specified version.
2351
+ # @param [String] fields
2352
+ # Selector specifying which fields to include in a partial response.
2353
+ # @param [String] quota_user
2354
+ # Available to use for quota purposes for server-side applications. Can be any
2355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2356
+ # @param [Google::Apis::RequestOptions] options
2357
+ # Request-specific options
2358
+ #
2359
+ # @yield [result, err] Result & error if block supplied
2360
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
2361
+ # @yieldparam err [StandardError] error object if request failed
2362
+ #
2363
+ # @return [Google::Apis::DataprocV1beta2::Empty]
2364
+ #
2365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2368
+ def delete_project_region_workflow_template(name, version: nil, fields: nil, quota_user: nil, options: nil, &block)
2369
+ command = make_simple_command(:delete, 'v1beta2/{+name}', options)
2370
+ command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
2371
+ command.response_class = Google::Apis::DataprocV1beta2::Empty
2372
+ command.params['name'] = name unless name.nil?
2373
+ command.query['version'] = version unless version.nil?
2374
+ command.query['fields'] = fields unless fields.nil?
2375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2376
+ execute_or_queue_command(command, &block)
2377
+ end
2378
+
2379
+ # Retrieves the latest workflow template.Can retrieve previously instantiated
2380
+ # template by specifying optional version parameter.
2381
+ # @param [String] name
2382
+ # Required. The resource name of the workflow template, as described in https://
2383
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2384
+ # workflowTemplates.get, the resource name of the template has the following
2385
+ # format: projects/`project_id`/regions/`region`/workflowTemplates/`template_id`
2386
+ # For projects.locations.workflowTemplates.get, the resource name of the
2387
+ # template has the following format: projects/`project_id`/locations/`location`/
2388
+ # workflowTemplates/`template_id`
2389
+ # @param [Fixnum] version
2390
+ # Optional. The version of workflow template to retrieve. Only previously
2391
+ # instantiated versions can be retrieved.If unspecified, retrieves the current
2392
+ # version.
2393
+ # @param [String] fields
2394
+ # Selector specifying which fields to include in a partial response.
2395
+ # @param [String] quota_user
2396
+ # Available to use for quota purposes for server-side applications. Can be any
2397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2398
+ # @param [Google::Apis::RequestOptions] options
2399
+ # Request-specific options
2400
+ #
2401
+ # @yield [result, err] Result & error if block supplied
2402
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
2403
+ # @yieldparam err [StandardError] error object if request failed
2404
+ #
2405
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
2406
+ #
2407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2410
+ def get_project_region_workflow_template(name, version: nil, fields: nil, quota_user: nil, options: nil, &block)
2411
+ command = make_simple_command(:get, 'v1beta2/{+name}', options)
2412
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2413
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
2414
+ command.params['name'] = name unless name.nil?
2415
+ command.query['version'] = version unless version.nil?
2416
+ command.query['fields'] = fields unless fields.nil?
2417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2418
+ execute_or_queue_command(command, &block)
2419
+ end
2420
+
2421
+ # Gets the access control policy for a resource. Returns an empty policy if the
2422
+ # resource exists and does not have a policy set.
2423
+ # @param [String] resource
2424
+ # REQUIRED: The resource for which the policy is being requested. See the
2425
+ # operation documentation for the appropriate value for this field.
2426
+ # @param [Fixnum] options_requested_policy_version
2427
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
2428
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
2429
+ # with any conditional bindings must specify version 3. Policies without any
2430
+ # conditional bindings may specify any valid value or leave the field unset.To
2431
+ # learn which resources support conditions in their IAM policies, see the IAM
2432
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
2433
+ # @param [String] fields
2434
+ # Selector specifying which fields to include in a partial response.
2435
+ # @param [String] quota_user
2436
+ # Available to use for quota purposes for server-side applications. Can be any
2437
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2438
+ # @param [Google::Apis::RequestOptions] options
2439
+ # Request-specific options
2440
+ #
2441
+ # @yield [result, err] Result & error if block supplied
2442
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
2443
+ # @yieldparam err [StandardError] error object if request failed
2444
+ #
2445
+ # @return [Google::Apis::DataprocV1beta2::Policy]
2446
+ #
2447
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2448
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2449
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2450
+ def get_project_region_workflow_template_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
2451
+ command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
2452
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
2453
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
2454
+ command.params['resource'] = resource unless resource.nil?
2455
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
2456
+ command.query['fields'] = fields unless fields.nil?
2457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2458
+ execute_or_queue_command(command, &block)
2459
+ end
2460
+
2461
+ # Instantiates a template and begins execution.The returned Operation can be
2462
+ # used to track execution of workflow by polling operations.get. The Operation
2463
+ # will complete when entire workflow is finished.The running workflow can be
2464
+ # aborted via operations.cancel. This will cause any inflight jobs to be
2465
+ # cancelled and workflow-owned clusters to be deleted.The Operation.metadata
2466
+ # will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/
2467
+ # google.cloud.dataproc.v1beta2#workflowmetadata). Also see Using
2468
+ # WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/
2469
+ # debugging#using_workflowmetadata).On successful completion, Operation.response
2470
+ # will be Empty.
2471
+ # @param [String] name
2472
+ # Required. The resource name of the workflow template, as described in https://
2473
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2474
+ # workflowTemplates.instantiate, the resource name of the template has the
2475
+ # following format: projects/`project_id`/regions/`region`/workflowTemplates/`
2476
+ # template_id` For projects.locations.workflowTemplates.instantiate, the
2477
+ # resource name of the template has the following format: projects/`project_id`/
2478
+ # locations/`location`/workflowTemplates/`template_id`
2479
+ # @param [Google::Apis::DataprocV1beta2::InstantiateWorkflowTemplateRequest] instantiate_workflow_template_request_object
2480
+ # @param [String] fields
2481
+ # Selector specifying which fields to include in a partial response.
2482
+ # @param [String] quota_user
2483
+ # Available to use for quota purposes for server-side applications. Can be any
2484
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2485
+ # @param [Google::Apis::RequestOptions] options
2486
+ # Request-specific options
2487
+ #
2488
+ # @yield [result, err] Result & error if block supplied
2489
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
2490
+ # @yieldparam err [StandardError] error object if request failed
2491
+ #
2492
+ # @return [Google::Apis::DataprocV1beta2::Operation]
2493
+ #
2494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2497
+ def instantiate_project_region_workflow_template(name, instantiate_workflow_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2498
+ command = make_simple_command(:post, 'v1beta2/{+name}:instantiate', options)
2499
+ command.request_representation = Google::Apis::DataprocV1beta2::InstantiateWorkflowTemplateRequest::Representation
2500
+ command.request_object = instantiate_workflow_template_request_object
2501
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
2502
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
2503
+ command.params['name'] = name unless name.nil?
2504
+ command.query['fields'] = fields unless fields.nil?
2505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2506
+ execute_or_queue_command(command, &block)
2507
+ end
2508
+
2509
+ # Instantiates a template and begins execution.This method is equivalent to
2510
+ # executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate,
2511
+ # DeleteWorkflowTemplate.The returned Operation can be used to track execution
2512
+ # of workflow by polling operations.get. The Operation will complete when entire
2513
+ # workflow is finished.The running workflow can be aborted via operations.cancel.
2514
+ # This will cause any inflight jobs to be cancelled and workflow-owned clusters
2515
+ # to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.
2516
+ # google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#
2517
+ # workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/
2518
+ # dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
2519
+ # successful completion, Operation.response will be Empty.
2520
+ # @param [String] parent
2521
+ # Required. The resource name of the region or location, as described in https://
2522
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2523
+ # workflowTemplates,instantiateinline, the resource name of the region has the
2524
+ # following format: projects/`project_id`/regions/`region` For projects.
2525
+ # locations.workflowTemplates.instantiateinline, the resource name of the
2526
+ # location has the following format: projects/`project_id`/locations/`location`
2527
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
2528
+ # @param [String] instance_id
2529
+ # Deprecated. Please use request_id field instead.
2530
+ # @param [String] request_id
2531
+ # Optional. A tag that prevents multiple concurrent workflow instances with the
2532
+ # same tag from running. This mitigates risk of concurrent instances started due
2533
+ # to retries.It is recommended to always set this value to a UUID (https://en.
2534
+ # wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only
2535
+ # letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The
2536
+ # maximum length is 40 characters.
2537
+ # @param [String] fields
2538
+ # Selector specifying which fields to include in a partial response.
2539
+ # @param [String] quota_user
2540
+ # Available to use for quota purposes for server-side applications. Can be any
2541
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2542
+ # @param [Google::Apis::RequestOptions] options
2543
+ # Request-specific options
2544
+ #
2545
+ # @yield [result, err] Result & error if block supplied
2546
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
2547
+ # @yieldparam err [StandardError] error object if request failed
2548
+ #
2549
+ # @return [Google::Apis::DataprocV1beta2::Operation]
2550
+ #
2551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2554
+ def instantiate_project_region_workflow_template_inline(parent, workflow_template_object = nil, instance_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2555
+ command = make_simple_command(:post, 'v1beta2/{+parent}/workflowTemplates:instantiateInline', options)
2556
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2557
+ command.request_object = workflow_template_object
2558
+ command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
2559
+ command.response_class = Google::Apis::DataprocV1beta2::Operation
2560
+ command.params['parent'] = parent unless parent.nil?
2561
+ command.query['instanceId'] = instance_id unless instance_id.nil?
2562
+ command.query['requestId'] = request_id unless request_id.nil?
2563
+ command.query['fields'] = fields unless fields.nil?
2564
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2565
+ execute_or_queue_command(command, &block)
2566
+ end
2567
+
2568
+ # Lists workflows that match the specified filter in the request.
2569
+ # @param [String] parent
2570
+ # Required. The resource name of the region or location, as described in https://
2571
+ # cloud.google.com/apis/design/resource_names. For projects.regions.
2572
+ # workflowTemplates,list, the resource name of the region has the following
2573
+ # format: projects/`project_id`/regions/`region` For projects.locations.
2574
+ # workflowTemplates.list, the resource name of the location has the following
2575
+ # format: projects/`project_id`/locations/`location`
2576
+ # @param [Fixnum] page_size
2577
+ # Optional. The maximum number of results to return in each response.
2578
+ # @param [String] page_token
2579
+ # Optional. The page token, returned by a previous call, to request the next
2580
+ # page of results.
2581
+ # @param [String] fields
2582
+ # Selector specifying which fields to include in a partial response.
2583
+ # @param [String] quota_user
2584
+ # Available to use for quota purposes for server-side applications. Can be any
2585
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2586
+ # @param [Google::Apis::RequestOptions] options
2587
+ # Request-specific options
2588
+ #
2589
+ # @yield [result, err] Result & error if block supplied
2590
+ # @yieldparam result [Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse] parsed result object
2591
+ # @yieldparam err [StandardError] error object if request failed
2592
+ #
2593
+ # @return [Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse]
2594
+ #
2595
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2596
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2597
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2598
+ def list_project_region_workflow_templates(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2599
+ command = make_simple_command(:get, 'v1beta2/{+parent}/workflowTemplates', options)
2600
+ command.response_representation = Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse::Representation
2601
+ command.response_class = Google::Apis::DataprocV1beta2::ListWorkflowTemplatesResponse
2602
+ command.params['parent'] = parent unless parent.nil?
2603
+ command.query['pageSize'] = page_size unless page_size.nil?
2604
+ command.query['pageToken'] = page_token unless page_token.nil?
2605
+ command.query['fields'] = fields unless fields.nil?
2606
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2607
+ execute_or_queue_command(command, &block)
2608
+ end
2609
+
2610
+ # Sets the access control policy on the specified resource. Replaces any
2611
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
2612
+ # errors.
2613
+ # @param [String] resource
2614
+ # REQUIRED: The resource for which the policy is being specified. See the
2615
+ # operation documentation for the appropriate value for this field.
2616
+ # @param [Google::Apis::DataprocV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
2617
+ # @param [String] fields
2618
+ # Selector specifying which fields to include in a partial response.
2619
+ # @param [String] quota_user
2620
+ # Available to use for quota purposes for server-side applications. Can be any
2621
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2622
+ # @param [Google::Apis::RequestOptions] options
2623
+ # Request-specific options
2624
+ #
2625
+ # @yield [result, err] Result & error if block supplied
2626
+ # @yieldparam result [Google::Apis::DataprocV1beta2::Policy] parsed result object
2627
+ # @yieldparam err [StandardError] error object if request failed
2628
+ #
2629
+ # @return [Google::Apis::DataprocV1beta2::Policy]
2630
+ #
2631
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2632
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2633
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2634
+ def set_project_region_workflow_template_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2635
+ command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
2636
+ command.request_representation = Google::Apis::DataprocV1beta2::SetIamPolicyRequest::Representation
2637
+ command.request_object = set_iam_policy_request_object
2638
+ command.response_representation = Google::Apis::DataprocV1beta2::Policy::Representation
2639
+ command.response_class = Google::Apis::DataprocV1beta2::Policy
2640
+ command.params['resource'] = resource unless resource.nil?
2641
+ command.query['fields'] = fields unless fields.nil?
2642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2643
+ execute_or_queue_command(command, &block)
2644
+ end
2645
+
2646
+ # Returns permissions that a caller has on the specified resource. If the
2647
+ # resource does not exist, this will return an empty set of permissions, not a
2648
+ # NOT_FOUND error.Note: This operation is designed to be used for building
2649
+ # permission-aware UIs and command-line tools, not for authorization checking.
2650
+ # This operation may "fail open" without warning.
2651
+ # @param [String] resource
2652
+ # REQUIRED: The resource for which the policy detail is being requested. See the
2653
+ # operation documentation for the appropriate value for this field.
2654
+ # @param [Google::Apis::DataprocV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
2655
+ # @param [String] fields
2656
+ # Selector specifying which fields to include in a partial response.
2657
+ # @param [String] quota_user
2658
+ # Available to use for quota purposes for server-side applications. Can be any
2659
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2660
+ # @param [Google::Apis::RequestOptions] options
2661
+ # Request-specific options
2662
+ #
2663
+ # @yield [result, err] Result & error if block supplied
2664
+ # @yieldparam result [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse] parsed result object
2665
+ # @yieldparam err [StandardError] error object if request failed
2666
+ #
2667
+ # @return [Google::Apis::DataprocV1beta2::TestIamPermissionsResponse]
2668
+ #
2669
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2670
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2671
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2672
+ def test_project_region_workflow_template_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2673
+ command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
2674
+ command.request_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsRequest::Representation
2675
+ command.request_object = test_iam_permissions_request_object
2676
+ command.response_representation = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse::Representation
2677
+ command.response_class = Google::Apis::DataprocV1beta2::TestIamPermissionsResponse
2678
+ command.params['resource'] = resource unless resource.nil?
2679
+ command.query['fields'] = fields unless fields.nil?
2680
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2681
+ execute_or_queue_command(command, &block)
2682
+ end
2683
+
2684
+ # Updates (replaces) workflow template. The updated template must contain
2685
+ # version that matches the current server version.
2686
+ # @param [String] name
2687
+ # Output only. The resource name of the workflow template, as described in https:
2688
+ # //cloud.google.com/apis/design/resource_names. For projects.regions.
2689
+ # workflowTemplates, the resource name of the template has the following format:
2690
+ # projects/`project_id`/regions/`region`/workflowTemplates/`template_id` For
2691
+ # projects.locations.workflowTemplates, the resource name of the template has
2692
+ # the following format: projects/`project_id`/locations/`location`/
2693
+ # workflowTemplates/`template_id`
2694
+ # @param [Google::Apis::DataprocV1beta2::WorkflowTemplate] workflow_template_object
2695
+ # @param [String] fields
2696
+ # Selector specifying which fields to include in a partial response.
2697
+ # @param [String] quota_user
2698
+ # Available to use for quota purposes for server-side applications. Can be any
2699
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2700
+ # @param [Google::Apis::RequestOptions] options
2701
+ # Request-specific options
2702
+ #
2703
+ # @yield [result, err] Result & error if block supplied
2704
+ # @yieldparam result [Google::Apis::DataprocV1beta2::WorkflowTemplate] parsed result object
2705
+ # @yieldparam err [StandardError] error object if request failed
2706
+ #
2707
+ # @return [Google::Apis::DataprocV1beta2::WorkflowTemplate]
2708
+ #
2709
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2710
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2711
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2712
+ def update_project_region_workflow_template(name, workflow_template_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2713
+ command = make_simple_command(:put, 'v1beta2/{+name}', options)
2714
+ command.request_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2715
+ command.request_object = workflow_template_object
2716
+ command.response_representation = Google::Apis::DataprocV1beta2::WorkflowTemplate::Representation
2717
+ command.response_class = Google::Apis::DataprocV1beta2::WorkflowTemplate
2718
+ command.params['name'] = name unless name.nil?
2719
+ command.query['fields'] = fields unless fields.nil?
2720
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2721
+ execute_or_queue_command(command, &block)
2722
+ end
2723
+
2724
+ protected
2725
+
2726
+ def apply_command_defaults(command)
2727
+ command.query['key'] = key unless key.nil?
2728
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2729
+ end
2730
+ end
2731
+ end
2732
+ end
2733
+ end