Skip to main content

GetRestrictions

Get current community restrictions.

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

const GetCommunityRestrictionsRequest =
cloudApi.datasphere.community_service.GetCommunityRestrictionsRequest;

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

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

GetCommunityRestrictionsRequest​

communityId : string​

ID of the community.

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.