Google Cloud Dataproc v1 API - Class WorkflowTemplateServiceClient (5.10.0)

public abstract class WorkflowTemplateServiceClient

Reference documentation and code samples for the Google Cloud Dataproc v1 API class WorkflowTemplateServiceClient.

WorkflowTemplateService client wrapper, for convenient use.

Inheritance

object > WorkflowTemplateServiceClient

Namespace

Google.Cloud.Dataproc.V1

Assembly

Google.Cloud.Dataproc.V1.dll

Remarks

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

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the WorkflowTemplateService service, which is a host of "dataproc.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default WorkflowTemplateService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default WorkflowTemplateService scopes are:

GrpcClient

public virtual WorkflowTemplateService.WorkflowTemplateServiceClient GrpcClient { get; }

The underlying gRPC WorkflowTemplateService client

Property Value
Type Description
WorkflowTemplateServiceWorkflowTemplateServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

InstantiateInlineWorkflowTemplateOperationsClient

public virtual OperationsClient InstantiateInlineWorkflowTemplateOperationsClient { get; }

The long-running operations client for InstantiateInlineWorkflowTemplate.

Property Value
Type Description
OperationsClient

InstantiateWorkflowTemplateOperationsClient

public virtual OperationsClient InstantiateWorkflowTemplateOperationsClient { get; }

The long-running operations client for InstantiateWorkflowTemplate.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static WorkflowTemplateServiceClient Create()

Synchronously creates a WorkflowTemplateServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkflowTemplateServiceClientBuilder.

Returns
Type Description
WorkflowTemplateServiceClient

The created WorkflowTemplateServiceClient.

CreateAsync(CancellationToken)

public static Task<WorkflowTemplateServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a WorkflowTemplateServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkflowTemplateServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskWorkflowTemplateServiceClient

The task representing the created WorkflowTemplateServiceClient.

CreateWorkflowTemplate(LocationName, WorkflowTemplate, CallSettings)

