Sdílet prostřednictvím


ManagementClient.GetSubscriptionRuntimeInfoAsync Method

Definition

Retrieves the runtime information of a subscription.

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

Parameters

topicPath
String

The path of the topic relative to service bus namespace.

subscriptionName
String

The subscription name.

cancellationToken
CancellationToken

Returns

SubscriptionRuntimeInfo containing runtime information about the subscription.

Exceptions

Thrown if topicPath, subscriptionName 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 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 or Subscription 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