/** * 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("Failed with error %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="Newly changed group description";AdminGroupsSettings.Groups.patch(group,groupId);}catch(err){// TODO (developer)- Handle exception from the APIconsole.log("Failed with error %s",err.message);}}