I need to obtain every property of a service account in the Google Cloud. Is it feasible to list every property using a selector like *?
Otherwise, I need to know the following:
Name of the SA account Email address
I have a role.
User controlled Account creation date, last use date, and time of authentication. Keys (if any).
Account status (enabled or disabled): Project name
I am able to obtain all of the projects and service accounts within it, but I am unsure of how to obtain the additional values.
foreach ($project in gcloud projects list --format="value(projectId)")
{
Write-Host "ProjectId: $project"
foreach ($robot in gcloud iam service-accounts list --project $project --format="value(email)")
{
Write-Host " -> Robot $robot"
}
}