Condividi tramite


ServiceBusAdministrationClient.UpdateSubscriptionAsync Method

Definition

Updates an existing subscription under a topic.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.SubscriptionProperties>> UpdateSubscriptionAsync (Azure.Messaging.ServiceBus.Administration.SubscriptionProperties subscription, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateSubscriptionAsync : Azure.Messaging.ServiceBus.Administration.SubscriptionProperties * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.SubscriptionProperties>>
override this.UpdateSubscriptionAsync : Azure.Messaging.ServiceBus.Administration.SubscriptionProperties * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.SubscriptionProperties>>
Public Overridable Function UpdateSubscriptionAsync (subscription As SubscriptionProperties, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SubscriptionProperties))

Parameters

subscription
SubscriptionProperties

A SubscriptionProperties object describing the attributes with which the subscription will be updated.

cancellationToken
CancellationToken

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

Returns

The SubscriptionProperties of the updated subscription.

Exceptions

Described subscription 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 subscription properties instance is null.

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