AgentAdministrationClient.DisableAgentAsync 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 |
|---|---|
| DisableAgentAsync(String, RequestOptions) |
[Protocol Method] Disables the specified agent, preventing it from accepting new sessions or processing requests. Existing active sessions are allowed to drain gracefully but no new sessions can be created. This operation is idempotent — disabling an already-disabled agent returns success with no side effects.
|
| DisableAgentAsync(String, CancellationToken) |
Disables the specified agent, preventing it from accepting new sessions or processing requests. Existing active sessions are allowed to drain gracefully but no new sessions can be created. This operation is idempotent — disabling an already-disabled agent returns success with no side effects. |
DisableAgentAsync(String, RequestOptions)
- Source:
- AgentAdministrationClient.cs
[Protocol Method] Disables the specified agent, preventing it from accepting new sessions or processing requests. Existing active sessions are allowed to drain gracefully but no new sessions can be created. This operation is idempotent — disabling an already-disabled agent returns success with no side effects.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DisableAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options);
abstract member DisableAgentAsync : string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DisableAgentAsync : string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DisableAgentAsync (agentName As String, options As RequestOptions) As Task(Of ClientResult)
Parameters
- agentName
- String
The name of the agent to disable.
- options
- RequestOptions
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
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
DisableAgentAsync(String, CancellationToken)
- Source:
- AgentAdministrationClient.cs
Disables the specified agent, preventing it from accepting new sessions or processing requests. Existing active sessions are allowed to drain gracefully but no new sessions can be created. This operation is idempotent — disabling an already-disabled agent returns success with no side effects.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DisableAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member DisableAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DisableAgentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DisableAgentAsync (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult)
Parameters
- agentName
- String
The name of the agent to disable.
- 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.