/** * 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);}}
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["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."]]],[]]