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
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
def aggregated_list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
aggregated_list_jobs
via a request object, either of type
ListJobsRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::ListJobsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::ListJobsRequest.new # Call the aggregated_list_jobs method. result = client.aggregated_list_jobs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dataflow::V1beta3::Job. p item end
#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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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
.
def create_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
create_job
via a request object, either of type
CreateJobRequest or an equivalent Hash.
- 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
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).
- project_id (::String) — The ID of the Cloud Platform project that the job belongs to.
- job (::Google::Cloud::Dataflow::V1beta3::Job, ::Hash) — The job to create.
- view (::Google::Cloud::Dataflow::V1beta3::JobView) — The level of information requested in response.
- replace_job_id (::String) — Deprecated. This field is now in the Job message.
- location (::String) — The regional endpoint that contains this job.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::CreateJobRequest.new # Call the create_job method. result = client.create_job request # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job. p result
#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
.
def get_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
get_job
via a request object, either of type
GetJobRequest or an equivalent Hash.
- 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
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) — The ID of the Cloud Platform project that the job belongs to.
- job_id (::String) — The job ID.
- view (::Google::Cloud::Dataflow::V1beta3::JobView) — The level of information requested in response.
- location (::String) — The regional endpoint that contains this job.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::GetJobRequest.new # Call the get_job method. result = client.get_job request # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new Jobs REST client object.
- (config) — Configure the Jobs client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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
.
def list_jobs(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListJobsResponse
list_jobs
via a request object, either of type
ListJobsRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::ListJobsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::ListJobsRequest.new # Call the list_jobs method. result = client.list_jobs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dataflow::V1beta3::Job. p item end
#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.
def snapshot_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
snapshot_job
via a request object, either of type
SnapshotJobRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::Snapshot)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::SnapshotJobRequest.new # Call the snapshot_job method. result = client.snapshot_job request # The returned object is of type Google::Cloud::Dataflow::V1beta3::Snapshot. p result
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#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
.
def update_job(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
update_job
via a request object, either of type
UpdateJobRequest or an equivalent Hash.
- 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
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) — 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataflow::V1beta3::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataflow/v1beta3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataflow::V1beta3::Jobs::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataflow::V1beta3::UpdateJobRequest.new # Call the update_job method. result = client.update_job request # The returned object is of type Google::Cloud::Dataflow::V1beta3::Job. p result