]>
git.proxmox.com Git - ceph.git/blob - ceph/examples/rgw/boto3/topic_attributes.py
3 from pprint
import pprint
6 # topic arn as first argument
7 topic_arn
= sys
.argv
[1]
9 print ('Usage: ' + sys
.argv
[0] + ' <topic arn>')
12 # endpoint and keys from vstart
13 endpoint
= 'http://127.0.0.1:8000'
14 access_key
='0555b35654ad1656d804'
15 secret_key
='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
17 # Add info to client to get the topi attirubutes of a given topi
18 client
= boto3
.client('sns',
19 endpoint_url
=endpoint
,
20 aws_access_key_id
=access_key
,
21 aws_secret_access_key
=secret_key
)
22 # getting attributes of a specific topic is an extension to AWS sns
23 pprint(client
.get_topic_attributes(TopicArn
=topic_arn
))