Share via


ServiceBusRuleManager.DeleteRuleAsync(String, CancellationToken) Method

Definition

Removes the rule on the subscription identified by ruleName.

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

Parameters

ruleName
String

Name of the rule

cancellationToken
CancellationToken

An optional CancellationToken instance to signal the request to cancel the operation.

Returns

A task instance that represents the asynchronous remove rule operation.

Exceptions

  • The specified entity could not be found. The Reason will be set to MessagingEntityNotFound in this case.
  • The operation timed out. The Reason will be set to ServiceTimeout in this case.
  • The server is busy. You should wait before you retry the operation. The failure reason will be set to ServiceBusy in this case.
  • An internal error or unexpected exception occurs. The failure reason will be set to GeneralError in this case.

Applies to