cool, now we can delete sns topics

This commit is contained in:
cktricky
2018-05-19 22:00:31 -03:00
parent 236bb19063
commit 77f99e34ff
2 changed files with 30 additions and 0 deletions

View File

@@ -21,3 +21,14 @@ def module_sns_list_subscribers(*args):
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")
def module_sns_delete_topic(*args):
'''
SNS delete a topic. Takes two arguments - the topic arn and the region.
python3 weirdAAL.py -m sns_delete_topic -a arn:aws:sns:us-east-1:123456789123:sometopic,us-east-1
'''
try:
if args[0][0] and args[0][1]:
delete_sns_topic(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")