CdnWebAgentKnowledgeSourceCollection.GetIfExistsAsync Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}.
  • Operation Id. : KnowledgeSources_Get.
  • Default Api Version. : 2025-09-01-preview.
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>> GetIfExistsAsync(string knowledgeSourceName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>>
Public Overridable Function GetIfExistsAsync (knowledgeSourceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of CdnWebAgentKnowledgeSourceResource))

Parameters

knowledgeSourceName
String

The name of the knowledge source.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

knowledgeSourceName is null.

knowledgeSourceName is an empty string, and was expected to be non-empty.

Applies to