ManagementClient.DeleteTopicAsync(String, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes the topic described by the name relative to the service namespace base address.
public virtual System.Threading.Tasks.Task DeleteTopicAsync (string topicPath, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteTopicAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DeleteTopicAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function DeleteTopicAsync (topicPath As String, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- topicPath
- String
The name of the topic relative to the service namespace base address.
- cancellationToken
- CancellationToken
Returns
Exceptions
topicPath
is empty or null, or path starts or ends with "/".
The length of topic path is greater than 260.
The operation times out. The timeout period is initialized through the ServiceBusConnection class. You may need to increase the value of timeout to avoid this exception if the timeout value is relatively low.
Topic with this name does not exist.
No sufficient permission to perform this operation. You should check to ensure that your ManagementClient has the correct TokenProvider credentials to perform this operation.
The server is busy. You should wait before you retry the operation.
An internal error or an unexpected exception occured.
Applies to
Azure SDK for .NET