Share via


SearchIndexClient.DeleteKnowledgeAgentAsync Method

Definition

Overloads

DeleteKnowledgeAgentAsync(String, CancellationToken)

Source:
SearchIndexClient.Aliases.cs
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteKnowledgeAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteKnowledgeAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteKnowledgeAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteKnowledgeAgentAsync (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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

DeleteKnowledgeAgentAsync(KnowledgeAgent, Boolean, CancellationToken)

Source:
SearchIndexClient.Aliases.cs

Deletes an existing agent.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteKnowledgeAgentAsync : Azure.Search.Documents.Indexes.Models.KnowledgeAgent * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteKnowledgeAgentAsync : Azure.Search.Documents.Indexes.Models.KnowledgeAgent * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteKnowledgeAgentAsync (knowledgeAgent As KnowledgeAgent, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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