Freigeben über


AIProjectAgentsOperations.DeleteAgentAsync(String, CancellationToken) Method

Definition

Deletes an agent.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DeleteAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DeleteAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DeleteAgentAsync (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult)

Parameters

agentName
String

The name of the agent to delete.

cancellationToken
CancellationToken

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

Returns

Exceptions

agentName is null.

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

Service returned a non-success status code.

Applies to