iam.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:forseti-security 作者: GoogleCloudPlatform 项目源码 文件源码
def get_service_account_iam_policy(self, name):
        """Get IAM policy associated with a service account.

        Args:
            name (str): The service account name to query, must be in the format
                projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}

        Returns:
            dict: The IAM policies for the service account.
        """
        try:
            return self.repository.projects_serviceaccounts.get_iam_policy(name)
        except (errors.HttpError, HttpLib2Error) as e:
            LOGGER.warn(api_errors.ApiExecutionError(name, e))
            raise api_errors.ApiExecutionError('serviceAccountIamPolicy', e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号