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
TypeNameDescription
ClientOptionsopts

Properties

apiEndpoint

static get apiEndpoint(): string;

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

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

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

operationsClient

operationsClient: gax.OperationsClient;
Property Value
TypeDescription
gax.OperationsClient

pathTemplates

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

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

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

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

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

workflowsStub

workflowsStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
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
TypeNameDescription
stringname

The operation name that will be passed.

Returns
TypeDescription
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
TypeNameDescription
stringname

The operation name that will be passed.

Returns
TypeDescription
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
TypeNameDescription
stringname

The operation name that will be passed.

Returns
TypeDescription
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
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequestrequest
CallOptionsoptions
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequestrequest
CallOptionsoptions
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.ICreateWorkflowRequestrequest
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequestrequest
CallOptionsoptions
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequestrequest
CallOptionsoptions
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequestrequest
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
TypeNameDescription
Callback<string, undefined, undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IGetWorkflowRequestrequest
CallOptionsoptions
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IGetWorkflowRequestrequest
CallOptionsoptions
Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IGetWorkflowRequestrequest
Callback<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IListWorkflowsRequestrequest
CallOptionsoptions
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IListWorkflowsRequestrequest
CallOptionsoptions
PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IListWorkflowsRequestrequest
PaginationCallback<protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, protos.google.cloud.workflows.v1beta.IListWorkflowsResponse | null | undefined, protos.google.cloud.workflows.v1beta.IWorkflow>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IListWorkflowsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IListWorkflowsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
TypeNameDescription
stringproject
stringlocation
Returns
TypeDescription
string

{string} Resource name string.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
TypeNameDescription
stringlocationName

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkflowName(workflowName)

matchLocationFromWorkflowName(workflowName: string): string | number;

Parse the location from Workflow resource.

Parameter
TypeNameDescription
stringworkflowName

A fully-qualified path representing Workflow resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
TypeNameDescription
stringlocationName

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkflowName(workflowName)

matchProjectFromWorkflowName(workflowName: string): string | number;

Parse the project from Workflow resource.

Parameter
TypeNameDescription
stringworkflowName

A fully-qualified path representing Workflow resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchWorkflowFromWorkflowName(workflowName)

matchWorkflowFromWorkflowName(workflowName: string): string | number;

Parse the workflow from Workflow resource.

Parameter
TypeNameDescription
stringworkflowName

A fully-qualified path representing Workflow resource.

Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequestrequest
CallOptionsoptions
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequestrequest
CallOptionsoptions
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
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
TypeNameDescription
protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequestrequest
Callback<LROperation<protos.google.cloud.workflows.v1beta.IWorkflow, protos.google.cloud.workflows.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

workflowPath(project, location, workflow)

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

Return a fully-qualified workflow resource name string.

Parameters
TypeNameDescription
stringproject
stringlocation
stringworkflow
Returns
TypeDescription
string

{string} Resource name string.