Class: Google::Apis::DataprocV1::DataprocService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DataprocV1::DataprocService
- Defined in:
- generated/google/apis/dataproc_v1/service.rb
Overview
Google Cloud Dataproc API
Manages Hadoop-based clusters and jobs on Google Cloud Platform.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Starts a job cancellation request.
-
#cancel_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_cluster(project_id, region, cluster_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Creates a cluster in a project.
-
#delete_cluster(project_id, region, cluster_name, cluster_uuid: nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Deletes a cluster in a project.
-
#delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Deletes the job from the project.
-
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Deletes a long-running operation.
-
#diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Gets cluster diagnostic information.
-
#get_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Cluster
Gets the resource representation for a cluster in a project.
-
#get_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Gets the resource representation for a job in a project.
-
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Gets the latest state of a long-running operation.
-
#initialize ⇒ DataprocService
constructor
A new instance of DataprocService.
-
#list_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListClustersResponse
Lists all regions/
region
/clusters in a project. -
#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) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListJobsResponse
Lists regions/
region
/jobs in a project. -
#list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#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) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Updates a cluster in a project.
-
#patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Updates a job in a project.
-
#submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Submits a job to a cluster.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DataprocService
Returns a new instance of DataprocService
45 46 47 48 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 45 def initialize super('https://dataproc.googleapis.com/', '') @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Starts a job cancellation request. To access the job resource after
cancellation, call regions/region
/jobs.list or regions/region
/jobs.get.
389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 389 def cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', ) command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation command.request_object = cancel_job_request_object command.response_representation = Google::Apis::DataprocV1::Job::Representation command.response_class = Google::Apis::DataprocV1::Job command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
642 643 644 645 646 647 648 649 650 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 642 def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::DataprocV1::Empty::Representation command.response_class = Google::Apis::DataprocV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_cluster(project_id, region, cluster_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Creates a cluster in a project.
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 82 def create_cluster(project_id, region, cluster_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters', ) command.request_representation = Google::Apis::DataprocV1::Cluster::Representation command.request_object = cluster_object command.response_representation = Google::Apis::DataprocV1::Operation::Representation command.response_class = Google::Apis::DataprocV1::Operation command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_cluster(project_id, region, cluster_name, cluster_uuid: nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Deletes a cluster in a project.
132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 132 def delete_cluster(project_id, region, cluster_name, cluster_uuid: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', ) command.response_representation = Google::Apis::DataprocV1::Operation::Representation command.response_class = Google::Apis::DataprocV1::Operation command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil? command.query['clusterUuid'] = cluster_uuid unless cluster_uuid.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.
428 429 430 431 432 433 434 435 436 437 438 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 428 def delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', ) command.response_representation = Google::Apis::DataprocV1::Empty::Representation command.response_class = Google::Apis::DataprocV1::Empty command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Empty
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code. UNIMPLEMENTED.
675 676 677 678 679 680 681 682 683 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 675 def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::DataprocV1::Empty::Representation command.response_class = Google::Apis::DataprocV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.
173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 173 def diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', ) command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation command.request_object = diagnose_cluster_request_object command.response_representation = Google::Apis::DataprocV1::Operation::Representation command.response_class = Google::Apis::DataprocV1::Operation command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Cluster
Gets the resource representation for a cluster in a project.
212 213 214 215 216 217 218 219 220 221 222 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 212 def get_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', ) command.response_representation = Google::Apis::DataprocV1::Cluster::Representation command.response_class = Google::Apis::DataprocV1::Cluster command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Gets the resource representation for a job in a project.
464 465 466 467 468 469 470 471 472 473 474 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 464 def get_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', ) command.response_representation = Google::Apis::DataprocV1::Job::Representation command.response_class = Google::Apis::DataprocV1::Job command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
706 707 708 709 710 711 712 713 714 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 706 def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DataprocV1::Operation::Representation command.response_class = Google::Apis::DataprocV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListClustersResponse
Lists all regions/region
/clusters in a project.
263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 263 def list_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', ) command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation command.response_class = Google::Apis::DataprocV1::ListClustersResponse command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#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) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListJobsResponse
Lists regions/region
/jobs in a project.
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 517 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) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', ) command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation command.response_class = Google::Apis::DataprocV1::ListJobsResponse command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.query['clusterName'] = cluster_name unless cluster_name.nil? command.query['filter'] = filter unless filter.nil? command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users//operations. To override the binding, API services can add a binding such as "/v1/`name=users/`/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
749 750 751 752 753 754 755 756 757 758 759 760 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 749 def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation command.response_class = Google::Apis::DataprocV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#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) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Updates a cluster in a project.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 346 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) command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', ) command.request_representation = Google::Apis::DataprocV1::Cluster::Representation command.request_object = cluster_object command.response_representation = Google::Apis::DataprocV1::Operation::Representation command.response_class = Google::Apis::DataprocV1::Operation command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil? command.query['gracefulDecommissionTimeout'] = graceful_decommission_timeout unless graceful_decommission_timeout.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Updates a job in a project.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 564 def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', ) command.request_representation = Google::Apis::DataprocV1::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::DataprocV1::Job::Representation command.response_class = Google::Apis::DataprocV1::Job command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Job
Submits a job to a cluster.
602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 602 def submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', ) command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation command.request_object = submit_job_request_object command.response_representation = Google::Apis::DataprocV1::Job::Representation command.response_class = Google::Apis::DataprocV1::Job command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |