All Products
Search
Document Center

Elastic Desktop Service:DescribeDesktopSessions

Last Updated:Nov 14, 2025

Queries the detailed session information of a cloud computer.

Operation description

You can only query data within the last 30 days.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecd:DescribeDesktopSessionslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the regions supported by Elastic Desktop Service (EDS).

cn-hangzhou
OfficeSiteIdstringNo

The office network ID.

cn-hangzhou+dir-363353****
EndUserIdstringNo

The ID of the end user.

testUser
SessionStatusstringNo

The state of the session.

Valid values:

  • Connected
  • Disconnected
Connected
StartTimestringNo

The start of the time range to query.

2023-01-28T02:31:43Z
EndTimestringNo

The end of the time range to query.

2023-02-13T02:51:43Z
PageNumberintegerNo

The page number.

1
PageSizeintegerNo

The number of entries returned per page.

10
DesktopIdarrayNo

The IDs of the cloud computers. You can specify the IDs of 1 to 100 cloud computers.

stringNo

The ID of the cloud computer.

ecd-gx2x1dhsmucyy****
DesktopNamestringNo

The name of the cloud computer.

DemoComputer
SubPayTypestringNo

The billing method of cloud computers.

Valid values:

  • duration: hourly plan (available for users in the whitelist)
  • postPaid: pay-as-you-go
  • monthPackage: monthly subscription (the 120-hour/250-hour computing plan)
  • prePaid: monthly subscription (the Unlimited computing plan)
monthPackage
CheckOsSessionbooleanNo

Specifies whether to turn on the switch to check session status of cloud computers.

true
EndUserIdFilterstringNo

The user ID. This parameter functions the same as the EndUserId parameter. You only need to include one of them in your request.

alice

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of entries returned.

1
RequestIdstring

The request ID.

3EC4A6DB-EC8D-55B0-9038-543DE671****
Sessionsarray<object>

Details of sessions.

Sessionobject

Details of the session.

SessionStatusstring

The state of the session.

Valid values:

  • Connected
  • Disconnected
Connected
EndUserIdstring

The ID of the end user.

testUser
OfficeSiteIdstring

The ID of the office network.

cn-hangzhou+dir-8904****
ClientIpstring

The IP address of the client.

172.21.XX.XX
ClientOSstring

The client OS.

windows_\"Windows10Enterprise\"10.0(Build22000)
DesktopIdstring

The ID of the cloud computer.

ecd-g6t1ukbaea****
DesktopNamestring

The name of the cloud computer.

testDesktop
OfficeSiteNamestring

The name of the office network.

DemoOfficeSite
ClientVersionstring

The client version.

2.0.0-R-20221030.08****
ProtocolTypestring

The protocol type.

Valid values:

  • HDX
  • ASP
ASP
LatestConnectionTimelong

The duration of the last connection to the cloud computer. Unit: seconds.

120
TotalConnectionTimelong

The total connection duration. Unit: seconds.

240
SessionStartTimestring

The start time of the session.

2023-01-28T02:31:43Z
SessionEndTimestring

The end time of the session.

2023-01-28T02:31:43Z
SessionIdleTimelong

The idle duration of the session. Unit: seconds.

120
OsTypestring

The OS.

Valid values:

  • Linux
  • Windows
Windows
EndUserApplyCoordinateTimelong

The duration of the remote assistance. Unit: seconds.

120
SubPayTypestring

The billing method of cloud computers.

Valid values:

  • duration: hourly plan (available for users in the whitelist)
  • postPaid: pay-as-you-go
  • monthPackage: monthly subscription (120-hour computing plan and 250-hour computing plan)
  • prePaid: monthly subscription (Unlimited computing plan)
monthPackage
OsSessionStatusstring

Indicates whether the switch to check session status of cloud computers is turned on.

true

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1,
  "RequestId": "3EC4A6DB-EC8D-55B0-9038-543DE671****",
  "Sessions": [
    {
      "SessionStatus": "Connected",
      "EndUserId": "testUser",
      "OfficeSiteId": "cn-hangzhou+dir-8904****",
      "ClientIp": "172.21.XX.XX",
      "ClientOS": "windows_\\\"Windows10Enterprise\\\"10.0(Build22000)",
      "DesktopId": "ecd-g6t1ukbaea****",
      "DesktopName": "testDesktop",
      "OfficeSiteName": "DemoOfficeSite",
      "ClientVersion": "2.0.0-R-20221030.08****",
      "ProtocolType": "ASP",
      "LatestConnectionTime": 120,
      "TotalConnectionTime": 240,
      "SessionStartTime": "2023-01-28T02:31:43Z\n",
      "SessionEndTime": "2023-01-28T02:31:43Z",
      "SessionIdleTime": 120,
      "OsType": "Windows",
      "EndUserApplyCoordinateTime": 120,
      "SubPayType": "monthPackage",
      "OsSessionStatus": true
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-10-17The response structure of the API has changedView Change Details
2024-12-09The request parameters of the API has changedView Change Details
2024-07-08The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-07-01The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-04-15The request parameters of the API has changedView Change Details