Keeping it simple - I'm using Google Apps Script Admin SDK Directory Service to bulk create groups:
AdminDirectory.Groups.insert({"email": group1@test.test});
Following this I have been attempting to update the groups permissions using the following:
AdminDirectory.Groups.update({
"whoCanJoin": "CAN_REQUEST_TO_JOIN",
"whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
"allowExternalMembers": "false",
"whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST",
"allowWebPosting": "true"
},
"group1@test.test");
I've come to the conclusion that what I really need is access to the Group Settings API. Can I do this with Apps Script?