s3.py 文件源码

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

项目:Cloud-Custodian 作者: jtroberts83 项目源码 文件源码
def process_bucket(self, bucket):
        n = bucket['Notification']
        if not n:
            return

        statement_ids = self.data.get('statement_ids')
        if statement_ids == 'matched':
            statement_ids = bucket.get(BucketNotificationFilter.annotation_key, ())
        if not statement_ids:
            return

        cfg = defaultdict(list)

        for t in six.itervalues(BucketNotificationFilter.FIELDS):
            for c in n.get(t, []):
                if c['Id'] not in statement_ids:
                    cfg[t].append(c)

        client = bucket_client(local_session(self.manager.session_factory), bucket)
        client.put_bucket_notification_configuration(
            Bucket=bucket['Name'],
            NotificationConfiguration=cfg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号