AgentAdministrationClient.EnableAgent 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 |
|---|---|
| EnableAgent(String, RequestOptions) |
[Protocol Method] Enables the specified agent, allowing it to accept new sessions and process requests. This operation is idempotent — enabling an already-enabled agent returns success with no side effects.
|
| EnableAgent(String, CancellationToken) |
Enables the specified agent, allowing it to accept new sessions and process requests. This operation is idempotent — enabling an already-enabled agent returns success with no side effects. |
EnableAgent(String, RequestOptions)
- Source:
- AgentAdministrationClient.cs
[Protocol Method] Enables the specified agent, allowing it to accept new sessions and process requests. This operation is idempotent — enabling an already-enabled 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 EnableAgent(string agentName, System.ClientModel.Primitives.RequestOptions options);
abstract member EnableAgent : string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
override this.EnableAgent : string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
Public Overridable Function EnableAgent (agentName As String, options As RequestOptions) As ClientResult
Parameters
- agentName
- String
The name of the agent to enable.
- 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
EnableAgent(String, CancellationToken)
- Source:
- AgentAdministrationClient.cs
Enables the specified agent, allowing it to accept new sessions and process requests. This operation is idempotent — enabling an already-enabled agent returns success with no side effects.
public virtual System.ClientModel.ClientResult EnableAgent(string agentName, System.Threading.CancellationToken cancellationToken = default);
abstract member EnableAgent : string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
override this.EnableAgent : string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
Public Overridable Function EnableAgent (agentName As String, Optional cancellationToken As CancellationToken = Nothing) As ClientResult
Parameters
- agentName
- String
The name of the agent to enable.
- 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.