Get
Returns the specified Group resource.
To get the list of available Group resources, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetGroupRequest =
cloudApi.organizationmanager.group_service.GetGroupRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.GroupServiceClient);
const result = await client.get(
GetGroupRequest.fromPartial({
groupId: "groupId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.organizationmanager.v1.group_service_pb2 import GetGroupRequest
from yandex.cloud.organizationmanager.v1.group_service_pb2_grpc import GroupServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(GroupServiceStub)
response = service.Get(GetGroupRequest(group_id="groupId"))
print(response)
GetGroupRequest
groupId
: string
ID of the Group resource to return. To get the group ID, use a GroupService.List request.
Group
A Group resource. For more information, see Groups.
id
: string
ID of the group.
organizationId
: string
ID of the organization that the group belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the group.
description
: string
Description of the group.