Служба настроек групп Admin SDK позволяет использовать API настроек групп Admin SDK в скрипте приложений. Этот API дает администраторам Google Workspace доменов (в том числе реселлеров) возможность управлять настройками группы для групп в своих Google Workspace счет.
Ссылка
Подробную информацию об этой службе см. в справочной документации API настроек групп Admin SDK. Как и все расширенные службы в Apps Script, служба настроек групп Admin SDK использует те же объекты, методы и параметры, что и общедоступный API. Дополнительные сведения см. в разделе Как определяются сигнатуры методов .
/** * Gets a group's settings and logs them to the console. */functiongetGroupSettings(){// TODO (developer) - Replace groupId value with yoursconstgroupId='exampleGroup@example.com';try{constgroup=AdminGroupsSettings.Groups.get(groupId);console.log(JSON.stringify(group,null,2));}catch(err){// TODO (developer)- Handle exception from the APIconsole.log('Failedwitherror%s',err.message);}}
Обновить настройки группы
В этом примере показано, как можно изменить настройки группы. Здесь описание изменено, но аналогичным образом можно изменить и другие настройки.
/** * Updates group's settings. Here, the description is modified, but various * other settings can be changed in the same way. * @see https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups/patch */functionupdateGroupSettings(){constgroupId='exampleGroup@example.com';try{constgroup=AdminGroupsSettings.newGroups();group.description='Newlychangedgroupdescription';AdminGroupsSettings.Groups.patch(group,groupId);}catch(err){// TODO (developer)- Handle exception from the APIconsole.log('Failedwitherror%s',err.message);}}
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-05-08 UTC."],[[["The Admin SDK Groups Settings service enables Google Workspace administrators to manage group settings within their accounts using Apps Script and the Groups Settings API."],["This is an advanced service that requires enabling before use and mirrors the functionality of the public API."],["Comprehensive reference documentation, support resources, and sample code are available to guide developers in using this service effectively, including examples for retrieving and updating group settings."]]],[]]