Execute
Executes deployed Node.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const NodeExecutionRequest =
cloudApi.datasphere.node_service.NodeExecutionRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.NodeServiceClient);
const result = await client.execute(
NodeExecutionRequest.fromPartial({
// folderId: "folderId",
// nodeId: "nodeId",
// input: {}
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.datasphere.v1.node_service_pb2 import NodeExecutionRequest
from yandex.cloud.datasphere.v1.node_service_pb2_grpc import NodeServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(NodeServiceStub)
response = service.Execute(
NodeExecutionRequest(
# folder_id = "folderId",
# node_id = "nodeId",
# input = {}
)
)
print(response)
NodeExecutionRequest
folderId
: string
ID of the folder that will be matched with Node ACL.
nodeId
: string
ID of the Node to perform request on.
input
: google.protobuf.Struct
Input data for the execution.
NodeExecutionResponse
output
: google.protobuf.Struct
Result of the execution.