Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.DeleteTopic C# (CSharp) Method

DeleteTopic() public method

Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.
/// Indicates that the user has been denied access to the requested resource. /// /// Indicates an internal service error. /// /// Indicates that a request parameter does not comply with the associated constraints. /// /// Indicates that the requested resource does not exist. ///
public DeleteTopic ( DeleteTopicRequest request ) : Amazon.SimpleNotificationService.Model.DeleteTopicResponse
request Amazon.SimpleNotificationService.Model.DeleteTopicRequest Container for the necessary parameters to execute the DeleteTopic service method.
return Amazon.SimpleNotificationService.Model.DeleteTopicResponse
        public DeleteTopicResponse DeleteTopic(DeleteTopicRequest request)
        {
            var marshaller = new DeleteTopicRequestMarshaller();
            var unmarshaller = DeleteTopicResponseUnmarshaller.Instance;

            return Invoke<DeleteTopicRequest,DeleteTopicResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonSimpleNotificationServiceClient::DeleteTopic ( string topicArn ) : Amazon.SimpleNotificationService.Model.DeleteTopicResponse

Usage Example

 public void DeleteTopic(string topicName)
 {
     using (var client = new AmazonSimpleNotificationServiceClient())
     {
         var topic = client.FindTopic(topicName);
         client.DeleteTopic(topic.TopicArn);
     }
 }
All Usage Examples Of Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient::DeleteTopic
AmazonSimpleNotificationServiceClient