const result = await api.compute.exec({
storageId: "YOUR_OBJECT_STORAGE_ID",
command: "npm run build",
timeoutMs: 120_000,
});
console.log(result.stdout, result.stderr, result.exitCode);result = api.compute.exec(
storage_id="YOUR_OBJECT_STORAGE_ID",
command="npm run build",
timeout_ms=120_000,
)
print(result["stdout"], result["stderr"], result["exitCode"])storageIdstringrequiredID of an Object Storage owned by the signed-in account; it is mounted as /workspace.
commandstringrequiredCommand to execute in the isolated container.
timeoutMsintegerOptional execution timeout in milliseconds, subject to service limits.
Result
The response includes ok, stdout, stderr, exitCode, cpuSeconds and quota information. A non-zero exit code is a completed command result; runner, storage, quota and timeout failures are returned as API errors.
The container is for this command. Use <a href="/sdk/ref/compute/terminals/create">terminals.create()</a> when you need a process to survive the initial request.