All Products
Search
Document Center

Elastic Desktop Service:DescribeDeductionStatistic

Last Updated:Aug 05, 2026

Retrieves resource deduction and usage statistics based on specified conditions.

Operation description

Request description

  • This operation supports GET and POST methods.

  • The periods parameter is in JSON array format. Each element is a PeriodParam object that contains the periodUnit and baseTime fields.

  • The resourceTypes parameter is in JSON array format and contains multiple resource type strings.

  • The startTime and endTime parameters are in timestamp format and specify the time range for the query.

  • Pagination parameters include nextToken, maxResults, pageNo, and pageSize, which control the number and pagination of returned results.

  • When the resourceTypes parameter contains invalid values or the periods parameter fails JSON parsing, a SalesClientException exception is thrown.

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: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 PeriodParam object.

object

No

PeriodUnit

string

No

The time period unit. For more information, see the PeriodUnit enumeration.

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 ResourceTypes, the Service and ResourceType request parameters that are separately specified in Settings do not take effect.

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.