Dataflow V1beta3 API - Class Google::Cloud::Dataflow::V1beta3::TemplatesService::Rest::Client (v0.9.0)

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

REST client for the TemplatesService service.

Provides a method to create Cloud Dataflow jobs from templates.

Inherits

  • Object

Methods

.configure

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

Configure the TemplatesService 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 TemplatesService clients
::Google::Cloud::Dataflow::V1beta3::TemplatesService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the TemplatesService 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_from_template

def create_job_from_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
def create_job_from_template(project_id: nil, job_name: nil, gcs_path: nil, parameters: nil, environment: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job

Creates a Cloud Dataflow job from a template.

Overloads
def create_job_from_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to create_job_from_template via a request object, either of type CreateJobFromTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::CreateJobFromTemplateRequest, ::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_from_template(project_id: nil, job_name: nil, gcs_path: nil, parameters: nil, environment: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Job
Pass arguments to create_job_from_template 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) — Required. The ID of the Cloud Platform project that the job belongs to.
  • job_name (::String) — Required. The job name to use for the created job.
  • gcs_path (::String) — Required. A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with gs://.
  • parameters (::Hash{::String => ::String}) — The runtime parameters to pass to the job.
  • environment (::Google::Cloud::Dataflow::V1beta3::RuntimeEnvironment, ::Hash) — The runtime environment for the job.
  • location (::String) — The regional endpoint to which to direct the request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::TemplatesService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::CreateJobFromTemplateRequest.new

# Call the create_job_from_template method.
result = client.create_job_from_template request

# The returned object is of type Google::Cloud::Dataflow::V1beta3::Job.
p result

#get_template

def get_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::GetTemplateResponse
def get_template(project_id: nil, gcs_path: nil, view: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::GetTemplateResponse

Get the template associated with a template.

Overloads
def get_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::GetTemplateResponse
Pass arguments to get_template via a request object, either of type GetTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::GetTemplateRequest, ::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_template(project_id: nil, gcs_path: nil, view: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::GetTemplateResponse
Pass arguments to get_template 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) — Required. The ID of the Cloud Platform project that the job belongs to.
  • gcs_path (::String) — Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.
  • view (::Google::Cloud::Dataflow::V1beta3::GetTemplateRequest::TemplateView) — The view to retrieve. Defaults to METADATA_ONLY.
  • location (::String) — The regional endpoint to which to direct the request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::TemplatesService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::GetTemplateRequest.new

# Call the get_template method.
result = client.get_template request

# The returned object is of type Google::Cloud::Dataflow::V1beta3::GetTemplateResponse.
p result

#initialize

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

Create a new TemplatesService REST client object.

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

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

#launch_template

def launch_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse
def launch_template(project_id: nil, validate_only: nil, gcs_path: nil, dynamic_template: nil, launch_parameters: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse

Launch a template.

Overloads
def launch_template(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse
Pass arguments to launch_template via a request object, either of type LaunchTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::LaunchTemplateRequest, ::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 launch_template(project_id: nil, validate_only: nil, gcs_path: nil, dynamic_template: nil, launch_parameters: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse
Pass arguments to launch_template 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) — Required. The ID of the Cloud Platform project that the job belongs to.
  • validate_only (::Boolean) — If true, the request is validated but not actually executed. Defaults to false.
  • gcs_path (::String) — A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.
  • dynamic_template (::Google::Cloud::Dataflow::V1beta3::DynamicTemplateLaunchParams, ::Hash) — Params for launching a dynamic template.
  • launch_parameters (::Google::Cloud::Dataflow::V1beta3::LaunchTemplateParameters, ::Hash) — The parameters of the template to launch. This should be part of the body of the POST request.
  • location (::String) — The regional endpoint to which to direct the request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::TemplatesService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::LaunchTemplateRequest.new

# Call the launch_template method.
result = client.launch_template request

# The returned object is of type Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)