AgentAdministrationClient.DisableAgent 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 |
|---|---|
| DisableAgent(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. |
| DisableAgent(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.
|
DisableAgent(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.ClientModel.ClientResult DisableAgent(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member DisableAgent : string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
override this.DisableAgent : string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
Public Overridable Function DisableAgent (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As 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.
Applies to
DisableAgent(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.ClientModel.ClientResult DisableAgent(string agentName, System.ClientModel.Primitives.RequestOptions options);
abstract member DisableAgent : string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
override this.DisableAgent : string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
Public Overridable Function DisableAgent (agentName As String, options As RequestOptions) As 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.