Workflow Executions v1 API - Class ExecutionsClient (2.2.0)

public abstract class ExecutionsClient

Reference documentation and code samples for the Workflow Executions v1 API class ExecutionsClient.

Executions client wrapper, for convenient use.

Inheritance

object > ExecutionsClient

Derived Types

Namespace

Google.Cloud.Workflows.Executions.V1

Assembly

Google.Cloud.Workflows.Executions.V1.dll

Remarks

Executions is used to start and manage running instances of [Workflows][google.cloud.workflows.v1.Workflow] called executions.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Executions scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Executions scopes are:

GrpcClient

public virtual Executions.ExecutionsClient GrpcClient { get; }

The underlying gRPC Executions client

Property Value
TypeDescription
ExecutionsExecutionsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

CancelExecution(CancelExecutionRequest, CallSettings)

public virtual Execution CancelExecution(CancelExecutionRequest request, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
requestCancelExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
CancelExecutionRequest request = new CancelExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
};
// Make the request
Execution response = executionsClient.CancelExecution(request);

CancelExecution(ExecutionName, CallSettings)

public virtual Execution CancelExecution(ExecutionName name, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = executionsClient.CancelExecution(name);

CancelExecution(string, CallSettings)

public virtual Execution CancelExecution(string name, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = executionsClient.CancelExecution(name);

CancelExecutionAsync(CancelExecutionRequest, CallSettings)

public virtual Task<Execution> CancelExecutionAsync(CancelExecutionRequest request, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
requestCancelExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
CancelExecutionRequest request = new CancelExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
};
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(request);

CancelExecutionAsync(CancelExecutionRequest, CancellationToken)

public virtual Task<Execution> CancelExecutionAsync(CancelExecutionRequest request, CancellationToken cancellationToken)

Cancels an execution of the given name.

Parameters
NameDescription
requestCancelExecutionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
CancelExecutionRequest request = new CancelExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
};
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(request);

CancelExecutionAsync(ExecutionName, CallSettings)

public virtual Task<Execution> CancelExecutionAsync(ExecutionName name, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(name);

CancelExecutionAsync(ExecutionName, CancellationToken)

public virtual Task<Execution> CancelExecutionAsync(ExecutionName name, CancellationToken cancellationToken)

Cancels an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(name);

CancelExecutionAsync(string, CallSettings)

public virtual Task<Execution> CancelExecutionAsync(string name, CallSettings callSettings = null)

Cancels an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(name);

CancelExecutionAsync(string, CancellationToken)

public virtual Task<Execution> CancelExecutionAsync(string name, CancellationToken cancellationToken)

Cancels an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.CancelExecutionAsync(name);

Create()

public static ExecutionsClient Create()

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

Returns
TypeDescription
ExecutionsClient

The created ExecutionsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskExecutionsClient

The task representing the created ExecutionsClient.

CreateExecution(WorkflowName, Execution, CallSettings)

public virtual Execution CreateExecution(WorkflowName parent, Execution execution, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentGoogle.Cloud.Workflows.Common.V1.WorkflowName

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
Execution execution = new Execution();
// Make the request
Execution response = executionsClient.CreateExecution(parent, execution);

CreateExecution(CreateExecutionRequest, CallSettings)

public virtual Execution CreateExecution(CreateExecutionRequest request, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
requestCreateExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
    Execution = new Execution(),
};
// Make the request
Execution response = executionsClient.CreateExecution(request);

CreateExecution(string, Execution, CallSettings)

public virtual Execution CreateExecution(string parent, Execution execution, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentstring

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]";
Execution execution = new Execution();
// Make the request
Execution response = executionsClient.CreateExecution(parent, execution);

CreateExecutionAsync(WorkflowName, Execution, CallSettings)

public virtual Task<Execution> CreateExecutionAsync(WorkflowName parent, Execution execution, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentGoogle.Cloud.Workflows.Common.V1.WorkflowName

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
Execution execution = new Execution();
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(parent, execution);

CreateExecutionAsync(WorkflowName, Execution, CancellationToken)

public virtual Task<Execution> CreateExecutionAsync(WorkflowName parent, Execution execution, CancellationToken cancellationToken)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentGoogle.Cloud.Workflows.Common.V1.WorkflowName

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
Execution execution = new Execution();
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(parent, execution);

CreateExecutionAsync(CreateExecutionRequest, CallSettings)

public virtual Task<Execution> CreateExecutionAsync(CreateExecutionRequest request, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
requestCreateExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
    Execution = new Execution(),
};
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(request);

CreateExecutionAsync(CreateExecutionRequest, CancellationToken)

public virtual Task<Execution> CreateExecutionAsync(CreateExecutionRequest request, CancellationToken cancellationToken)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
requestCreateExecutionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
    Execution = new Execution(),
};
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(request);

CreateExecutionAsync(string, Execution, CallSettings)

public virtual Task<Execution> CreateExecutionAsync(string parent, Execution execution, CallSettings callSettings = null)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentstring

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]";
Execution execution = new Execution();
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(parent, execution);

CreateExecutionAsync(string, Execution, CancellationToken)

public virtual Task<Execution> CreateExecutionAsync(string parent, Execution execution, CancellationToken cancellationToken)

Creates a new execution using the latest revision of the given workflow.

Parameters
NameDescription
parentstring

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

executionExecution

Required. Execution to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]";
Execution execution = new Execution();
// Make the request
Execution response = await executionsClient.CreateExecutionAsync(parent, execution);

GetExecution(ExecutionName, CallSettings)

public virtual Execution GetExecution(ExecutionName name, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = executionsClient.GetExecution(name);

GetExecution(GetExecutionRequest, CallSettings)

public virtual Execution GetExecution(GetExecutionRequest request, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
requestGetExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
    View = ExecutionView.Unspecified,
};
// Make the request
Execution response = executionsClient.GetExecution(request);

GetExecution(string, CallSettings)

public virtual Execution GetExecution(string name, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Execution

The RPC response.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = executionsClient.GetExecution(name);

GetExecutionAsync(ExecutionName, CallSettings)

public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);

GetExecutionAsync(ExecutionName, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CancellationToken cancellationToken)

Returns an execution of the given name.

Parameters
NameDescription
nameExecutionName

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);

GetExecutionAsync(GetExecutionRequest, CallSettings)

public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
requestGetExecutionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
    View = ExecutionView.Unspecified,
};
// Make the request
Execution response = await executionsClient.GetExecutionAsync(request);

