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, 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, 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, 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, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: 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, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Updates a cluster 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
Constructor Details
#initialize ⇒ DataprocService
Returns a new instance of DataprocService.
45 46 47 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 45 def initialize super('https://dataproc.googleapis.com/', '') 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.
440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 440 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.
588 589 590 591 592 593 594 595 596 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 588 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Creates a cluster in a project.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 73 def create_cluster(project_id, region, cluster_object = 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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Deletes a cluster in a project.
163 164 165 166 167 168 169 170 171 172 173 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 163 def delete_cluster(project_id, region, cluster_name, 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['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
.
479 480 481 482 483 484 485 486 487 488 489 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 479 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
.
621 622 623 624 625 626 627 628 629 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 621 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
.
279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 279 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.
200 201 202 203 204 205 206 207 208 209 210 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 200 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.
353 354 355 356 357 358 359 360 361 362 363 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 353 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.
512 513 514 515 516 517 518 519 520 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 512 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, 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.
239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 239 def list_clusters(project_id, region, 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['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, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::ListJobsResponse
Lists regions/region
/jobs in a project.
397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 397 def list_jobs(project_id, region, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: 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['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['clusterName'] = cluster_name unless cluster_name.nil? command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.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 below allows API services to override the binding to use different
resource name schemes, such as users/*/operations
.
551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 551 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, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataprocV1::Operation
Updates a cluster in a project.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 123 def patch_cluster(project_id, region, cluster_name, cluster_object = 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['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.
316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'generated/google/apis/dataproc_v1/service.rb', line 316 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 |