GetStateVariables
Returns state variables of the specified notebook.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetStateVariablesRequest =
cloudApi.datasphere.project_service.GetStateVariablesRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ProjectServiceClient);
const result = await client.getStateVariables(
GetStateVariablesRequest.fromPartial({
projectId: "projectId",
notebookId: "notebookId",
// variableNames: ["variableNames"],
// checkpointId: "checkpointId"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.datasphere.v1.project_service_pb2 import GetStateVariablesRequest
from yandex.cloud.datasphere.v1.project_service_pb2_grpc import ProjectServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ProjectServiceStub)
response = service.GetStateVariables(
GetStateVariablesRequest(
project_id="projectId",
notebook_id="notebookId",
# variable_names = ["variableNames"],
# checkpoint_id = "checkpointId"
)
)
print(response)
GetStateVariablesRequest
projectId
: string
ID of the project, for which to return state variables.
notebookId
: string
ID of the notebook, for which to return state variables.
variableNames
: string
Names of variables to return.
checkpointId
: string
ID of the checkpoint, for which to return state variables.
GetStateVariablesResponse
variables
: google.protobuf.Struct
Values of the specified variables.