ManagementClient.SubscriptionExistsAsync 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.
Checks whether a given subscription exists or not.
public virtual System.Threading.Tasks.Task<bool> SubscriptionExistsAsync (string topicPath, string subscriptionName, System.Threading.CancellationToken cancellationToken = default);
abstract member SubscriptionExistsAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.SubscriptionExistsAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function SubscriptionExistsAsync (topicPath As String, subscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- topicPath
- String
Path of the topic.
- subscriptionName
- String
Name of the subscription to check.
- cancellationToken
- CancellationToken
Returns
True if subscription exists, false otherwise.
Exceptions
topic or subscription path provided is not valid.
The operation times out.
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 unexpected exception occurs.
Applies to
Azure SDK for .NET