MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / delete_topic

Method delete_topic

python/example_code/sns/sns_basics.py:72–81  ·  view source on GitHub ↗

Deletes a topic. All subscriptions to the topic are also deleted.

(topic)

Source from the content-addressed store, hash-verified

70 # snippet-start:[python.example_code.sns.DeleteTopic]
71 @staticmethod
72 def delete_topic(topic):
73 """
74 Deletes a topic. All subscriptions to the topic are also deleted.
75 """
76 try:
77 topic.delete()
78 logger.info("Deleted topic %s.", topic.arn)
79 except ClientError:
80 logger.exception("Couldn't delete topic %s.", topic.arn)
81 raise
82
83 # snippet-end:[python.example_code.sns.DeleteTopic]
84

Callers 3

usage_demoFunction · 0.95
usage_demoFunction · 0.95
test_delete_topicFunction · 0.95

Calls 1

deleteMethod · 0.45

Tested by 1

test_delete_topicFunction · 0.76