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)
评论列表
文章目录