Share via


SearchIndexClient.DeleteKnowledgeAgent Method

Definition

Overloads

DeleteKnowledgeAgent(String, CancellationToken)

Source:
SearchIndexClient.KnowledgeAgent.cs

Deletes an existing agent.

public virtual Azure.Response DeleteKnowledgeAgent(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteKnowledgeAgent : string * System.Threading.CancellationToken -> Azure.Response
override this.DeleteKnowledgeAgent : string * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteKnowledgeAgent (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

agentName
String

The name of the agent to delete.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

The Response from the server.

Exceptions

agentName is null.

Applies to

DeleteKnowledgeAgent(KnowledgeAgent, Boolean, CancellationToken)

Source:
SearchIndexClient.KnowledgeAgent.cs

Deletes an existing agent.

public virtual Azure.Response DeleteKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteKnowledgeAgent : Azure.Search.Documents.Indexes.Models.KnowledgeAgent * bool * System.Threading.CancellationToken -> Azure.Response
override this.DeleteKnowledgeAgent : Azure.Search.Documents.Indexes.Models.KnowledgeAgent * bool * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteKnowledgeAgent (knowledgeAgent As KnowledgeAgent, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

knowledgeAgent
KnowledgeAgent

The definition of the agent 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

The Response from the server.

Exceptions

knowledgeAgent is null.

Applies to