Get
Retrieves specified Workflow execution.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetExecutionRequest =
cloudApi.serverless.workflows_execution_service.GetExecutionRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ExecutionServiceClient);
const result = await client.get(
GetExecutionRequest.fromPartial({
executionId: "executionId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.workflows.v1.execution_service_pb2_grpc import ExecutionServiceStub
from yandex.cloud.serverless.workflows.v1.execution_service_pb2 import GetExecutionRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ExecutionServiceStub)
response = service.Get(GetExecutionRequest(execution_id="executionId"))
print(response)
GetExecutionRequest
executionId : string
ID of the Workflow execution.
GetExecutionResponse
execution : Execution
Workflow execution details.
Execution
Status
STATUS_UNSPECIFIEDQUEUEDWorkflow execution is being queued.
RUNNINGWorkflow execution is running.
PAUSEDWorkflow execution is being paused.
STOPPEDWorkflow execution is stopped.
FAILEDWorkflow execution is failed.
FINISHEDWorkflow execution is finished.
id : string
ID of the Workflow execution. Generated at creation time.
workflowId : string
ID of the Workflow.
input : ExecutionInput
Input data for the Workflow execution.
result : ExecutionResult
Result of the Workflow execution.
error : ExecutionError
Error details, in case Workflow execution failed.
status : Status
Status of the Workflow execution
startedAt : google.protobuf.Timestamp
Start timestamp for the Workflow execution.
duration : google.protobuf.Duration
Duration of the Workflow execution.
ExecutionInput
One of input
inputJson: stringJSON input data for the Workflow execution.
ExecutionResult
One of result
resultJson: stringJSON result of the Workflow execution.
ExecutionError
message : string
Error message of the Workflow execution.
errorCode : string
Error code of the Workflow execution.