Our team is converting the manual process for creating a GCP project, creating a service account and enabling G Suite Domain-wide delegation on the service account to an automated process via Python.
We're able to create the service account following this documentation here: https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts/create
However, there seems to be little to no documentation on how to enable this on a service account using the API. All the documentation we find is telling us to enable the setting from the GCP console which does not help for our automation. https://developers.google.com/admin-sdk/directory/v1/guides/delegation