ManagementClient.GetRuleAsync 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.
Retrieves a rule from the service namespace.
public virtual System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.RuleDescription> GetRuleAsync (string topicPath, string subscriptionName, string ruleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRuleAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.RuleDescription>
override this.GetRuleAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.RuleDescription>
Public Overridable Function GetRuleAsync (topicPath As String, subscriptionName As String, ruleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RuleDescription)
Parameters
- topicPath
- String
The path of the topic relative to service bus namespace.
- subscriptionName
- String
The subscription name the rule belongs to.
- ruleName
- String
The name of the rule to retrieve.
- cancellationToken
- CancellationToken
Returns
RuleDescription containing information about the rule.
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.
Topic/Subscription/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.
Remarks
Note - Only following data types are deserialized in Filters and Action parameters - string,int,long,bool,double,DateTime. Other data types would return its string value.
Applies to
Azure SDK for .NET