Dataflow V1beta3 API - Class Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client (v0.6.0)

Reference documentation and code samples for the Dataflow V1beta3 API class Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.

REST client for the Jobs service.

Provides a method to create and modify Google Cloud Dataflow jobs. A Job is a multi-stage computation graph run by the Cloud Dataflow service.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Jobs Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Jobs clients
::Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#aggregated_list_jobs

def aggregated_list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
def aggregated_list_jobs(filter: nil, project_id: nil, view: nil, page_size: nil, page_token: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse

List the jobs of a project across all regions.

Overloads
def aggregated_list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
Pass arguments to aggregated_list_jobs via a request object, either of type ListJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::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 aggregated_list_jobs(filter: nil, project_id: nil, view: nil, page_size: nil, page_token: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
Pass arguments to aggregated_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).
Parameters
  • filter (::Google::Cloud::Dataflow::V1beta3::ListJobsRequest::Filter) — The kind of filter to use.
  • project_id (::String) — The project which owns the jobs.
  • view (::Google::Cloud::Dataflow::V1beta3::JobView) — Deprecated. ListJobs always returns summaries now. Use GetJob for other JobViews.
  • page_size (::Integer) — If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.
  • page_token (::String) — Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
  • location (::String) — The regional endpoint that contains this job.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Jobs 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_job

def create_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
def create_job(project_id: nil, job: nil, view: nil, replace_job_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job

Creates a Cloud Dataflow job.

To create a job, we recommend using projects.locations.jobs.create with a regional endpoint. Using projects.jobs.create is not recommended, as your job will always start in us-central1.

Overloads
def create_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to create_job via a request object, either of type CreateJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::CreateJobRequest, ::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 create_job(project_id: nil, job: nil, view: nil, replace_job_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to create_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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_job

def get_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
def get_job(project_id: nil, job_id: nil, view: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job

Gets the state of the specified Cloud Dataflow job.

To get the state of a job, we recommend using projects.locations.jobs.get with a regional endpoint. Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1.

Overloads
def get_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to get_job via a request object, either of type GetJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::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, job_id: nil, view: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to 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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new Jobs REST client object.

Yields
  • (config) — Configure the Jobs client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_jobs

def list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
def list_jobs(filter: nil, project_id: nil, view: nil, page_size: nil, page_token: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse

List the jobs of a project.

To list the jobs of a project in a region, we recommend using projects.locations.jobs.list with a regional endpoint. To list the all jobs across all regions, use projects.jobs.aggregated. Using projects.jobs.list is not recommended, as you can only get the list of jobs that are running in us-central1.

Overloads
def list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
Pass arguments to list_jobs via a request object, either of type ListJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::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(filter: nil, project_id: nil, view: nil, page_size: nil, page_token: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
Pass arguments to 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).
Parameters
  • filter (::Google::Cloud::Dataflow::V1beta3::ListJobsRequest::Filter) — The kind of filter to use.
  • project_id (::String) — The project which owns the jobs.
  • view (::Google::Cloud::Dataflow::V1beta3::JobView) — Deprecated. ListJobs always returns summaries now. Use GetJob for other JobViews.
  • page_size (::Integer) — If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.
  • page_token (::String) — Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
  • location (::String) — The regional endpoint that contains this job.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#snapshot_job

def snapshot_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
def snapshot_job(project_id: nil, job_id: nil, ttl: nil, location: nil, snapshot_sources: nil, description: nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot

Snapshot the state of a streaming job.

Overloads
def snapshot_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
Pass arguments to snapshot_job via a request object, either of type SnapshotJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::SnapshotJobRequest, ::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 snapshot_job(project_id: nil, job_id: nil, ttl: nil, location: nil, snapshot_sources: nil, description: nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
Pass arguments to snapshot_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).
Parameters
  • project_id (::String) — The project which owns the job to be snapshotted.
  • job_id (::String) — The job to be snapshotted.
  • ttl (::Google::Protobuf::Duration, ::Hash) — TTL for the snapshot.
  • location (::String) — The location that contains this job.
  • snapshot_sources (::Boolean) — If true, perform snapshots for sources which support this.
  • description (::String) — User specified description of the snapshot. Maybe empty.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_job

def update_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
def update_job(project_id: nil, job_id: nil, job: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job

Updates the state of an existing Cloud Dataflow job.

To update the state of an existing job, we recommend using projects.locations.jobs.update with a regional endpoint. Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1.

Overloads
def update_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to update_job via a request object, either of type UpdateJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::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, job_id: nil, job: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to 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).
Parameters
  • project_id (::String) — The ID of the Cloud Platform project that the job belongs to.
  • job_id (::String) — The job ID.
  • job (::Google::Cloud::Dataflow::V1beta3::Job, ::Hash) — The updated job. Only the job state is updatable; other fields will be ignored.
  • location (::String) — The regional endpoint that contains this job.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.