Skip to main content

Get

Retrieves specified Workflow.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetWorkflowRequest =
cloudApi.serverless.workflows_workflow_service.GetWorkflowRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.WorkflowServiceClient);

const result = await client.get(
GetWorkflowRequest.fromPartial({
workflowId: "workflowId",
})
);
console.log(result);
})();

GetWorkflowRequest

workflowId : string

ID of the Workflow.

GetWorkflowResponse

workflow : Workflow

Workflow properties.

Workflow

Status
  • STATUS_UNSPECIFIED

  • CREATING

    Workflow is being created.

  • ACTIVE

    Workflow is ready for use.

  • UPDATING

    Workflow is being updated.

  • DELETING

    Workflow is being deleted.

  • ERROR

    Workflow failed. The only allowed action is delete.

id : string

ID of the Workflow. Generated at creation time.

folderId : string

ID of the folder that the Workflow belongs to.

specification : WorkflowSpecification

Specification of the Workflow

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 : 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 resource access in Workflow execution.

WorkflowSpecification

One of spec

  • specYaml : string

    Workflow specification in YAML format.

LogOptions

disabled : bool

Is logging from Workflow disabled.

One of destination

  • logGroupId : string

    ID of the logging group which should be used for Workflows logs.

  • folderId : string

    ID 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.