DescribeDeductionStatistic

更新时间:
复制 MD 格式

Retrieves resource deduction and usage statistics based on specified criteria.

Operation description

Request

  • This API supports GET and POST methods.

  • The periods parameter is a JSON array of PeriodParam objects, each containing the periodUnit and baseTime fields.

  • The resourceTypes parameter is a JSON array of resource type strings.

  • The startTime and endTime parameters are timestamps that define the query's time range.

  • The nextToken, maxResults, pageNo, and pageSize parameters control pagination and the number of results to return.

  • The API throws a SalesClientException if the resourceTypes parameter contains an invalid value or if the periods parameter fails JSON parsing.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 PeriodParam objects.

object

No

PeriodUnit

string

No

The period unit. For valid values, see the PeriodUnit enumeration.

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 ResourceTypes overrides the individual Service and ResourceType request parameters.

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.