ServiceBusAdministrationClient.GetQueueRuntimePropertiesAsync Method

Definition

Retrieves the runtime properties of a queue.

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

Parameters

name
String

The name of the queue relative to service bus namespace.

cancellationToken
CancellationToken

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

Returns

QueueRuntimeProperties containing runtime properties about the queue.

Exceptions

The operation times out. The timeout period is initialized through the ServiceBusAdministrationClientOptions class (see Retry property). You may need to increase the value of timeout to avoid this exception if the timeout value is relatively low.

Queue with this name does not exist.

The server is busy. You should wait before you retry the operation.

The queue name is null or empty.

The queue name exceeds the maximum allowed length.

The queue 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://video2.skills-academy.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.
  • 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