Verified Commit 867e698d authored by Martin Abbrent's avatar Martin Abbrent 💬
Browse files

Add bucket notification creation.

parent c07dd9f7
Pipeline #50759 failed with stage
in 14 seconds
\ No newline at end of file
......@@ -118,3 +118,12 @@ class Mc:
def set_bucket_100y_retention(self, bucket_name):
lock_config = ObjectLockConfig(GOVERNANCE, 100, YEARS)
self.minio.set_object_lock_config(bucket_name, lock_config)
def enable_bucket_notification(self, bucket_name):
# Find notification targets
info = self._command(['admin', 'info', self.alias])
targets = info.get('info').get('sqsARN')
# add event listener
for target in targets:
self._command(['event', 'add', '{}/{}'.format(self.alias, bucket_name), target])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment