GetNotebookMetadata
Returns metadata of the specified notebook.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetNotebookMetadataRequest =
cloudApi.datasphere.project_service.GetNotebookMetadataRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ProjectServiceClient);
const result = await client.getNotebookMetadata(
GetNotebookMetadataRequest.fromPartial({
projectId: "projectId",
notebookPath: "notebookPath",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.datasphere.v1.project_service_pb2 import GetNotebookMetadataRequest
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.GetNotebookMetadata(
GetNotebookMetadataRequest(project_id="projectId", notebook_path="notebookPath")
)
print(response)
GetNotebookMetadataRequest
projectId
: string
ID of the project, for which to return notebook metadata.
notebookPath
: string
Path of the notebook to get metadata.
GetNotebookMetadataResponse
notebookId
: string
ID of the specified notebook.
createdAt
: google.protobuf.Timestamp
The time the notebook was created.
modifiedAt
: google.protobuf.Timestamp
The time the notebook was modified last time.
contentLength
: int64
Content length of the specified notebook.
cellIds
: string
Cell ids of the specified notebook.