ManagementClient.GetSubscriptionsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the list of subscriptions present in the topic.
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.SubscriptionDescription>> GetSubscriptionsAsync (string topicPath, int count = 100, int skip = 0, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSubscriptionsAsync : string * int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.SubscriptionDescription>>
override this.GetSubscriptionsAsync : string * int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.SubscriptionDescription>>
Public Overridable Function GetSubscriptionsAsync (topicPath As String, Optional count As Integer = 100, Optional skip As Integer = 0, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of SubscriptionDescription))
Parameters
- topicPath
- String
The topic path under which all the subscriptions need to be retrieved.
- count
- Int32
The number of subscriptions to fetch. Defaults to 100. Maximum value allowed is 100.
- skip
- Int32
The number of subscriptions to skip. Defaults to 0. Cannot be negative.
- cancellationToken
- CancellationToken
Returns
IList<T> containing list of subscriptions.
Exceptions
If the parameters are out of range.
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.
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.
Remarks
You can simulate pages of list of entities by manipulating count
and skip
. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.
Applies to
Azure SDK for .NET