Sdílet prostřednictvím


ManagementClient.GetQueueAsync(String, CancellationToken) Method

Definition

Retrieves a queue from the service namespace.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription> GetQueueAsync (string queuePath, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQueueAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
override this.GetQueueAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
Public Overridable Function GetQueueAsync (queuePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of QueueDescription)

Parameters

queuePath
String

The path of the queue relative to service bus namespace.

cancellationToken
CancellationToken

Returns

QueueDescription containing information about the queue.

Exceptions

Thrown if queuePath is null, white space empty or not in the right format.

The length of queue path is greater than 260.

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.

Queue 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.

Applies to