AgentAdministrationClient.DeleteSessionAsync 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.
Deletes a session synchronously. Returns 204 No Content when the session is deleted or does not exist.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DeleteSessionAsync(string agentName, string sessionId, string userIsolationKey = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteSessionAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DeleteSessionAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DeleteSessionAsync (agentName As String, sessionId As String, Optional userIsolationKey As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult)
Parameters
- agentName
- String
The name of the agent.
- sessionId
- String
The session identifier.
- userIsolationKey
- String
Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.
- 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.