public virtual WorkflowTemplate CreateWorkflowTemplate(LocationName parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.CreateWorkflowTemplate(parent, template);

CreateWorkflowTemplate(CreateWorkflowTemplateRequest, CallSettings)

public virtual WorkflowTemplate CreateWorkflowTemplate(CreateWorkflowTemplateRequest request, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
request CreateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
CreateWorkflowTemplateRequest request = new CreateWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.CreateWorkflowTemplate(request);

CreateWorkflowTemplate(RegionName, WorkflowTemplate, CallSettings)

public virtual WorkflowTemplate CreateWorkflowTemplate(RegionName parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.CreateWorkflowTemplate(parent, template);

CreateWorkflowTemplate(string, WorkflowTemplate, CallSettings)

public virtual WorkflowTemplate CreateWorkflowTemplate(string parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.CreateWorkflowTemplate(parent, template);

CreateWorkflowTemplateAsync(LocationName, WorkflowTemplate, CallSettings)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(LocationName parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

CreateWorkflowTemplateAsync(LocationName, WorkflowTemplate, CancellationToken)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(LocationName parent, WorkflowTemplate template, CancellationToken cancellationToken)

Creates new workflow template.

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

CreateWorkflowTemplateAsync(CreateWorkflowTemplateRequest, CallSettings)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(CreateWorkflowTemplateRequest request, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
request CreateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
CreateWorkflowTemplateRequest request = new CreateWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(request);

CreateWorkflowTemplateAsync(CreateWorkflowTemplateRequest, CancellationToken)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(CreateWorkflowTemplateRequest request, CancellationToken cancellationToken)

Creates new workflow template.

Parameters
Name Description
request CreateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
CreateWorkflowTemplateRequest request = new CreateWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(request);

CreateWorkflowTemplateAsync(RegionName, WorkflowTemplate, CallSettings)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(RegionName parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

CreateWorkflowTemplateAsync(RegionName, WorkflowTemplate, CancellationToken)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(RegionName parent, WorkflowTemplate template, CancellationToken cancellationToken)

Creates new workflow template.

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The Dataproc workflow template to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

CreateWorkflowTemplateAsync(string, WorkflowTemplate, CallSettings)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(string parent, WorkflowTemplate template, CallSettings callSettings = null)

Creates new workflow template.

Parameters
Name Description
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 WorkflowTemplate

Required. The Dataproc workflow template to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

CreateWorkflowTemplateAsync(string, WorkflowTemplate, CancellationToken)

public virtual Task<WorkflowTemplate> CreateWorkflowTemplateAsync(string parent, WorkflowTemplate template, CancellationToken cancellationToken)

Creates new workflow template.

Parameters
Name Description
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 WorkflowTemplate

Required. The Dataproc workflow template to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.CreateWorkflowTemplateAsync(parent, template);

DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest, CallSettings)

public virtual void DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
DeleteWorkflowTemplateRequest request = new DeleteWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
workflowTemplateServiceClient.DeleteWorkflowTemplate(request);

DeleteWorkflowTemplate(WorkflowTemplateName, CallSettings)

public virtual void DeleteWorkflowTemplate(WorkflowTemplateName name, CallSettings callSettings = null)

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

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
workflowTemplateServiceClient.DeleteWorkflowTemplate(name);

DeleteWorkflowTemplate(string, CallSettings)

public virtual void DeleteWorkflowTemplate(string name, CallSettings callSettings = null)

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

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
workflowTemplateServiceClient.DeleteWorkflowTemplate(name);

DeleteWorkflowTemplateAsync(DeleteWorkflowTemplateRequest, CallSettings)

public virtual Task DeleteWorkflowTemplateAsync(DeleteWorkflowTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteWorkflowTemplateRequest request = new DeleteWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(request);

DeleteWorkflowTemplateAsync(DeleteWorkflowTemplateRequest, CancellationToken)

public virtual Task DeleteWorkflowTemplateAsync(DeleteWorkflowTemplateRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request DeleteWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteWorkflowTemplateRequest request = new DeleteWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(request);

DeleteWorkflowTemplateAsync(WorkflowTemplateName, CallSettings)

public virtual Task DeleteWorkflowTemplateAsync(WorkflowTemplateName name, CallSettings callSettings = null)

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

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(name);

DeleteWorkflowTemplateAsync(WorkflowTemplateName, CancellationToken)

public virtual Task DeleteWorkflowTemplateAsync(WorkflowTemplateName name, CancellationToken cancellationToken)

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

Parameters
Name Description
name WorkflowTemplateName

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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(name);

DeleteWorkflowTemplateAsync(string, CallSettings)

public virtual Task DeleteWorkflowTemplateAsync(string name, CallSettings callSettings = null)

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

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(name);

DeleteWorkflowTemplateAsync(string, CancellationToken)

public virtual Task DeleteWorkflowTemplateAsync(string name, CancellationToken cancellationToken)

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

Parameters
Name Description
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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
await workflowTemplateServiceClient.DeleteWorkflowTemplateAsync(name);

GetWorkflowTemplate(GetWorkflowTemplateRequest, CallSettings)

public virtual WorkflowTemplate GetWorkflowTemplate(GetWorkflowTemplateRequest request, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
request GetWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
GetWorkflowTemplateRequest request = new GetWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.GetWorkflowTemplate(request);

GetWorkflowTemplate(WorkflowTemplateName, CallSettings)

public virtual WorkflowTemplate GetWorkflowTemplate(WorkflowTemplateName name, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.GetWorkflowTemplate(name);

GetWorkflowTemplate(string, CallSettings)

public virtual WorkflowTemplate GetWorkflowTemplate(string name, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.GetWorkflowTemplate(name);

GetWorkflowTemplateAsync(GetWorkflowTemplateRequest, CallSettings)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(GetWorkflowTemplateRequest request, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
request GetWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
GetWorkflowTemplateRequest request = new GetWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(request);

GetWorkflowTemplateAsync(GetWorkflowTemplateRequest, CancellationToken)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(GetWorkflowTemplateRequest request, CancellationToken cancellationToken)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
request GetWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
GetWorkflowTemplateRequest request = new GetWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(request);

GetWorkflowTemplateAsync(WorkflowTemplateName, CallSettings)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(WorkflowTemplateName name, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(name);

GetWorkflowTemplateAsync(WorkflowTemplateName, CancellationToken)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(WorkflowTemplateName name, CancellationToken cancellationToken)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
name WorkflowTemplateName

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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(name);

GetWorkflowTemplateAsync(string, CallSettings)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(string name, CallSettings callSettings = null)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(name);

GetWorkflowTemplateAsync(string, CancellationToken)

public virtual Task<WorkflowTemplate> GetWorkflowTemplateAsync(string name, CancellationToken cancellationToken)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
Name Description
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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.GetWorkflowTemplateAsync(name);

InstantiateInlineWorkflowTemplate(LocationName, WorkflowTemplate, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateInlineWorkflowTemplate(LocationName parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateInlineWorkflowTemplate(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest request, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateInlineWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
InstantiateInlineWorkflowTemplateRequest request = new InstantiateInlineWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
    RequestId = "",
};
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateInlineWorkflowTemplate(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplate(RegionName, WorkflowTemplate, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateInlineWorkflowTemplate(RegionName parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateInlineWorkflowTemplate(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplate(string, WorkflowTemplate, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateInlineWorkflowTemplate(string parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateInlineWorkflowTemplate(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(LocationName, WorkflowTemplate, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(LocationName parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(LocationName, WorkflowTemplate, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(LocationName parent, WorkflowTemplate template, CancellationToken cancellationToken)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent LocationName

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 WorkflowTemplate

Required. The workflow template to instantiate.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(InstantiateInlineWorkflowTemplateRequest, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(InstantiateInlineWorkflowTemplateRequest request, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateInlineWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
InstantiateInlineWorkflowTemplateRequest request = new InstantiateInlineWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
    RequestId = "",
};
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(InstantiateInlineWorkflowTemplateRequest, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(InstantiateInlineWorkflowTemplateRequest request, CancellationToken cancellationToken)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateInlineWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
InstantiateInlineWorkflowTemplateRequest request = new InstantiateInlineWorkflowTemplateRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
    Template = new WorkflowTemplate(),
    RequestId = "",
};
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(RegionName, WorkflowTemplate, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(RegionName parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(RegionName, WorkflowTemplate, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(RegionName parent, WorkflowTemplate template, CancellationToken cancellationToken)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
parent RegionName

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 WorkflowTemplate

Required. The workflow template to instantiate.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(string, WorkflowTemplate, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(string parent, WorkflowTemplate template, CallSettings callSettings = null)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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 WorkflowTemplate

Required. The workflow template to instantiate.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateInlineWorkflowTemplateAsync(string, WorkflowTemplate, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateInlineWorkflowTemplateAsync(string parent, WorkflowTemplate template, CancellationToken cancellationToken)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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 WorkflowTemplate

Required. The workflow template to instantiate.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateInlineWorkflowTemplateAsync(parent, template);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateInlineWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest request, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
InstantiateWorkflowTemplateRequest request = new InstantiateWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
    RequestId = "",
    Parameters = { { "", "" }, },
};
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateWorkflowTemplate(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplate(WorkflowTemplateName, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateWorkflowTemplate(WorkflowTemplateName name, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateWorkflowTemplate(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplate(WorkflowTemplateName, IDictionary<string, string>, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateWorkflowTemplate(WorkflowTemplateName name, IDictionary<string, string> parameters, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateWorkflowTemplate(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplate(string, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateWorkflowTemplate(string name, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateWorkflowTemplate(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplate(string, IDictionary<string, string>, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> InstantiateWorkflowTemplate(string name, IDictionary<string, string> parameters, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = workflowTemplateServiceClient.InstantiateWorkflowTemplate(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(InstantiateWorkflowTemplateRequest, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(InstantiateWorkflowTemplateRequest request, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
InstantiateWorkflowTemplateRequest request = new InstantiateWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
    RequestId = "",
    Parameters = { { "", "" }, },
};
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(InstantiateWorkflowTemplateRequest, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(InstantiateWorkflowTemplateRequest request, CancellationToken cancellationToken)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
request InstantiateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
InstantiateWorkflowTemplateRequest request = new InstantiateWorkflowTemplateRequest
{
    WorkflowTemplateName = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"),
    Version = 0,
    RequestId = "",
    Parameters = { { "", "" }, },
};
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(WorkflowTemplateName, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(WorkflowTemplateName name, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(WorkflowTemplateName, IDictionary<string, string>, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(WorkflowTemplateName name, IDictionary<string, string> parameters, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(WorkflowTemplateName, IDictionary<string, string>, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(WorkflowTemplateName name, IDictionary<string, string> parameters, CancellationToken cancellationToken)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(WorkflowTemplateName, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(WorkflowTemplateName name, CancellationToken cancellationToken)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
name WorkflowTemplateName

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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplateName name = WorkflowTemplateName.FromProjectRegionWorkflowTemplate("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(string, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(string name, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(string, IDictionary<string, string>, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(string name, IDictionary<string, string> parameters, CallSettings callSettings = null)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(string, IDictionary<string, string>, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(string name, IDictionary<string, string> parameters, CancellationToken cancellationToken)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

parameters IDictionarystringstring

Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
IDictionary<string, string> parameters = new Dictionary<string, string> { { "", "" }, };
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name, parameters);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

InstantiateWorkflowTemplateAsync(string, CancellationToken)

public virtual Task<Operation<Empty, WorkflowMetadata>> InstantiateWorkflowTemplateAsync(string name, CancellationToken cancellationToken)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
Name Description
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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/regions/[REGION]/workflowTemplates/[WORKFLOW_TEMPLATE]";
// Make the request
Operation<Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

ListWorkflowTemplates(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplates(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
parent LocationName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplates(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (WorkflowTemplate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkflowTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplates(ListWorkflowTemplatesRequest, CallSettings)

public virtual PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplates(ListWorkflowTemplatesRequest request, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
request ListWorkflowTemplatesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
ListWorkflowTemplatesRequest request = new ListWorkflowTemplatesRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
};
// Make the request
PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplates(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (WorkflowTemplate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkflowTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplates(RegionName, string, int?, CallSettings)

public virtual PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplates(RegionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
parent RegionName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
// Make the request
PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplates(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (WorkflowTemplate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkflowTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplates(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplates(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
// Make the request
PagedEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplates(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (WorkflowTemplate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkflowTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplatesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplatesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
parent LocationName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable asynchronous sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplatesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkflowTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkflowTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplatesAsync(ListWorkflowTemplatesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplatesAsync(ListWorkflowTemplatesRequest request, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
request ListWorkflowTemplatesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable asynchronous sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
ListWorkflowTemplatesRequest request = new ListWorkflowTemplatesRequest
{
    ParentAsRegionName = RegionName.FromProjectRegion("[PROJECT]", "[REGION]"),
};
// Make the request
PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplatesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkflowTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkflowTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplatesAsync(RegionName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplatesAsync(RegionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
parent RegionName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable asynchronous sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
// Make the request
PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplatesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkflowTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkflowTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListWorkflowTemplatesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> ListWorkflowTemplatesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists workflows that match the specified filter in the request.

Parameters
Name Description
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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListWorkflowTemplatesResponseWorkflowTemplate

A pageable asynchronous sequence of WorkflowTemplate resources.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/regions/[REGION]";
// Make the request
PagedAsyncEnumerable<ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplatesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkflowTemplate item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkflowTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (WorkflowTemplate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkflowTemplate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkflowTemplate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceInstantiateInlineWorkflowTemplate(string, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> PollOnceInstantiateInlineWorkflowTemplate(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of InstantiateInlineWorkflowTemplate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The result of polling the operation.

PollOnceInstantiateInlineWorkflowTemplateAsync(string, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> PollOnceInstantiateInlineWorkflowTemplateAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of InstantiateInlineWorkflowTemplate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A task representing the result of polling the operation.

PollOnceInstantiateWorkflowTemplate(string, CallSettings)

public virtual Operation<Empty, WorkflowMetadata> PollOnceInstantiateWorkflowTemplate(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of InstantiateWorkflowTemplate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyWorkflowMetadata

The result of polling the operation.

PollOnceInstantiateWorkflowTemplateAsync(string, CallSettings)

public virtual Task<Operation<Empty, WorkflowMetadata>> PollOnceInstantiateWorkflowTemplateAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of InstantiateWorkflowTemplate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyWorkflowMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest, CallSettings)

public virtual WorkflowTemplate UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
UpdateWorkflowTemplateRequest request = new UpdateWorkflowTemplateRequest
{
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.UpdateWorkflowTemplate(request);

UpdateWorkflowTemplate(WorkflowTemplate, CallSettings)

public virtual WorkflowTemplate UpdateWorkflowTemplate(WorkflowTemplate template, CallSettings callSettings = null)

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

Parameters
Name Description
template WorkflowTemplate

Required. The updated workflow template.

The template.version field must match the current version.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WorkflowTemplate

The RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create();
// Initialize request argument(s)
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = workflowTemplateServiceClient.UpdateWorkflowTemplate(template);

UpdateWorkflowTemplateAsync(UpdateWorkflowTemplateRequest, CallSettings)

public virtual Task<WorkflowTemplate> UpdateWorkflowTemplateAsync(UpdateWorkflowTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWorkflowTemplateRequest request = new UpdateWorkflowTemplateRequest
{
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.UpdateWorkflowTemplateAsync(request);

UpdateWorkflowTemplateAsync(UpdateWorkflowTemplateRequest, CancellationToken)

public virtual Task<WorkflowTemplate> UpdateWorkflowTemplateAsync(UpdateWorkflowTemplateRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request UpdateWorkflowTemplateRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWorkflowTemplateRequest request = new UpdateWorkflowTemplateRequest
{
    Template = new WorkflowTemplate(),
};
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.UpdateWorkflowTemplateAsync(request);

UpdateWorkflowTemplateAsync(WorkflowTemplate, CallSettings)

public virtual Task<WorkflowTemplate> UpdateWorkflowTemplateAsync(WorkflowTemplate template, CallSettings callSettings = null)

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

Parameters
Name Description
template WorkflowTemplate

Required. The updated workflow template.

The template.version field must match the current version.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.UpdateWorkflowTemplateAsync(template);

UpdateWorkflowTemplateAsync(WorkflowTemplate, CancellationToken)

public virtual Task<WorkflowTemplate> UpdateWorkflowTemplateAsync(WorkflowTemplate template, CancellationToken cancellationToken)

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

Parameters
Name Description
template WorkflowTemplate

Required. The updated workflow template.

The template.version field must match the current version.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskWorkflowTemplate

A Task containing the RPC response.

Example
// Create client
WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync();
// Initialize request argument(s)
WorkflowTemplate template = new WorkflowTemplate();
// Make the request
WorkflowTemplate response = await workflowTemplateServiceClient.UpdateWorkflowTemplateAsync(template);