public abstract class WorkflowsServiceV2BetaClient
Reference documentation and code samples for the Cloud Life Sciences v2beta API class WorkflowsServiceV2BetaClient.
WorkflowsServiceV2Beta client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.LifeSciences.V2BetaAssembly
Google.Cloud.LifeSciences.V2Beta.dll
Remarks
A service for running workflows, such as pipelines consisting of Docker containers.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the WorkflowsServiceV2Beta service, which is a host of "lifesciences.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default WorkflowsServiceV2Beta scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default WorkflowsServiceV2Beta scopes are:
GrpcClient
public virtual WorkflowsServiceV2Beta.WorkflowsServiceV2BetaClient GrpcClient { get; }
The underlying gRPC WorkflowsServiceV2Beta client
Property Value | |
---|---|
Type | Description |
WorkflowsServiceV2BetaWorkflowsServiceV2BetaClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RunPipelineOperationsClient
public virtual OperationsClient RunPipelineOperationsClient { get; }
The long-running operations client for RunPipeline
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static WorkflowsServiceV2BetaClient Create()
Synchronously creates a WorkflowsServiceV2BetaClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkflowsServiceV2BetaClientBuilder.
Returns | |
---|---|
Type | Description |
WorkflowsServiceV2BetaClient | The created WorkflowsServiceV2BetaClient. |
CreateAsync(CancellationToken)
public static Task<WorkflowsServiceV2BetaClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a WorkflowsServiceV2BetaClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WorkflowsServiceV2BetaClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskWorkflowsServiceV2BetaClient | The task representing the created WorkflowsServiceV2BetaClient. |
PollOnceRunPipeline(string, CallSettings)
public virtual Operation<RunPipelineResponse, Metadata> PollOnceRunPipeline(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RunPipeline
.
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 |
OperationRunPipelineResponseMetadata | The result of polling the operation. |
PollOnceRunPipelineAsync(string, CallSettings)
public virtual Task<Operation<RunPipelineResponse, Metadata>> PollOnceRunPipelineAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RunPipeline
.
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 |
TaskOperationRunPipelineResponseMetadata | A task representing the result of polling the operation. |
RunPipeline(RunPipelineRequest, CallSettings)
public virtual Operation<RunPipelineResponse, Metadata> RunPipeline(RunPipelineRequest request, CallSettings callSettings = null)
Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] field will contain a [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status of the pipeline execution. The [response][google.longrunning.Operation.response] field will contain a [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the pipeline completes successfully.
Note: Before you can use this method, the Life Sciences Service Agent must have access to your project. This is done automatically when the Cloud Life Sciences API is first enabled, but if you delete this permission you must disable and re-enable the API to grant the Life Sciences Service Agent the required permissions. Authorization requires the following Google IAM permission:
lifesciences.workflows.run
Parameters | |
---|---|
Name | Description |
request | RunPipelineRequest 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 |
OperationRunPipelineResponseMetadata | The RPC response. |
// Create client
WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient = WorkflowsServiceV2BetaClient.Create();
// Initialize request argument(s)
RunPipelineRequest request = new RunPipelineRequest
{
Pipeline = new Pipeline(),
Labels = { { "", "" }, },
PubSubTopic = "",
Parent = "",
};
// Make the request
Operation<RunPipelineResponse, Metadata> response = workflowsServiceV2BetaClient.RunPipeline(request);
// Poll until the returned long-running operation is complete
Operation<RunPipelineResponse, Metadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RunPipelineResponse 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<RunPipelineResponse, Metadata> retrievedResponse = workflowsServiceV2BetaClient.PollOnceRunPipeline(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunPipelineResponse retrievedResult = retrievedResponse.Result;
}
RunPipelineAsync(RunPipelineRequest, CallSettings)
public virtual Task<Operation<RunPipelineResponse, Metadata>> RunPipelineAsync(RunPipelineRequest request, CallSettings callSettings = null)
Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] field will contain a [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status of the pipeline execution. The [response][google.longrunning.Operation.response] field will contain a [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the pipeline completes successfully.
Note: Before you can use this method, the Life Sciences Service Agent must have access to your project. This is done automatically when the Cloud Life Sciences API is first enabled, but if you delete this permission you must disable and re-enable the API to grant the Life Sciences Service Agent the required permissions. Authorization requires the following Google IAM permission:
lifesciences.workflows.run
Parameters | |
---|---|
Name | Description |
request | RunPipelineRequest 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 |
TaskOperationRunPipelineResponseMetadata | A Task containing the RPC response. |
// Create client
WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient = await WorkflowsServiceV2BetaClient.CreateAsync();
// Initialize request argument(s)
RunPipelineRequest request = new RunPipelineRequest
{
Pipeline = new Pipeline(),
Labels = { { "", "" }, },
PubSubTopic = "",
Parent = "",
};
// Make the request
Operation<RunPipelineResponse, Metadata> response = await workflowsServiceV2BetaClient.RunPipelineAsync(request);
// Poll until the returned long-running operation is complete
Operation<RunPipelineResponse, Metadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunPipelineResponse 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<RunPipelineResponse, Metadata> retrievedResponse = await workflowsServiceV2BetaClient.PollOnceRunPipelineAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunPipelineResponse retrievedResult = retrievedResponse.Result;
}
RunPipelineAsync(RunPipelineRequest, CancellationToken)
public virtual Task<Operation<RunPipelineResponse, Metadata>> RunPipelineAsync(RunPipelineRequest request, CancellationToken cancellationToken)
Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] field will contain a [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status of the pipeline execution. The [response][google.longrunning.Operation.response] field will contain a [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the pipeline completes successfully.
Note: Before you can use this method, the Life Sciences Service Agent must have access to your project. This is done automatically when the Cloud Life Sciences API is first enabled, but if you delete this permission you must disable and re-enable the API to grant the Life Sciences Service Agent the required permissions. Authorization requires the following Google IAM permission:
lifesciences.workflows.run
Parameters | |
---|---|
Name | Description |
request | RunPipelineRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationRunPipelineResponseMetadata | A Task containing the RPC response. |
// Create client
WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient = await WorkflowsServiceV2BetaClient.CreateAsync();
// Initialize request argument(s)
RunPipelineRequest request = new RunPipelineRequest
{
Pipeline = new Pipeline(),
Labels = { { "", "" }, },
PubSubTopic = "",
Parent = "",
};
// Make the request
Operation<RunPipelineResponse, Metadata> response = await workflowsServiceV2BetaClient.RunPipelineAsync(request);
// Poll until the returned long-running operation is complete
Operation<RunPipelineResponse, Metadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunPipelineResponse 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<RunPipelineResponse, Metadata> retrievedResponse = await workflowsServiceV2BetaClient.PollOnceRunPipelineAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunPipelineResponse retrievedResult = retrievedResponse.Result;
}
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.