ServiceBusAdministrationClient.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<Azure.Response<bool>> SubscriptionExistsAsync (string topicName, string subscriptionName, System.Threading.CancellationToken cancellationToken = default);
abstract member SubscriptionExistsAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<bool>>
override this.SubscriptionExistsAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<bool>>
Public Overridable Function SubscriptionExistsAsync (topicName As String, subscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of Boolean))
Parameters
- topicName
- String
Name of the topic.
- subscriptionName
- String
Name of the subscription to check.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
True if subscription exists, false otherwise.
Exceptions
The operation times out.
The server is busy. You should wait before you retry the operation.
The topic or subscription name is null or empty..
The topic or subscription name name exceeds the maximum allowed length.
The topic or subscription name is otherwise invalid.
Insufficient permission to perform this operation. You should check to ensure that your ServiceBusAdministrationClient has the necessary claims to perform this operation. https://docs.microsoft.com/azure/service-bus-messaging/service-bus-sas#rights-required-for-service-bus-operations
- The operation timed out. The Reason will be set to ServiceTimeout in this case.
- The server is busy. You should wait before you retry the operation. The failure reason will be set to ServiceBusy in this case.
- An internal error or unexpected exception occurs. The failure reason will be set to GeneralError in this case.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기