DescribeDesktopSessions

Updated at:

Queries the detailed session information of cloud computers.

Operation description

Currently, only data within the last 30 days is supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecd:DescribeDesktopSessions

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call the DescribeRegions operation to query the list of regions supported by Wuying Cloud Computer.

cn-hangzhou

OfficeSiteId

string

No

The office network ID.

cn-hangzhou+dir-363353****

EndUserId

string

No

The end user ID.

alice

SessionStatus

string

No

The session connection status.

Valid values:

  • Connected :

    Connected.

  • Disconnected :

    Disconnected.

Connected

StartTime

string

No

The start time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2023-01-28T02:31:43Z

EndTime

string

No

The end time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2023-02-13T02:51:43Z

PageNumber

integer

No

The page number of the current page in a paging query.

1

PageSize

integer

No

The maximum number of entries per page in a paging query.

10

DesktopId

array

No

The cloud computer ID. You can specify 1 to 100 IDs.

string

No

The cloud computer ID.

ecd-gx2x1dhsmucyy****"

DesktopName

string

No

The cloud computer name.

DemoComputer

SubPayType

string

No

The billing method of the cloud computer.

Valid values:

  • duration :

    Duration package [whitelist]

  • postPaid :

    Pay-as-you-go.

  • monthPackage :

    Monthly subscription (120 hours/250 hours)

  • prePaid :

    Monthly subscription (unlimited hours)

monthPackage

CheckOsSession

boolean

No

Specifies whether to check the session status in the cloud computer.

true

EndUserIdFilter

string

No

The end user ID. This parameter is the same as the EndUserId parameter. You only need to specify one of them.

alice

ResourceGroupId

string

No

The resource group ID.

rg-f3s3dgt8dtb0vlqc8

FillHardwareInfo

boolean

No

Specifies whether to include terminal information in the response.

Language

string

No

The language of the response.

zh-CN

EndUserIds

array

No

The list of end user IDs.

string

No

The end user ID.

alice

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

3EC4A6DB-EC8D-55B0-9038-543DE671****

Sessions

array<object>

The session details.

array<object>

The session details.

AccountType

string

The account type.

SIMPLE

ClientIp

string

The client IP address.

172.21.XX.XX

ClientOS

string

The client operating system.

windows_\"Windows10Enterprise\"10.0(Build22000)

ClientVersion

string

The client version.

2.0.0-R-20221030.08****

DesktopId

string

The cloud computer ID.

ecd-g6t1ukbaea****

DesktopName

string

The cloud computer name.

DemoComputer

DirectoryType

string

The office network type.

SIMPLE

EndUserApplyCoordinateTime

integer

The duration of remote assistance requested by the end user. Unit: seconds.

120

EndUserId

string

The end user ID.

alice

LastClientIp

string

The IP address of the last connected client.

10.0.0.0:8080

LatestConnectionTime

integer

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

120

OfficeSiteId

string

The office network ID.

cn-hangzhou+dir-8904****

OfficeSiteName

string

The office network name.

TestOfficeSite

OsSessionStatus

string

Specifies whether to check the session status in the cloud computer.

true

OsType

string

The operating system type.

Valid values:

  • Linux :

    Linux

  • Windows :

    Windows

Windows

ProtocolType

string

The protocol type.

Valid values:

  • HDX :

    HDX protocol.

  • ASP :

    Alibaba Cloud proprietary ASP protocol.

ASP

ResourceGroups

array<object>

The resource group information.

object

The resource group.

Id

string

The resource group ID.

rg-8whrmo2gtsb8bxxxx

Name

string

The resource group name.

RgTest

SessionEndTime

string

The end time of the session. The time is displayed in UTC and follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

2023-01-28T02:31:43Z

SessionIdleTime

integer

The idle duration of the session. Unit: seconds.

120

SessionStartTime

string

The start time of the session. The time is displayed in UTC and follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

2023-01-28T02:31:43Z

SessionStatus

string

The session connection status.

Valid values:

  • Connected :

    Connected.

  • Disconnected :

    Disconnected.

Connected

SubPayType

string

The billing method of the cloud computer.

Valid values:

  • duration :

    Duration package [whitelist]

  • postPaid :

    Pay-as-you-go.

  • monthPackage :

    Monthly subscription (120 hours/250 hours)

  • prePaid :

    Monthly subscription (unlimited hours)

monthPackage

TerminalInfo

object

The terminal device information.

Model

string

The terminal device information.

Mac

ProductName

string

The terminal device type.

Mac

SerialNumber

string

The serial number of the terminal device.

96c530bc-6095-4014-8bbc-d461b8ac****

Uuid

string

The UUID of the logon device.

EBFDC7773BEBAD418A9F89429652****

TotalConnectionTime

integer

The total connection duration. Unit: seconds.

240

TotalCount

integer

The total number of entries returned.

1

SessionIdleTime is returned only when the operating system of the cloud computer is Windows.

Examples

Success response

JSON format

{
  "RequestId": "3EC4A6DB-EC8D-55B0-9038-543DE671****",
  "Sessions": [
    {
      "AccountType": "SIMPLE",
      "ClientIp": "172.21.XX.XX",
      "ClientOS": "windows_\\\"Windows10Enterprise\\\"10.0(Build22000)",
      "ClientVersion": "2.0.0-R-20221030.08****",
      "DesktopId": "ecd-g6t1ukbaea****",
      "DesktopName": "DemoComputer",
      "DirectoryType": "SIMPLE",
      "EndUserApplyCoordinateTime": 120,
      "EndUserId": "alice",
      "LastClientIp": "10.0.0.0:8080",
      "LatestConnectionTime": 120,
      "OfficeSiteId": "cn-hangzhou+dir-8904****",
      "OfficeSiteName": "TestOfficeSite",
      "OsSessionStatus": "true",
      "OsType": "Windows",
      "ProtocolType": "ASP",
      "ResourceGroups": [
        {
          "Id": "rg-8whrmo2gtsb8bxxxx",
          "Name": "RgTest"
        }
      ],
      "SessionEndTime": "2023-01-28T02:31:43Z",
      "SessionIdleTime": 120,
      "SessionStartTime": "2023-01-28T02:31:43Z\n",
      "SessionStatus": "Connected",
      "SubPayType": "monthPackage",
      "TerminalInfo": {
        "Model": "Mac",
        "ProductName": "Mac",
        "SerialNumber": "96c530bc-6095-4014-8bbc-d461b8ac****",
        "Uuid": "EBFDC7773BEBAD418A9F89429652****"
      },
      "TotalConnectionTime": 240
    }
  ],
  "TotalCount": 1
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.