Queries and ranks historical usage duration by end user or desktop.
Operation description
Usage notes
Date range: You can query data within the last 90 days.
Pagination: This operation uses the
NextTokenparameter for pagination. To retrieve the next page of results, use theNextTokenvalue from the previous response.Default and maximum limits: This operation returns 5 records by default, with a maximum of 200 records per page.
Authentication: This operation uses an AccessKey for authentication.
Caller account information: You do not need to specify an Alibaba Cloud account ID (AliUid). The system automatically resolves it.
Billing: This API operation is free of charge.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| StartDate |
string |
No |
The start date of the query in |
2026-05-07 |
| EndDate |
string |
No |
The end date of the query in |
2026-04-19 |
| Limit |
integer |
No |
The number of entries to return. The default value is 5, and the maximum value is 200. |
8 |
| NextToken |
string |
No |
The token that is used to retrieve the next page of results. You can obtain this token from the response to the previous request. |
caeba0bbb2be03f84eb48b699f0a4883 |
| BizType |
integer |
No |
The business type. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique ID of the request. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| TotalCount |
integer |
The total number of matching entries. |
94 |
| NextToken |
string |
The token used to retrieve the next page of results. If this parameter is not returned, there are no more results. |
AAAAAWvmfbFWy0uSlxZ6pIAKAnuwt1ezsRqxI6hPibm27fMH |
| UsageDurationList |
array<object> |
A list of usage duration metrics. |
|
|
object |
The usage duration metric object. |
||
| EndUserId |
string |
The end user ID. |
endUserId |
| DesktopId |
string |
The ID of the cloud desktop. |
ecd-8cndajrdrd424sb99 |
| DesktopName |
string |
The name of the cloud desktop. |
TestName |
| ChargeType |
string |
The charge type. Valid values: |
PrePaid |
| UsageDuration |
integer |
The usage duration, in seconds. Note: This is a |
20000 |
| RegionId |
string |
The region ID. |
cn-shanghai |
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"TotalCount": 94,
"NextToken": "AAAAAWvmfbFWy0uSlxZ6pIAKAnuwt1ezsRqxI6hPibm27fMH",
"UsageDurationList": [
{
"EndUserId": "endUserId",
"DesktopId": "ecd-8cndajrdrd424sb99",
"DesktopName": "TestName",
"ChargeType": "PrePaid",
"UsageDuration": 20000,
"RegionId": "cn-shanghai"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.