AgentAdministrationClient.StopSession Method

Definition

Stops a session. Returns 204 No Content when the stop succeeds.

public virtual System.ClientModel.ClientResult StopSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default);
abstract member StopSession : string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
override this.StopSession : string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult
Public Overridable Function StopSession (agentName As String, sessionId As String, Optional cancellationToken As CancellationToken = Nothing) As ClientResult

Parameters

agentName
String

The name of the agent.

sessionId
String

The session identifier.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

agentName or sessionId is null.

agentName or sessionId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to