Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.DeleteTopicAsync C# (CSharp) Метод

DeleteTopicAsync() публичный Метод

Initiates the asynchronous execution of the DeleteTopic operation.
public DeleteTopicAsync ( DeleteTopicRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.SimpleNotificationService.Model.DeleteTopicRequest 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. ///
Результат Task
        public Task<DeleteTopicResponse> DeleteTopicAsync(DeleteTopicRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteTopicRequestMarshaller();
            var unmarshaller = DeleteTopicResponseUnmarshaller.Instance;

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

Same methods

AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( string topicArn, System cancellationToken = default(CancellationToken) ) : Task
AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( DeleteTopicRequest request, DeleteTopicResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( string topicArn, DeleteTopicResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void

Usage Example

Пример #1
0
 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();
     }
 }
AmazonSimpleNotificationServiceClient