]>
git.proxmox.com Git - ceph.git/blob - ceph/examples/boto3/get_notification.py
7 print('Usage: ' + sys
.argv
[0] + ' <bucket> <notification>')
10 # bucket name as first argument
11 bucketname
= sys
.argv
[1]
12 # notification name as second argument
13 notification_name
= sys
.argv
[2]
15 # endpoint and keys from vstart
16 endpoint
= 'http://127.0.0.1:8000'
17 access_key
='0555b35654ad1656d804'
18 secret_key
='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
20 client
= boto3
.client('s3',
21 endpoint_url
=endpoint
,
22 aws_access_key_id
=access_key
,
23 aws_secret_access_key
=secret_key
)
25 # getting a specific notification configuration is an extension to AWS S3 API
27 print(client
.get_bucket_notification_configuration(Bucket
=bucketname
,
28 Notification
=notification_name
))