Retrieves resource deduction and usage statistics based on specified criteria.
Operation description
Request
This API supports GET and POST methods.
The
periodsparameter is a JSON array ofPeriodParamobjects, each containing theperiodUnitandbaseTimefields.The
resourceTypesparameter is a JSON array of resource type strings.The
startTimeandendTimeparameters are timestamps that define the query's time range.The
nextToken,maxResults,pageNo, andpageSizeparameters control pagination and the number of results to return.The API throws a
SalesClientExceptionif theresourceTypesparameter contains an invalid value or if theperiodsparameter fails JSON parsing.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Periods |
array<object> |
No |
The list of periods, formatted as a JSON array of |
|
|
object |
No |
|||
| PeriodUnit |
string |
No |
The period unit. For valid values, see the |
Year |
| BaseTime |
string |
No |
The base time. |
2024-01-01 |
| ResourceTypes |
array |
No |
The list of resource types, specified as a JSON array. |
|
|
string |
No |
The list of resource types. You can specify a maximum of 50 resource types. Note
Setting |
Desktop |
|
| StartTime |
integer |
No |
The start time, specified as a Unix timestamp. |
2026-03-20T16:00:00Z |
| EndTime |
integer |
No |
The end time, specified as a Unix timestamp. |
2025-06-06T02:14:00Z |
| InstanceIds |
array |
No |
The list of instance IDs, specified as a JSON array. |
|
|
string |
No |
An instance ID. |
ak-7yz7llzomgh2g64gc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The request ID. |
A1B2C3D4-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Data |
object |
The deduction data. |
|
| Deductions |
array<object> |
The deduction details. |
|
|
object |
Details of a single deduction. |
||
| DeductionDate |
string |
The deduction date. |
2024-01-01 |
| ConsumeSecond |
integer |
The consumption duration in seconds. |
7000 |
| ResourceType |
string |
The resource type. |
CloudDesktop |
| Usages |
array<object> |
The usage details. |
|
|
object |
|||
| Period |
string |
The time period. |
2024-01-01 |
| ConsumeSecond |
integer |
The consumption duration in seconds. |
6000 |
| ResourceType |
string |
The resource type. |
CloudDesktop |
| AvailableCorePackages |
array<object> |
The available core-hour packages. |
|
|
object |
|||
| GroupId |
string |
The group ID. |
g-xxxxx |
| AliUid |
integer |
The Alibaba Cloud account ID. |
1568857911493620 |
| GroupResourceType |
string |
The group resource type. |
CoreHour |
| UsedTime |
integer |
The used duration. |
40000 |
| TotalTime |
integer |
The total duration. |
1000000 |
| ResourceType |
string |
The group resource type. |
CoreHour |
| StartTime |
string |
The start time. |
2024-01-01 00:00:00 |
| EndTime |
string |
The end time. |
2024-12-31 23:59:59 |
| Status |
string |
The status. |
Active |
| ExpiredTime |
string |
The expiration time. |
2024-12-31 23:59:59 |
| CreateTime |
string |
The creation time. |
2024-01-01 00:00:00 |
| NoLx |
boolean |
Indicates whether the resource is a No-Lx resource. |
|
| NoLxSource |
string |
The source of the No-Lx resource. |
无凌霄来源示例值 |
| ResourceId |
string |
The resource ID. |
res-xxxxx |
Examples
Success response
JSON format
{
"RequestId": "A1B2C3D4-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Data": {
"Deductions": [
{
"DeductionDate": "2024-01-01",
"ConsumeSecond": 7000,
"ResourceType": "CloudDesktop"
}
],
"Usages": [
{
"Period": "2024-01-01",
"ConsumeSecond": 6000,
"ResourceType": "CloudDesktop"
}
],
"AvailableCorePackages": [
{
"GroupId": "g-xxxxx",
"AliUid": 1568857911493620,
"GroupResourceType": "CoreHour",
"UsedTime": 40000,
"TotalTime": 1000000,
"ResourceType": "CoreHour",
"StartTime": "2024-01-01 00:00:00",
"EndTime": "2024-12-31 23:59:59",
"Status": "Active",
"ExpiredTime": "2024-12-31 23:59:59",
"CreateTime": "2024-01-01 00:00:00",
"NoLx": false,
"NoLxSource": "无凌霄来源示例值",
"ResourceId": "res-xxxxx"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.