Skip to main content

GetStateVariables

Returns state variables of the specified notebook.

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);
})();

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.