SearchIndexClient.CreateOrUpdateKnowledgeSource 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.
Creates a new knowledge source or updates an knowledge source if it already exists.
public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource> CreateOrUpdateKnowledgeSource(Azure.Search.Documents.Indexes.Models.KnowledgeSource knowledgeSource, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateKnowledgeSource : Azure.Search.Documents.Indexes.Models.KnowledgeSource * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource>
override this.CreateOrUpdateKnowledgeSource : Azure.Search.Documents.Indexes.Models.KnowledgeSource * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSource>
Public Overridable Function CreateOrUpdateKnowledgeSource (knowledgeSource As KnowledgeSource, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KnowledgeSource)
Parameters
- knowledgeSource
- KnowledgeSource
The definition of the knowledge source to create or update.
- onlyIfUnchanged
- Boolean
True to throw a RequestFailedException if the ETag does not match the current service version; otherwise, the current service version will be overwritten.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be canceled.
Returns
Exceptions
knowledgeSource is null.