added the ability to list topics in each region as well as list all subscribers for a topic
This commit is contained in:
23
modules/sns.py
Normal file
23
modules/sns.py
Normal file
@@ -0,0 +1,23 @@
|
||||
'''
|
||||
SNS module
|
||||
'''
|
||||
|
||||
from libs.sns import *
|
||||
|
||||
def module_sns_list_topics():
|
||||
'''
|
||||
SNS list all topics
|
||||
python3 weirdAAL.py -m sns_list_topics -t demo
|
||||
'''
|
||||
list_sns_topics()
|
||||
|
||||
def module_sns_list_subscribers(*args):
|
||||
'''
|
||||
SNS list subscribers for a topic. Takes two arguments - the topic arn and then the region.
|
||||
python3 weirdAAL.py -m sns_list_subscribers -a arn:aws:sns:us-east-1:123456789123:sometopic,us-east-1
|
||||
'''
|
||||
try:
|
||||
if args[0][0] and args[0][1]:
|
||||
list_sns_subscribers(args[0][0], args[0][1])
|
||||
except IndexError:
|
||||
print("Please provide a topic arn *AND* region, ex: -a arn:aws:sns:us-east-1:123456789123:sometopic,us-east-1")
|
||||
Reference in New Issue
Block a user