Reference documentation and code samples for the Cloud Dataproc V1 API class Google::Cloud::Dataproc::V1::JobController::Rest::Client.
REST client for the JobController service.
The JobController provides methods to manage jobs.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the JobController Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all JobController clients ::Google::Cloud::Dataproc::V1::JobController::Rest::Client.configure do |config| config.timeout = 10.0 end
#cancel_job
def cancel_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
def cancel_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.
def cancel_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
cancel_job
via a request object, either of type
CancelJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::CancelJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def cancel_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
cancel_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the JobController Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#delete_job
def delete_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Protobuf::Empty
Deletes the job from the project. If the job is active, the delete fails,
and the response returns FAILED_PRECONDITION
.
def delete_job(request, options = nil) -> ::Google::Protobuf::Empty
delete_job
via a request object, either of type
DeleteJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::DeleteJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Protobuf::Empty
delete_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_job
def get_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
def get_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
Gets the resource representation for a job in a project.
def get_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
get_job
via a request object, either of type
GetJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::GetJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
get_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new JobController REST client object.
- (config) — Configure the JobController client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dataproc::V1::JobController::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dataproc::V1::JobController::Rest::Client.new do |config| config.timeout = 10.0 end
#list_jobs
def list_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>
def list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>
Lists regions/{region}/jobs in a project.
def list_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>
list_jobs
via a request object, either of type
ListJobsRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::ListJobsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>
list_jobs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- page_size (::Integer) — Optional. The number of results to return in each response.
- page_token (::String) — Optional. The page token, returned by a previous call, to request the next page of results.
- cluster_name (::String) — Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.
-
job_state_matcher (::Google::Cloud::Dataproc::V1::ListJobsRequest::JobStateMatcher) — Optional. Specifies enumerated categories of jobs to list.
(default = match ALL jobs).
If
filter
is provided,jobStateMatcher
will be ignored. -
filter (::String) — Optional. A filter constraining the jobs to list. Filters are
case-sensitive and have the following syntax:
[field = value] AND [field [= value]] ...
where field is
status.state
orlabels.[KEY]
, and[KEY]
is a label key. value can be*
to match all values.status.state
can be eitherACTIVE
orNON_ACTIVE
. Only the logicalAND
operator is supported; space-separated items are treated as having an implicitAND
operator.Example filter:
status.state = ACTIVE AND labels.env = staging AND labels.starred = *
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#operations_client
def operations_client() -> ::Google::Cloud::Dataproc::V1::JobController::Rest::Operations
Get the associated client for long-running operations.
#submit_job
def submit_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
def submit_job(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
Submits a job to a cluster.
def submit_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
submit_job
via a request object, either of type
SubmitJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::SubmitJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def submit_job(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Google::Cloud::Dataproc::V1::Job
submit_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job (::Google::Cloud::Dataproc::V1::Job, ::Hash) — Required. The job resource.
-
request_id (::String) — Optional. A unique id used to identify the request. If the server
receives two
SubmitJobRequests
with the same id, then the second request will be ignored and the
first Job created and stored in the backend
is returned.
It is recommended to always set this value to a UUID.
The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#submit_job_as_operation
def submit_job_as_operation(request, options = nil) -> ::Gapic::Operation
def submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Gapic::Operation
Submits job to a cluster.
def submit_job_as_operation(request, options = nil) -> ::Gapic::Operation
submit_job_as_operation
via a request object, either of type
SubmitJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::SubmitJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Gapic::Operation
submit_job_as_operation
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job (::Google::Cloud::Dataproc::V1::Job, ::Hash) — Required. The job resource.
-
request_id (::String) — Optional. A unique id used to identify the request. If the server
receives two
SubmitJobRequests
with the same id, then the second request will be ignored and the
first Job created and stored in the backend
is returned.
It is recommended to always set this value to a UUID.
The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#update_job
def update_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
def update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil) -> ::Google::Cloud::Dataproc::V1::Job
Updates a job in a project.
def update_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1::Job
update_job
via a request object, either of type
UpdateJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::UpdateJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil) -> ::Google::Cloud::Dataproc::V1::Job
update_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- job (::Google::Cloud::Dataproc::V1::Job, ::Hash) — Required. The changes to the job.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Specifies the path, relative to
Job
, of the field to update. For example, to update the labels of a Job theupdate_mask
parameter would be specified aslabels
, and thePATCH
request body would specify the new value. Note: Currently,labels
is the only field that can be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.