Class ExecutionsClient (1.1.0)

public abstract 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
IReadOnlyList<String>
Remarks

The default Executions scopes are:

GrpcClient

public virtual Executions.ExecutionsClient GrpcClient { get; }

The underlying gRPC Executions client

Property Value
TypeDescription
Executions.ExecutionsClient

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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(CancellationToken))

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
Task<ExecutionsClient>

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
parentWorkflowName

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
parentWorkflowName

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
Task<Execution>

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
parentWorkflowName

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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
Task<Execution>

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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(WorkflowName parent, string pageToken = null, int? pageSize = default(int? ), 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
parentWorkflowName

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.

pageSizeNullable<Int32>

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
PagedEnumerable<ListExecutionsResponse, Execution>

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
PagedEnumerable<ListExecutionsResponse, Execution>

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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<Int32>

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
PagedEnumerable<ListExecutionsResponse, Execution>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(WorkflowName parent, string pageToken = null, int? pageSize = default(int? ), 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
parentWorkflowName

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.

pageSizeNullable<Int32>

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
PagedAsyncEnumerable<ListExecutionsResponse, Execution>

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
PagedAsyncEnumerable<ListExecutionsResponse, Execution>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<Int32>

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
PagedAsyncEnumerable<ListExecutionsResponse, Execution>

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.