public abstract class ExecutionsClient
Reference documentation and code samples for the Cloud Run Admin v2 API class ExecutionsClient.
Executions client wrapper, for convenient use.
Derived Types
Namespace
GoogleCloudGoogle.Cloud.RunV2Assembly
Google.Cloud.Run.V2.dll
Remarks
Cloud Run Execution Control Plane API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Executions service, which is a host of "run.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Executions scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Executions scopes are:
DeleteExecutionOperationsClient
public virtual OperationsClient DeleteExecutionOperationsClient { get; }
The long-running operations client for DeleteExecution
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Executions.ExecutionsClient GrpcClient { get; }
The underlying gRPC Executions client
Property Value | |
---|---|
Type | Description |
ExecutionsExecutionsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskExecutionsClient | The task representing the created ExecutionsClient. |
DeleteExecution(DeleteExecutionRequest, CallSettings)
public virtual Operation<Execution, Execution> DeleteExecution(DeleteExecutionRequest request, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
request | DeleteExecutionRequest 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 |
OperationExecutionExecution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Execution, Execution> response = executionsClient.DeleteExecution(request);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = executionsClient.PollOnceDeleteExecution(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecution(ExecutionName, CallSettings)
public virtual Operation<Execution, Execution> DeleteExecution(ExecutionName name, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExecutionExecution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Operation<Execution, Execution> response = executionsClient.DeleteExecution(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = executionsClient.PollOnceDeleteExecution(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecution(string, CallSettings)
public virtual Operation<Execution, Execution> DeleteExecution(string name, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExecutionExecution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Operation<Execution, Execution> response = executionsClient.DeleteExecution(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = executionsClient.PollOnceDeleteExecution(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(DeleteExecutionRequest, CallSettings)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(DeleteExecutionRequest request, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
request | DeleteExecutionRequest 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 |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(DeleteExecutionRequest, CancellationToken)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(DeleteExecutionRequest request, CancellationToken cancellationToken)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
request | DeleteExecutionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
DeleteExecutionRequest request = new DeleteExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(ExecutionName, CallSettings)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(ExecutionName name, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(ExecutionName, CancellationToken)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(ExecutionName name, CancellationToken cancellationToken)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(string, CallSettings)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(string name, CallSettings callSettings = null)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
DeleteExecutionAsync(string, CancellationToken)
public virtual Task<Operation<Execution, Execution>> DeleteExecutionAsync(string name, CancellationToken cancellationToken)
Deletes an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Operation<Execution, Execution> response = await executionsClient.DeleteExecutionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Execution 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<Execution, Execution> retrievedResponse = await executionsClient.PollOnceDeleteExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
GetExecution(ExecutionName, CallSettings)
public virtual Execution GetExecution(ExecutionName name, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Execution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Execution response = executionsClient.GetExecution(name);
GetExecution(GetExecutionRequest, CallSettings)
public virtual Execution GetExecution(GetExecutionRequest request, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
request | GetExecutionRequest 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 |
Execution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
};
// Make the request
Execution response = executionsClient.GetExecution(request);
GetExecution(string, CallSettings)
public virtual Execution GetExecution(string name, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Execution | The RPC response. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Execution response = executionsClient.GetExecution(name);
GetExecutionAsync(ExecutionName, CallSettings)
public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);
GetExecutionAsync(ExecutionName, CancellationToken)
public virtual Task<Execution> GetExecutionAsync(ExecutionName name, CancellationToken cancellationToken)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | ExecutionName Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ExecutionName name = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);
GetExecutionAsync(GetExecutionRequest, CallSettings)
public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
request | GetExecutionRequest 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 |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
};
// Make the request
Execution response = await executionsClient.GetExecutionAsync(request);
GetExecutionAsync(GetExecutionRequest, CancellationToken)
public virtual Task<Execution> GetExecutionAsync(GetExecutionRequest request, CancellationToken cancellationToken)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
request | GetExecutionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
GetExecutionRequest request = new GetExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
};
// Make the request
Execution response = await executionsClient.GetExecutionAsync(request);
GetExecutionAsync(string, CallSettings)
public virtual Task<Execution> GetExecutionAsync(string name, CallSettings callSettings = null)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);
GetExecutionAsync(string, CancellationToken)
public virtual Task<Execution> GetExecutionAsync(string name, CancellationToken cancellationToken)
Gets information about an Execution.
Parameters | |
---|---|
Name | Description |
name | string Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecution | A Task containing the RPC response. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Execution response = await executionsClient.GetExecutionAsync(name);
ListExecutions(JobName, string, int?, CallSettings)
public virtual PagedEnumerable<ListExecutionsResponse, Execution> ListExecutions(JobName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
parent | JobName Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListExecutionsResponseExecution | A pageable sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
JobName parent = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// 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)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
request | ListExecutionsRequest 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 |
PagedEnumerableListExecutionsResponseExecution | A pageable sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
ParentAsJobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
ShowDeleted = false,
};
// 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)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
parent | string Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListExecutionsResponseExecution | A pageable sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// 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(JobName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListExecutionsResponse, Execution> ListExecutionsAsync(JobName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
parent | JobName Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListExecutionsResponseExecution | A pageable asynchronous sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
JobName parent = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// 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)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
request | ListExecutionsRequest 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 |
PagedAsyncEnumerableListExecutionsResponseExecution | A pageable asynchronous sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
ListExecutionsRequest request = new ListExecutionsRequest
{
ParentAsJobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
ShowDeleted = false,
};
// 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)
Lists Executions from a Job.
Parameters | |
---|---|
Name | Description |
parent | string Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListExecutionsResponseExecution | A pageable asynchronous sequence of Execution resources. |
// Create client
ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// 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;
PollOnceDeleteExecution(string, CallSettings)
public virtual Operation<Execution, Execution> PollOnceDeleteExecution(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteExecution
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExecutionExecution | The result of polling the operation. |
PollOnceDeleteExecutionAsync(string, CallSettings)
public virtual Task<Operation<Execution, Execution>> PollOnceDeleteExecutionAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteExecution
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExecutionExecution | 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. |
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.