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