Class v1beta.WorkflowsClient

Workflows is used to deploy and execute workflow programs. Workflows makes sure the program executes reliably, despite hardware and networking interruptions. v1beta

Package

@google-cloud/workflows!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of WorkflowsClient.

Parameter
Type Name Description
ClientOptions opts

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
Type Description
string

auth

auth: gax.GoogleAuth;
Property Value
Type Description
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
Type Description
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
Type Description
{ [name: string]: Function; }

operationsClient

operationsClient: gax.OperationsClient;
Property Value
Type Description
gax.OperationsClient

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
Type Description
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
Type Description
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
Type Description
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
Type Description
string

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type Description
(code: string, message: string, warnType?: string) => void

workflowsStub

workflowsStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
Type Description
Promise<{ [name: string]: Function; }>

Methods

checkCreateWorkflowProgress(name)

checkCreateWorkflowProgress(name: string): Promise<LROperation<protos.google.cloud.workflows.v1beta.Workflow, protos.google.cloud.workflows.v1beta.OperationMetadata>>;

Check the status of the long running operation returned by createWorkflow().

Parameter
Type Name Description
string name

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.workflows.v1beta.Workflow, protos.google.cloud.workflows.v1beta.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

checkDeleteWorkflowProgress(name)

checkDeleteWorkflowProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.workflows.v1beta.OperationMetadata>>;

Check the status of the long running operation returned by deleteWorkflow().

Parameter
Type Name Description
string name

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.workflows.v1beta.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

checkUpdateWorkflowProgress(name)

checkUpdateWorkflowProgress(name: string): Promise<LROperation<protos.google.cloud.workflows.v1beta.Workflow, protos.google.cloud.workflows.v1beta.OperationMetadata>>;

Check the status of the long running operation returned by updateWorkflow().

Parameter
Type Name Description
string name

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.workflows.v1beta.Workflow, protos.google.cloud.workflows.v1beta.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createWorkflow(request, options)

createWorkflow(request?: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest request
CallOptions options
Returns
Type Description
Promise<[LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

createWorkflow(request, options, callback)

createWorkflow(request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest request
CallOptions options
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

createWorkflow(request, callback)

createWorkflow(request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, callback: Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest request
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

deleteWorkflow(request, options)

deleteWorkflow(request?: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, options?: CallOptions): Promise<[LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest request
CallOptions options
Returns
Type Description
Promise<[LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

deleteWorkflow(request, options, callback)

deleteWorkflow(request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest request
CallOptions options
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

deleteWorkflow(request, callback)

deleteWorkflow(request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest request
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Type Name Description
Callback<string, undefined, undefined> callback
Returns
Type Description
void

getWorkflow(request, options)

getWorkflow(request?: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, options?: CallOptions): Promise<[protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | undefined, {} | undefined]>;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IGetWorkflowRequest request
CallOptions options
Returns
Type Description
Promise<[protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | undefined, {} | undefined]>

getWorkflow(request, options, callback)

getWorkflow(request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, options: CallOptions, callback: Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IGetWorkflowRequest request
CallOptions options
Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

getWorkflow(request, callback)

getWorkflow(request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, callback: Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IGetWorkflowRequest request
Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listWorkflows(request, options)

listWorkflows(request?: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, options?: CallOptions): Promise<[protos.google.cloud.workflows.v1beta.IWorkflow[], protos.google.cloud.workflows.v1beta.IListWorkflowsRequest | null, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse]>;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IListWorkflowsRequest request
CallOptions options
Returns
Type Description
Promise<[protos.google.cloud.workflows.v1beta.IWorkflow[], protos.google.cloud.workflows.v1beta.IListWorkflowsRequest | null, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse]>

listWorkflows(request, options, callback)

listWorkflows(request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IListWorkflowsRequest request
CallOptions options
PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow> callback
Returns
Type Description
void

listWorkflows(request, callback)

listWorkflows(request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, callback: PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IListWorkflowsRequest request
PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow> callback
Returns
Type Description
void

listWorkflowsAsync(request, options)

listWorkflowsAsync(request?: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workflows.v1beta.IWorkflow>;

Equivalent to listWorkflows, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IListWorkflowsRequest request

The request object that will be sent.

CallOptions options

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.workflows.v1beta.IWorkflow>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Workflow]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkflowsStream(request, options)

listWorkflowsStream(request?: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IListWorkflowsRequest request

The request object that will be sent.

CallOptions options

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Workflow] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listWorkflowsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
Type Name Description
string project
string location
Returns
Type Description
string

{string} Resource name string.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Type Name Description
string locationName

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromWorkflowName(workflowName)

matchLocationFromWorkflowName(workflowName: string): string | number;

Parse the location from Workflow resource.

Parameter
Type Name Description
string workflowName

A fully-qualified path representing Workflow resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Type Name Description
string locationName

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromWorkflowName(workflowName)

matchProjectFromWorkflowName(workflowName: string): string | number;

Parse the project from Workflow resource.

Parameter
Type Name Description
string workflowName

A fully-qualified path representing Workflow resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchWorkflowFromWorkflowName(workflowName)

matchWorkflowFromWorkflowName(workflowName: string): string | number;

Parse the workflow from Workflow resource.

Parameter
Type Name Description
string workflowName

A fully-qualified path representing Workflow resource.

Returns
Type Description
string | number

{string} A string representing the workflow.

updateWorkflow(request, options)

updateWorkflow(request?: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest request
CallOptions options
Returns
Type Description
Promise<[LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

updateWorkflow(request, options, callback)

updateWorkflow(request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest request
CallOptions options
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

updateWorkflow(request, callback)

updateWorkflow(request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, callback: Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Type Name Description
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest request
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> callback
Returns
Type Description
void

workflowPath(project, location, workflow)

workflowPath(project: string, location: string, workflow: string): string;

Return a fully-qualified workflow resource name string.

Parameters
Type Name Description
string project
string location
string workflow
Returns
Type Description
string

{string} Resource name string.