Skip to main content

GetRestrictions

Get current project restrictions.

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

const GetProjectRestrictionsRequest =
cloudApi.datasphere.project_service.GetProjectRestrictionsRequest;

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

const result = await client.getRestrictions(
GetProjectRestrictionsRequest.fromPartial({
projectId: "projectId",
})
);
console.log(result);
})();

GetProjectRestrictionsRequest

projectId : string

ID of the project.

RestrictionsResponse

restrictions : Restriction

List of restrictions.

Restriction

name : string

Name of restriction.

boolValue : bool

List of boolean restriction values. Empty if value type is not boolean.

longValue : int64

List of long restriction values. Empty if value type is not long.

stringValue : string

List of string restriction values. Empty if value type is not string.