ProjectsAgentsModelFactory.ProjectAgentSession 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.
An agent session providing a long-lived compute sandbox for hosted agent invocations.
public static Azure.AI.Projects.Agents.ProjectAgentSession ProjectAgentSession(string agentSessionId = default, Azure.AI.Projects.Agents.VersionIndicator versionIndicator = default, Azure.AI.Projects.Agents.AgentSessionStatus status = default, DateTimeOffset createdOn = default, DateTimeOffset lastAccessedOn = default, DateTimeOffset expiresOn = default, DateTimeOffset? stoppedOn = default);
static member ProjectAgentSession : string * Azure.AI.Projects.Agents.VersionIndicator * Azure.AI.Projects.Agents.AgentSessionStatus * DateTimeOffset * DateTimeOffset * DateTimeOffset * Nullable<DateTimeOffset> -> Azure.AI.Projects.Agents.ProjectAgentSession
Public Shared Function ProjectAgentSession (Optional agentSessionId As String = Nothing, Optional versionIndicator As VersionIndicator = Nothing, Optional status As AgentSessionStatus = Nothing, Optional createdOn As DateTimeOffset = Nothing, Optional lastAccessedOn As DateTimeOffset = Nothing, Optional expiresOn As DateTimeOffset = Nothing, Optional stoppedOn As Nullable(Of DateTimeOffset) = Nothing) As ProjectAgentSession
Parameters
- agentSessionId
- String
The session identifier.
- versionIndicator
- VersionIndicator
The version indicator determining which agent version backs this session.
- status
- AgentSessionStatus
The current status of the session.
- createdOn
- DateTimeOffset
The Unix timestamp (in seconds) when the session was created.
- lastAccessedOn
- DateTimeOffset
The Unix timestamp (in seconds) when the session was last accessed.
- expiresOn
- DateTimeOffset
The Unix timestamp (in seconds) when the session expires (rolling, 30 days from last activity).
- stoppedOn
- Nullable<DateTimeOffset>
The Unix timestamp (in seconds) when the session sandbox was last observed to stop or go idle. Present only after the session has gone idle at least once, used for accurate idle-billing reconciliation.
Returns
A new ProjectAgentSession instance for mocking.