AgentAdministrationClient.GetSession 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.
Retrieves a session by ID.
public virtual System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectAgentSession> GetSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSession : string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectAgentSession>
override this.GetSession : string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectAgentSession>
Public Overridable Function GetSession (agentName As String, sessionId As String, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of ProjectAgentSession)
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.