AgentAdministrationClient.DeleteAgentAsync 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.
Overloads
| Name | Description |
|---|---|
| DeleteAgentAsync(String, CancellationToken) |
Deletes an agent. |
| DeleteAgentAsync(String, Nullable<Boolean>, CancellationToken) |
Deletes an agent. |
DeleteAgentAsync(String, CancellationToken)
- Source:
- AgentAdministrationClient.cs
- Source:
- AgentAdministrationClient.cs
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
DeleteAgentAsync(String, Nullable<Boolean>, CancellationToken)
- Source:
- AgentAdministrationClient.cs
Deletes an agent.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DeleteAgentAsync(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteAgentAsync : string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DeleteAgentAsync : string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DeleteAgentAsync (agentName As String, force As Nullable(Of Boolean), Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult)
Parameters
- agentName
- String
The name of the agent to delete.
For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.
- 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.