Admin SDK Groups Settings サービス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Admin SDK Groups Settings サービスを使用すると、Apps Script で Admin SDK の Groups Settings API を使用できます。この API を使用すると、Google Workspace ドメインの管理者(販売パートナー様を含む)は、Google Workspace アカウントのグループのグループ設定を管理できます。
リファレンス
このサービスの詳細については、Admin SDK Groups Settings API のリファレンス ドキュメントをご覧ください。Apps Script のすべての高度なサービスと同様に、Admin SDK Groups Settings サービスでは、公開 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('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);}}