SearchIndexClient.CreateOrUpdateKnowledgeBase 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 base or updates a knowledge base if it already exists.
public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase> CreateOrUpdateKnowledgeBase(Azure.Search.Documents.Indexes.Models.KnowledgeBase knowledgeBase, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase> CreateOrUpdateKnowledgeBase(Azure.Search.Documents.Indexes.Models.KnowledgeBase KnowledgeBase, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateKnowledgeBase : Azure.Search.Documents.Indexes.Models.KnowledgeBase * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase>
override this.CreateOrUpdateKnowledgeBase : Azure.Search.Documents.Indexes.Models.KnowledgeBase * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase>
abstract member CreateOrUpdateKnowledgeBase : Azure.Search.Documents.Indexes.Models.KnowledgeBase * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase>
override this.CreateOrUpdateKnowledgeBase : Azure.Search.Documents.Indexes.Models.KnowledgeBase * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeBase>
Public Overridable Function CreateOrUpdateKnowledgeBase (knowledgeBase As KnowledgeBase, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KnowledgeBase)
Public Overridable Function CreateOrUpdateKnowledgeBase (KnowledgeBase As KnowledgeBase, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KnowledgeBase)
Parameters
- knowledgeBaseKnowledgeBase
- KnowledgeBase
The definition of the knowledge base 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
knowledgeBase is null.