SearchIndexClient.GetKnowledgeSourceAsync Method

Definition

Overloads

Name Description
GetKnowledgeSourceAsync(String, RequestContext)

[Protocol Method] Retrieves a knowledge source definition.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetKnowledgeSourceAsync(String, CancellationToken)

Retrieves a knowledge source definition.

GetKnowledgeSourceAsync(String, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Retrieves a knowledge source definition.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetKnowledgeSourceAsync(string sourceName, Azure.RequestContext context);
abstract member GetKnowledgeSourceAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetKnowledgeSourceAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetKnowledgeSourceAsync (sourceName As String, context As RequestContext) As Task(Of Response)

Parameters

sourceName
String

The name of the knowledge source.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

sourceName is null.

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

Service returned a non-success status code.

Applies to

GetKnowledgeSourceAsync(String, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.KnowledgeSources.cs

Retrieves a knowledge source definition.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource>> GetKnowledgeSourceAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetKnowledgeSourceAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource>>
override this.GetKnowledgeSourceAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource>>
Public Overridable Function GetKnowledgeSourceAsync (sourceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of KnowledgeSource))

Parameters

sourceName
String

The name of the knowledge source.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

sourceName is null.

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

Service returned a non-success status code.

Applies to