共用方式為


ManagementClient.DeleteRuleAsync Method

Definition

Deletes the rule described by ruleName from subscriptionName under topicPath./>

public virtual System.Threading.Tasks.Task DeleteRuleAsync (string topicPath, string subscriptionName, string ruleName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteRuleAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DeleteRuleAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function DeleteRuleAsync (topicPath As String, subscriptionName As String, ruleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

topicPath
String

The name of the topic relative to the service namespace base address.

subscriptionName
String

The name of the subscription to delete.

ruleName
String

The name of the rule to delete.

cancellationToken
CancellationToken

Returns

Exceptions

Thrown if topicPath, subscriptionName, or ruleName is null, white space empty or not in the right format.

The length of topic path is greater than 260 or length of subscription-name/rule-name is greater than 50.

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.

Rule 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