# Cloud Dataproc V1beta2 API - Class Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client (v0.6.3)

Reference documentation and code samples for the Cloud Dataproc V1beta2 API class Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.

Client for the WorkflowTemplateService service.


<br />

The API interface for managing Workflow Templates in the
Dataproc API.

## Inherits

- Object

## Includes

- [Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Paths)

## Methods

### .configure

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

Configure the WorkflowTemplateService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all WorkflowTemplateService clients
::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the WorkflowTemplateService 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client#Google__Cloud__Dataproc__V1beta2__WorkflowTemplateService__Client_configure_class_ "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration))

### #create_workflow_template

    def create_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate
    def create_workflow_template(parent: nil, template: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Creates new workflow template.
**Overloads**

    def create_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `create_workflow_template` via a request object, either of type [CreateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-CreateWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-CreateWorkflowTemplateRequest), ::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_workflow_template(parent: nil, template: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `create_workflow_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**

- **parent** (::String) ---

  Required. The resource name of the region or location, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates,create`, the resource name of the
    region has the following format:
    `projects/{project_id}/regions/{region}`

  - For `projects.locations.workflowTemplates.create`, the resource name of
    the location has the following format:
    `projects/{project_id}/locations/{location}`

- **template** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate), ::Hash) --- Required. The Dataproc workflow template to create.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #delete_workflow_template

    def delete_workflow_template(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_workflow_template(name: nil, version: nil) -> ::Google::Protobuf::Empty

Deletes a workflow template. It does not cancel in-progress workflows.
**Overloads**

    def delete_workflow_template(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_workflow_template` via a request object, either of type [DeleteWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DeleteWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DeleteWorkflowTemplateRequest), ::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_workflow_template(name: nil, version: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_workflow_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**

- **name** (::String) ---

  Required. The resource name of the workflow template, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates.delete`, the resource name
    of the template has the following format:
    `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`

  - For `projects.locations.workflowTemplates.instantiate`, the resource name
    of the template has the following format:
    `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`

- **version** (::Integer) --- Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #get_workflow_template

    def get_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate
    def get_workflow_template(name: nil, version: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Retrieves the latest workflow template.


<br />

Can retrieve previously instantiated template by specifying optional
version parameter.
**Overloads**

    def get_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `get_workflow_template` via a request object, either of type [GetWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-GetWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-GetWorkflowTemplateRequest), ::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_workflow_template(name: nil, version: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `get_workflow_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**

- **name** (::String) ---

  Required. The resource name of the workflow template, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates.get`, the resource name of the
    template has the following format:
    `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`

  - For `projects.locations.workflowTemplates.get`, the resource name of the
    template has the following format:
    `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`

- **version** (::Integer) --- Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.


  If unspecified, retrieves the current version.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #initialize

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

Create a new WorkflowTemplateService client object.
**Yields**

- (config) --- Configure the WorkflowTemplateService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new do |config|
  config.timeout = 10.0
end
```

### #instantiate_inline_workflow_template

    def instantiate_inline_workflow_template(request, options = nil) -> ::Gapic::Operation
    def instantiate_inline_workflow_template(parent: nil, template: nil, instance_id: nil, request_id: nil) -> ::Gapic::Operation

Instantiates a template and begins execution.


This method is equivalent to executing the sequence
[CreateWorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client#Google__Cloud__Dataproc__V1beta2__WorkflowTemplateService__Client_create_workflow_template_instance_ "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#create_workflow_template (method)"),
[InstantiateWorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client#Google__Cloud__Dataproc__V1beta2__WorkflowTemplateService__Client_instantiate_workflow_template_instance_ "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#instantiate_workflow_template (method)"),
[DeleteWorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Client#Google__Cloud__Dataproc__V1beta2__WorkflowTemplateService__Client_delete_workflow_template_instance_ "Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#delete_workflow_template (method)").

The returned Operation can be used to track execution of
workflow by polling
operations.get.
The Operation will complete when entire workflow is finished.

The running workflow can be aborted via
operations.cancel.
This will cause any inflight jobs to be cancelled and workflow-owned
clusters to be deleted.

The [Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
[WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
Also see [Using
WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).

<br />

On successful completion,
[Operation.response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_response_instance_ "Google::Longrunning::Operation#response (method)") will be
[Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Empty "Google::Protobuf::Empty (class)").
**Overloads**

    def instantiate_inline_workflow_template(request, options = nil) -> ::Gapic::Operation

Pass arguments to `instantiate_inline_workflow_template` via a request object, either of type [InstantiateInlineWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstantiateInlineWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstantiateInlineWorkflowTemplateRequest), ::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 instantiate_inline_workflow_template(parent: nil, template: nil, instance_id: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `instantiate_inline_workflow_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**

- **parent** (::String) ---

  Required. The resource name of the region or location, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates,instantiateinline`, the resource
    name of the region has the following format:
    `projects/{project_id}/regions/{region}`

  - For `projects.locations.workflowTemplates.instantiateinline`, the
    resource name of the location has the following format:
    `projects/{project_id}/locations/{location}`

- **template** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate), ::Hash) --- Required. The workflow template to instantiate.
- **instance_id** (::String) --- Deprecated. Please use `request_id` field instead.
- **request_id** (::String) --- Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.


  It is recommended to always set this value to a
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).

  The tag must contain only letters (a-z, A-Z), numbers (0-9),
  underscores (_), and hyphens (-). The maximum length is 40 characters.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #instantiate_workflow_template

    def instantiate_workflow_template(request, options = nil) -> ::Gapic::Operation
    def instantiate_workflow_template(name: nil, version: nil, instance_id: nil, request_id: nil, parameters: nil) -> ::Gapic::Operation

Instantiates a template and begins execution.


The returned Operation can be used to track execution of
workflow by polling
operations.get.
The Operation will complete when entire workflow is finished.

The running workflow can be aborted via
operations.cancel.
This will cause any inflight jobs to be cancelled and workflow-owned
clusters to be deleted.

The [Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
WorkflowMetadata.
Also see [Using
WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).

<br />

On successful completion,
[Operation.response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_response_instance_ "Google::Longrunning::Operation#response (method)") will be
[Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Empty "Google::Protobuf::Empty (class)").
**Overloads**

    def instantiate_workflow_template(request, options = nil) -> ::Gapic::Operation

Pass arguments to `instantiate_workflow_template` via a request object, either of type [InstantiateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstantiateWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstantiateWorkflowTemplateRequest), ::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 instantiate_workflow_template(name: nil, version: nil, instance_id: nil, request_id: nil, parameters: nil) -> ::Gapic::Operation

Pass arguments to `instantiate_workflow_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**

- **name** (::String) ---

  Required. The resource name of the workflow template, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates.instantiate`, the resource name
    of the template has the following format:
    `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`

  - For `projects.locations.workflowTemplates.instantiate`, the resource name
    of the template has the following format:
    `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`

- **version** (::Integer) --- Optional. The version of workflow template to instantiate. If specified, the workflow will be instantiated only if the current version of the workflow template has the supplied version.


  This option cannot be used to instantiate a previous version of
  workflow template.
- **instance_id** (::String) --- Deprecated. Please use `request_id` field instead.
- **request_id** (::String) --- Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.


  It is recommended to always set this value to a
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).

  The tag must contain only letters (a-z, A-Z), numbers (0-9),
  underscores (_), and hyphens (-). The maximum length is 40 characters.
- **parameters** (::Hash{::String =\> ::String}) --- Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 100 characters.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #list_workflow_templates

    def list_workflow_templates(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>
    def list_workflow_templates(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>

Lists workflows that match the specified filter in the request.
**Overloads**

    def list_workflow_templates(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>

Pass arguments to `list_workflow_templates` via a request object, either of type [ListWorkflowTemplatesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ListWorkflowTemplatesRequest "Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ListWorkflowTemplatesRequest), ::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_workflow_templates(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>

Pass arguments to `list_workflow_templates` 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) ---

  Required. The resource name of the region or location, as described
  in https://cloud.google.com/apis/design/resource_names.
  - For `projects.regions.workflowTemplates,list`, the resource
    name of the region has the following format:
    `projects/{project_id}/regions/{region}`

  - For `projects.locations.workflowTemplates.list`, the
    resource name of the location has the following format:
    `projects/{project_id}/locations/{location}`

- **page_size** (::Integer) --- Optional. The maximum 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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #operations_client

    def operations_client() -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplateService-Operations))

### #update_workflow_template

    def update_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate
    def update_workflow_template(template: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Updates (replaces) workflow template. The updated template
must contain version that matches the current server version.
**Overloads**

    def update_workflow_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `update_workflow_template` via a request object, either of type [UpdateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-UpdateWorkflowTemplateRequest "Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-UpdateWorkflowTemplateRequest), ::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_workflow_template(template: nil) -> ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate

Pass arguments to `update_workflow_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). **Parameter**

- **template** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate), ::Hash) --- Required. The updated workflow template.


  The `template.version` field must match the current version.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-WorkflowTemplate))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.