public DeleteTopicAsync ( |
||
request | Container for the necessary parameters to execute the DeleteTopic operation. | |
cancellationToken | System | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// |
return | Task |
public void DeleteTopic(string topicName) { using (var client = new AmazonSimpleNotificationServiceClient(_credentials)) { var topic = client.ListTopicsAsync().Result.Topics.SingleOrDefault(t => t.TopicArn == topicName); client.DeleteTopicAsync(topic.TopicArn).Wait(); } }