iam.py 文件源码

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

项目:cloud-custodian 作者: capitalone 项目源码 文件源码
def process(self, resources, event=None):
        client = local_session(self.manager.session_factory).client('iam')
        with self.executor_factory(max_workers=2) as w:
            futures = []
            for user_set in chunks(
                    [r for r in resources if 'c7n:Groups' not in r], size=50):
                futures.append(
                    w.submit(self.get_user_groups, client, user_set))
            for f in as_completed(futures):
                pass

        matched = []
        for r in resources:
            for p in r['c7n:Groups']:
                if self.match(p) and r not in matched:
                    matched.append(r)
        return matched
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号