Retrieves resource deduction and usage statistics based on specified conditions.
Operation description
Request description
This operation supports GET and POST methods.
The
periodsparameter is in JSON array format. Each element is aPeriodParamobject that contains theperiodUnitandbaseTimefields.The
resourceTypesparameter is in JSON array format and contains multiple resource type strings.The
startTimeandendTimeparameters are in timestamp format and specify the time range for the query.Pagination parameters include
nextToken,maxResults,pageNo, andpageSize, which control the number and pagination of returned results.When the
resourceTypesparameter contains invalid values or theperiodsparameter fails JSON parsing, aSalesClientExceptionexception is thrown.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:DescribeDeductionStatistic |
list |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Periods |
array<object> |
No |
The list of time periods in JSON array format. Each element is a |
|
|
object |
No |
|||
| PeriodUnit |
string |
No |
The time period unit. For more information, see the |
Year |
| BaseTime |
string |
No |
The base time. |
2024-01-01 |
| ResourceTypes |
array |
No |
The list of resource types in JSON array format. |
|
|
string |
No |
The list of resource types. A maximum of 50 groups are supported. Note
If you set |
Desktop |
|
| StartTime |
integer |
No |
The start time (timestamp). |
2026-03-20T16:00:00Z |
| EndTime |
integer |
No |
The end time (timestamp). |
2025-06-06T02:14:00Z |
| InstanceIds |
array |
No |
The list of instance IDs (JSON array). |
|
|
string |
No |
The instance ID. |
ak-7yz7llzomgh2g64gc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
A1B2C3D4-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Data |
object |
The deduction data. |
|
| Deductions |
array<object> |
The deduction details. |
|
|
object |
The deduction details. |
||
| 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 list. |
|
|
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 list of available core-hour package resources. |
|
|
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.