Get
Returns a group mapping configured for the specific federation If a federation does not exist this call will return an error NOT_FOUND will be returned If a federation exist, but has not ever been configured for group mapping the call FAILED_PRECONDITION will be returned.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetGroupMappingRequest =
cloudApi.organizationmanager.group_mapping_service.GetGroupMappingRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.GroupMappingServiceClient);
const result = await client.get(
GetGroupMappingRequest.fromPartial({
federationId: "federationId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.organizationmanager.v1.group_mapping_service_pb2 import GetGroupMappingRequest
from yandex.cloud.organizationmanager.v1.group_mapping_service_pb2_grpc import (
GroupMappingServiceStub,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(GroupMappingServiceStub)
response = service.Get(GetGroupMappingRequest(federation_id="federationId"))
print(response)
GetGroupMappingRequest
federationId
: string
GetGroupMappingResponse
groupMapping
: GroupMapping
GroupMapping
Group synchronization status for a specific federation Absence of this object for a federation means that there is no group synchronization set of for the federation.
federationId
: string
Federation id
enabled
: bool
Flag to show whether group synchronization should be enabled for this federation.