Resource: DeviceSession
Protobuf message describing the device message, used from several RPCs.
| JSON representation | 
|---|
{ "name": string, "displayName": string, "state": enum (  | 
              
| Fields | |
|---|---|
name | 
                
                   
 Optional. Name of the DeviceSession, e.g. "projects/{projectId}/deviceSessions/{session_id}"  | 
              
displayName | 
                
                   
 Output only. The title of the DeviceSession to be presented in the UI.  | 
              
state | 
                
                   
 Output only. Current state of the DeviceSession.  | 
              
stateHistories[] | 
                
                   
 Output only. The historical state transitions of the sessionState message including the current session state.  | 
              
inactivityTimeout | 
                
                   
 Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. A duration in seconds with up to nine fractional digits, ending with '  | 
              
createTime | 
                
                   
 Output only. The time that the Session was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
activeStartTime | 
                
                   
 Output only. The timestamp that the session first became ACTIVE. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
androidDevice | 
                
                   
 Required. The requested device  | 
              
Union field  
  | 
              |
ttl | 
                
                   
 Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the deviceSessions.patch RPC. Default: 15 minutes. A duration in seconds with up to nine fractional digits, ending with '  | 
              
expireTime | 
                
                   
 Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
SessionState
The state that the device session resides.
| Enums | |
|---|---|
SESSION_STATE_UNSPECIFIED | 
                Default value. This value is unused. | 
REQUESTED | 
                Initial state of a session request. The session is being validated for correctness and a device is not yet requested. | 
PENDING | 
                The session has been validated and is in the queue for a device. | 
ACTIVE | 
                The session has been granted and the device is accepting connections. | 
EXPIRED | 
                The session duration exceeded the device’s reservation time period and timed out automatically. | 
FINISHED | 
                The user is finished with the session and it was canceled by the user while the request was still getting allocated or after allocation and during device usage period. | 
UNAVAILABLE | 
                Unable to complete the session because the device was unavailable and it failed to allocate through the scheduler. For example, a device not in the catalog was requested or the request expired in the allocation queue. | 
ERROR | 
                Unable to complete the session for an internal reason, such as an infrastructure failure. | 
SessionStateEvent
A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
| JSON representation | 
|---|
{
  "sessionState": enum ( | 
              
| Fields | |
|---|---|
sessionState | 
                
                   
 Output only. The sessionState tracked by this event  | 
              
eventTime | 
                
                   
 Output only. The time that the sessionState first encountered that state. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
stateMessage | 
                
                   
 Output only. A human-readable message to explain the state.  | 
              
Methods | 
            |
|---|---|
                
 | 
              POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. | 
                
 | 
              POST /v1/projects/{project_id}/deviceSessions | 
                
 | 
              GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. | 
                
 | 
              GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user. | 
                
 | 
              PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask. |