Skip to main content

Get

Returns the specified folder budget.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetFolderBudgetRequest =
cloudApi.datasphere.folder_budget_service.GetFolderBudgetRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.FolderBudgetServiceClient);

const result = await client.get(
GetFolderBudgetRequest.fromPartial({
folderId: "folderId",
})
);
console.log(result);
})();

GetFolderBudgetRequest

folderId : string

ID of the folder to get a budget for.

GetFolderBudgetResponse

unitBalance : google.protobuf.Int64Value

The number of units available in the folder.

maxUnitsPerHour : google.protobuf.Int64Value

The number of units that can be spent per hour.

maxUnitsPerExecution : google.protobuf.Int64Value

The number of units that can be spent on one execution.