GetExecutionAsync(GetExecutionRequest, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CancellationToken cancellationToken)

Returns an execution of the given name.

Parameters
NameDescription
requestGetExecutionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
    ExecutionName = ExecutionName.FromProjectLocationWorkflowExecution("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]"),
    View = ExecutionView.Unspecified,
};
// Make the request
Execution response = await executionsClient.GetExecutionAsync(request);

GetExecutionAsync(string, CallSettings)

public virtual Task<Execution> GetExecutionAsync(string name, CallSettings callSettings = null)

Returns an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);

GetExecutionAsync(string, CancellationToken)

public virtual Task<Execution> GetExecutionAsync(string name, CancellationToken cancellationToken)

Returns an execution of the given name.

Parameters
NameDescription
namestring

Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecution

A Task containing the RPC response.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);

ListExecutions(WorkflowName, string, int?, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(WorkflowName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
parentGoogle.Cloud.Workflows.Common.V1.WorkflowName

Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Execution 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 (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutions(ListExecutionsRequest, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(ListExecutionsRequest request, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
requestListExecutionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
    ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
    View = ExecutionView.Unspecified,
};
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Execution 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 (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
parentstring

Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListExecutionsResponseExecution

A pageable sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]";
// Make the request
PagedEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Execution 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 (ListExecutionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutionsAsync(WorkflowName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(WorkflowName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
parentGoogle.Cloud.Workflows.Common.V1.WorkflowName

Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Execution 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((ListExecutionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutionsAsync(ListExecutionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(ListExecutionsRequest request, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
requestListExecutionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
    ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
    View = ExecutionView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Execution 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((ListExecutionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

ListExecutionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters
NameDescription
parentstring

Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListExecutionsResponseExecution

A pageable asynchronous sequence of Execution resources.

Example
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/workflows/[WORKFLOW]";
// Make the request
PagedAsyncEnumerable<ListExecutionsResponse, Execution> response = executionsClient.ListExecutionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Execution 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((ListExecutionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Execution 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<Execution> 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 (Execution 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;

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
TypeDescription
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.