GetRestrictions
Get current project restrictions.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.datasphere.v2.project_service_pb2 import GetProjectRestrictionsRequest
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.GetRestrictions(GetProjectRestrictionsRequest(project_id="projectId"))
print(response)
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.