google-apis-dataproc_v1 0.1.0

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