ServiceBusAdministrationClient.UpdateRuleAsync 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.
Updates an existing rule for a topic-subscription.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.RuleProperties>> UpdateRuleAsync (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.Administration.RuleProperties rule, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateRuleAsync : string * string * Azure.Messaging.ServiceBus.Administration.RuleProperties * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.RuleProperties>>
override this.UpdateRuleAsync : string * string * Azure.Messaging.ServiceBus.Administration.RuleProperties * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.RuleProperties>>
Public Overridable Function UpdateRuleAsync (topicName As String, subscriptionName As String, rule As RuleProperties, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RuleProperties))
Parameters
- topicName
- String
Name of the topic.
- subscriptionName
- String
Name of the subscription.
- rule
- RuleProperties
A RuleProperties object describing the attributes with which the rule will be updated.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
The RuleProperties of the updated rule.
Exceptions
Described topic/subscription/rule was not found.
The operation times out.
Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.
The server is busy. You should wait before you retry the operation.
The topic name, subscription name, or rule properties instance is null.
The topic or subscription name name exceeds the maximum allowed length.
The topic or subscription name is otherwise invalid.
Insufficient permission to perform this operation. You should check to ensure that your ServiceBusAdministrationClient has the necessary claims to perform this operation. https://learn.microsoft.com/azure/service-bus-messaging/service-bus-sas#rights-required-for-service-bus-operations
- 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.
- Either the specified size of the entity is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size. The failure reason will be set to QuotaExceeded 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
Azure SDK for .NET