你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServiceBusAdministrationClient.GetSubscriptionsRuntimePropertiesAsync 方法

定义

检索命名空间中存在的订阅的运行时属性列表。

public virtual Azure.AsyncPageable<Azure.Messaging.ServiceBus.Administration.SubscriptionRuntimeProperties> GetSubscriptionsRuntimePropertiesAsync (string topicName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSubscriptionsRuntimePropertiesAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Messaging.ServiceBus.Administration.SubscriptionRuntimeProperties>
override this.GetSubscriptionsRuntimePropertiesAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Messaging.ServiceBus.Administration.SubscriptionRuntimeProperties>
Public Overridable Function GetSubscriptionsRuntimePropertiesAsync (topicName As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of SubscriptionRuntimeProperties)

参数

topicName
String

相对于服务总线命名空间的主题的名称。

cancellationToken
CancellationToken

一个可选 CancellationToken 实例,用于发出取消操作的请求信号。

返回

描述 AsyncPageable<T> 订阅运行时属性的 。

例外

操作超时。超时期限是通过 ServiceBusAdministrationClientOptions 类初始化的 (请参阅 retry 属性) 。 如果超时值相对较低,可能需要增加超时值以避免此异常。

服务器繁忙。 在重试操作之前,应等待。

主题名称为 null 或空。

主题名称超出了允许的最大长度。

否则,主题名称无效。

  • 找不到指定的实体。 在这种情况下, Reason 将设置为 MessagingEntityNotFound
  • 操作超时。在这种情况下, Reason 将设置为 ServiceTimeout
  • 服务器繁忙。 在重试操作之前,应等待。 在这种情况下,失败原因将设置为 ServiceBusy
  • 发生内部错误或意外异常。 在这种情况下,失败原因将设置为 GeneralError

注解

允许的最大值为每页 100。

适用于