public FindTopic ( string topicName ) : |
||
topicName | string | The name of the topic find |
return |
public void DeleteTopic(string topicName) { using (var client = new AmazonSimpleNotificationServiceClient()) { var topic = client.FindTopic(topicName); client.DeleteTopic(topic.TopicArn); } }
public Topic CheckSnsTopic(string topicName) { using (var client = new AmazonSimpleNotificationServiceClient()) { return client.FindTopic(topicName); } }
private string EnsureTopic(string topicName, AmazonSimpleNotificationServiceClient client) { var topic = client.FindTopic(topicName); if (topic != null) return topic.TopicArn; _logger.DebugFormat("Topic with name {0} does not exist. Creating new topic", topicName); var topicResult = client.CreateTopic(topicName); return topicResult.HttpStatusCode == HttpStatusCode.OK ? topicResult.TopicArn : string.Empty; }