Get
Retrieves specified Workflow.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.workflows.v1.workflow_service_pb2 import GetWorkflowRequest
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.Get(GetWorkflowRequest(workflow_id="workflowId"))
print(response)
GetWorkflowRequest
workflowId : string
ID of the Workflow.
GetWorkflowResponse
workflow : Workflow
Workflow properties.
Workflow
Status
STATUS_UNSPECIFIEDCREATINGWorkflow is being created.
ACTIVEWorkflow is ready for use.
UPDATINGWorkflow is being updated.
DELETINGWorkflow is being deleted.
ERRORWorkflow 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: stringWorkflow specification in YAML format.
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.