List
Retrieves list of Workflows in specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListWorkflowsRequest =
cloudApi.serverless.workflows_workflow_service.ListWorkflowsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.WorkflowServiceClient);
const result = await client.list(
ListWorkflowsRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.workflows.v1.workflow_service_pb2 import ListWorkflowsRequest
from yandex.cloud.serverless.workflows.v1.workflow_service_pb2_grpc import WorkflowServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(WorkflowServiceStub)
response = service.List(
ListWorkflowsRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListWorkflowsRequest
folderId
: string
ID of the folder to list Workflows in.
pageSize
: int64
The maximum number of results per page to return. If the number of available
results is larger than pageSize
, the service returns a ListWorkflowsResponse.next_page_token
that can be used to get the next page of results in subsequent list requests.
Default value: 100.
pageToken
: string
Page token. To get the next page of results, set pageToken
to the
ListWorkflowsResponse.next_page_token returned by a previous list request.
filter
: string
A filter expression that filters functions listed in the response.
The expression must specify:
- The field name. Currently filtering can only be applied to following fields: name, created_at.
- An
=
operator. - The value in double quotes (
"
). Must be 3-63 characters long and match the regular expression[a-z]([-a-z0-9]{0,61}[a-z0-9])?
. Example of a filter:name=my-workflow
.
ListWorkflowsResponse
workflows
: WorkflowPreview
List of Workflows.
nextPageToken
: string
Token for getting the next page of the list. If the number of results is greater than
the specified ListWorkflowsRequest.page_size, use next_page_token
as the value
for the ListWorkflowsRequest.page_token parameter in the next list request.
Each subsequent page will have its own next_page_token
to continue paging through the results.
WorkflowPreview
id
: string
ID of the Workflow. Generated at creation time.
folderId
: string
ID of the folder that the Workflow belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp for the Workflow.
name
: string
Name of the Workflow. The name is unique within the folder.
description
: string
Description of the Workflow.
labels
: string
Workflow labels as key:value
pairs.
status
: Workflow.Status
Status of the Workflow.
logOptions
: LogOptions
Options for logging from the Workflow.
networkId
: string
ID of the VPC network Workflow will be executed in, in order to access private resources.
serviceAccountId
: string
ID of the Service Account which will be used for resources access in Workflow execution.
LogOptions
disabled
: bool
Is logging from Workflow disabled.
One of destination
logGroupId
: stringID of the logging group which should be used for Workflows logs.
folderId
: stringID of the folder which default logging group should be used for Workflows.
minLevel
: yandex.cloud.logging.v1.LogLevel.Level
Minimum logs level.
See LogLevel.Level for details.