Edited:
I don't think it is possible via Group Setting API.
The description for disabling a group is below:
"Once disabled all new posts to the group will be rejected. Old messages will be browseable and searchable online by anyone that has permission to view the group's content. If this setting is reverted, 'Who can post messages' will automatically be set to 'Managers only' in the 'Basic permissions' section."
I try to use the group setting API and change the setting from all in domain can post to just all manager can post to limit the posting of the group.
"whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST" -> ALL_MANAGERS_CAN_POST
Note if you take a look at the basic permission for a disabled group, it unchecked all the users who are allowed to post. However, the group setting APi only limit to you change to ALL manager can post.
So it didn't really disable a group...