Cloud Life Sciences V2beta API - Class Google::Cloud::LifeSciences::V2beta::WorkflowsService::Rest::Client (v0.8.0)

Reference documentation and code samples for the Cloud Life Sciences V2beta API class Google::Cloud::LifeSciences::V2beta::WorkflowsService::Rest::Client.

REST client for the WorkflowsService service.

A service for running workflows, such as pipelines consisting of Docker containers.

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the WorkflowsService 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

#initialize

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

Create a new WorkflowsService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#operations_client

def operations_client() -> ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Rest::Operations

Get the associated client for long-running operations.

#run_pipeline

def run_pipeline(request, options = nil) -> ::Gapic::Operation
def run_pipeline(parent: nil, pipeline: nil, labels: nil, pub_sub_topic: nil) -> ::Gapic::Operation

Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] field will contain a google.cloud.lifesciences.v2beta.Metadata object describing the status of the pipeline execution. The response field will contain a google.cloud.lifesciences.v2beta.RunPipelineResponse object if the pipeline completes successfully.

Note: Before you can use this method, the Life Sciences Service Agent must have access to your project. This is done automatically when the Cloud Life Sciences API is first enabled, but if you delete this permission you must disable and re-enable the API to grant the Life Sciences Service Agent the required permissions. Authorization requires the following Google IAM permission:

  • lifesciences.workflows.run
Overloads
def run_pipeline(request, options = nil) -> ::Gapic::Operation
Pass arguments to run_pipeline via a request object, either of type RunPipelineRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::LifeSciences::V2beta::RunPipelineRequest, ::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 run_pipeline(parent: nil, pipeline: nil, labels: nil, pub_sub_topic: nil) -> ::Gapic::Operation
Pass arguments to run_pipeline 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
  • parent (::String) — The project and location that this request should be executed against.
  • pipeline (::Google::Cloud::LifeSciences::V2beta::Pipeline, ::Hash) — Required. The description of the pipeline to run.
  • labels (::Hash{::String => ::String}) — User-defined labels to associate with the returned operation. These labels are not propagated to any Google Cloud Platform resources used by the operation, and can be modified at any time.

    To associate labels with resources created while executing the operation, see the appropriate resource message (for example, VirtualMachine).

  • pub_sub_topic (::String) — The name of an existing Pub/Sub topic. The server will publish messages to this topic whenever the status of the operation changes. The Life Sciences Service Agent account must have publisher permissions to the specified topic or notifications will not be sent.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/life_sciences/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::LifeSciences::V2beta::WorkflowsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::LifeSciences::V2beta::RunPipelineRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)