Stop
Stops specified Workflow execution.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const StopExecutionRequest =
cloudApi.serverless.workflows_execution_service.StopExecutionRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ExecutionServiceClient);
const result = await client.stop(
StopExecutionRequest.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 StopExecutionRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ExecutionServiceStub)
response = service.Stop(StopExecutionRequest(execution_id="executionId"))
print(response)
StopExecutionRequest
executionId
: string
ID of the Workflow execution.
StopExecutionResponse
executionId
: string
ID of the Workflow execution.