def Run(self, args): client, messages = util.GetClientAndMessages() req = messages.IamProjectsServiceAccountsIdentityBindingsGetRequest( name=iam_util.EmailAndIdentityBindingToResourceName( args.service_account, args.binding_id)) return client.projects_serviceAccounts_identityBindings.Get(req)
def Run(self, args): client, messages = util.GetClientAndMessages() return client.projects_serviceAccounts.GetIamPolicy( messages.IamProjectsServiceAccountsGetIamPolicyRequest( resource=iam_util.EmailToAccountResourceName( args.service_account)))
def Run(self, args): # TODO(b/25212870): use resource parsing. client, messages = util.GetClientAndMessages() return client.projects_serviceAccounts.Get( messages.IamProjectsServiceAccountsGetRequest( name=iam_util.EmailToAccountResourceName(args.service_account)))
def GetServiceAccount(service_account): """Gets the service account given its email.""" client, messages = iam_api.GetClientAndMessages() return client.projects_serviceAccounts.Get( messages.IamProjectsServiceAccountsGetRequest( name=iam_util.EmailToAccountResourceName(service_account)))