Send feedback
Class v1.WorkflowsClient Stay organized with collections
Save and categorize content based on your preferences.
Version 1.3.1 keyboard_arrow_down
Workflows is used to deploy and execute workflow programs. Workflows makes sure the program executes reliably, despite hardware and networking interruptions. v1
Package
@google-cloud/workflows
Constructors
(constructor)(opts)
constructor
(
opts
?:
ClientOptions
);
Construct an instance of WorkflowsClient.
Parameter
Properties
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
auth
:
gax
.
GoogleAuth
;
Property Value
descriptors
descriptors
:
Descriptors
;
Property Value
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
Property Value
operationsClient
operationsClient
:
gax
.
OperationsClient
;
Property Value
pathTemplates
pathTemplates
:
{
[
name
:
string
]
:
gax
.
PathTemplate
;
};
Property Value
port
static
get
port
()
:
number
;
The port for this API service.
Property Value
scopes
static
get
scopes
()
:
string
[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
Property Value
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Property Value
workflowsStub
workflowsStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Property Value
Methods
checkCreateWorkflowProgress(name)
checkCreateWorkflowProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
Workflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
OperationMetadata
>> ;
Check the status of the long running operation returned by createWorkflow()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.cloud.workflows.v1.Workflow
, protos. google.cloud.workflows.v1.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.
Example const decodedOperation = await checkCreateWorkflowProgress(name); console.log(decodedOperation.result); console.log(decodedOperation.done); console.log(decodedOperation.metadata);
checkDeleteWorkflowProgress(name)
checkDeleteWorkflowProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
protobuf
.
Empty
,
protos
.
google
.
cloud
.
workflows
.
v1
.
OperationMetadata
>> ;
Check the status of the long running operation returned by deleteWorkflow()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.protobuf.Empty
, protos. google.cloud.workflows.v1.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.
Example const decodedOperation = await checkDeleteWorkflowProgress(name); console.log(decodedOperation.result); console.log(decodedOperation.done); console.log(decodedOperation.metadata);
checkUpdateWorkflowProgress(name)
checkUpdateWorkflowProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
Workflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
OperationMetadata
>> ;
Check the status of the long running operation returned by updateWorkflow()
.
Parameter Name
Description
name
string
The operation name that will be passed.
Returns Type
Description
Promise
< LROperation
<protos. google.cloud.workflows.v1.Workflow
, protos. google.cloud.workflows.v1.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.
Example const decodedOperation = await checkUpdateWorkflowProgress(name); console.log(decodedOperation.result); console.log(decodedOperation.done); console.log(decodedOperation.metadata);
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
.
v1
.
ICreateWorkflowRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.ICreateWorkflowRequest
options
CallOptions
Returns
createWorkflow(request, options, callback)
createWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
ICreateWorkflowRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.ICreateWorkflowRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
createWorkflow(request, callback)
createWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
ICreateWorkflowRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.ICreateWorkflowRequest
callback
Callback
< LROperation
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
deleteWorkflow(request, options)
deleteWorkflow
(
request
?:
protos
.
google
.
cloud
.
workflows
.
v1
.
IDeleteWorkflowRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IDeleteWorkflowRequest
options
CallOptions
Returns
deleteWorkflow(request, options, callback)
deleteWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IDeleteWorkflowRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IDeleteWorkflowRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.protobuf.IEmpty
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
deleteWorkflow(request, callback)
deleteWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IDeleteWorkflowRequest
,
callback
:
Callback<LROperation<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IDeleteWorkflowRequest
callback
Callback
< LROperation
<protos. google.protobuf.IEmpty
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
getProjectId()
getProjectId
()
:
Promise<string>
;
Returns
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
Parameter Name
Description
callback
Callback
<string, undefined, undefined>
Returns
getWorkflow(request, options)
getWorkflow
(
request
?:
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IGetWorkflowRequest
options
CallOptions
Returns
getWorkflow(request, options, callback)
getWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IGetWorkflowRequest
options
CallOptions
callback
Callback
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IGetWorkflowRequest
| null | undefined, {} | null | undefined>
Returns
getWorkflow(request, callback)
getWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IGetWorkflowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IGetWorkflowRequest
callback
Callback
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IGetWorkflowRequest
| null | undefined, {} | null | undefined>
Returns
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
.
v1
.
IListWorkflowsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
[],
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
|
null
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsResponse
]>;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IListWorkflowsRequest
options
CallOptions
Returns
listWorkflows(request, options, callback)
listWorkflows
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IListWorkflowsRequest
options
CallOptions
callback
PaginationCallback
<protos. google.cloud.workflows.v1.IListWorkflowsRequest
, protos. google.cloud.workflows.v1.IListWorkflowsResponse
| null | undefined, protos. google.cloud.workflows.v1.IWorkflow
>
Returns
listWorkflows(request, callback)
listWorkflows
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IListWorkflowsRequest
callback
PaginationCallback
<protos. google.cloud.workflows.v1.IListWorkflowsRequest
, protos. google.cloud.workflows.v1.IListWorkflowsResponse
| null | undefined, protos. google.cloud.workflows.v1.IWorkflow
>
Returns
listWorkflowsAsync(request, options)
listWorkflowsAsync
(
request
?:
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
workflows
.
v1
.
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 Name
Description
request
protos. google.cloud.workflows.v1.IListWorkflowsRequest
The request object that will be sent.
options
CallOptions
Call options. See CallOptions
for more details.
Returns Type
Description
AsyncIterable
<protos. google.cloud.workflows.v1.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.
Example const iterable = client.listWorkflowsAsync(request); for await (const response of iterable) { // process response }
listWorkflowsStream(request, options)
listWorkflowsStream
(
request
?:
protos
.
google
.
cloud
.
workflows
.
v1
.
IListWorkflowsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IListWorkflowsRequest
The request object that will be sent.
options
CallOptions
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
Returns Type
Description
string
{string} Resource name string.
matchLocationFromLocationName(locationName)
matchLocationFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the location from Location resource.
Parameter Name
Description
locationName
string
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 Name
Description
workflowName
string
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 Name
Description
locationName
string
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 Name
Description
workflowName
string
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 Name
Description
workflowName
string
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
.
v1
.
IUpdateWorkflowRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IUpdateWorkflowRequest
options
CallOptions
Returns
updateWorkflow(request, options, callback)
updateWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IUpdateWorkflowRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IUpdateWorkflowRequest
options
CallOptions
callback
Callback
< LROperation
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
updateWorkflow(request, callback)
updateWorkflow
(
request
:
protos
.
google
.
cloud
.
workflows
.
v1
.
IUpdateWorkflowRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
workflows
.
v1
.
IWorkflow
,
protos
.
google
.
cloud
.
workflows
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.workflows.v1.IUpdateWorkflowRequest
callback
Callback
< LROperation
<protos. google.cloud.workflows.v1.IWorkflow
, protos. google.cloud.workflows.v1.IOperationMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
Returns
workflowPath(project, location, workflow)
workflowPath
(
project
:
string
,
location
:
string
,
workflow
:
string
)
:
string
;
Return a fully-qualified workflow resource name string.
Parameters
Returns Type
Description
string
{string} Resource name string.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]