All Products
Search
Document Center

Expenses and Costs:QueryDPUtilizationDetail

Last Updated:Oct 10, 2026

Queries the usage of resource plans, including reserved instances (RIs) and storage capacity units (SCUs).

Operation description

Limits:

  • Only usage records from the past year are supported.

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

bss:FrDeductLogQueryRequest

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

The instance ID for the filtered query. If this parameter is left empty, the details of all used instances are returned.

oss-123123

InstanceSpec

string

No

The instance type.

Instancetyp

CommodityCode

string

No

The commodity code, such as ecsRi and scu_bag. If this parameter is specified, the ProdCode parameter does not take effect.

ecsRi

DeductedInstanceId

string

No

The ID of the deducted instance. If this parameter is left empty, the details of all instances are returned.

oss-123123

StartTime

string

Yes

The start time. Format: YYYY-MM-dd HH:mm:ss.

2019-05-23 12:00:00

EndTime

string

Yes

The end time. Format: YYYY-MM-dd HH:mm:ss.

2019-05-23 12:00:00

LastToken

string

No

The token that specifies the start position of the query. Set this parameter to null for the first query. For subsequent queries, use the NextToken value returned in the previous response.

CAESF***zNTAw

Limit

integer

No

The number of entries to return per query. Default value: 20. Maximum value: 300.

20

IncludeShare

boolean

Yes

Specifies whether to include the resource plan usage of member accounts in finance trusteeship. Valid values:

  • true: Included.

  • false: Not included.

true

ProdCode

string

No

The product code, such as ecs.

oss

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Message

string

The error message.

Successful!

RequestId

string

The request ID.

DF58589C-A06C-4224-8615-7797E6474FA3

Success

boolean

Indicates whether the request is successful.

true

Data

object

The returned data.

NextToken

string

The token that specifies the start position of the next query. Pass this value to the LastToken parameter in the next request. If this parameter is returned as null, the query is complete.

CAESF***zNTAw

DetailList

object

DetailList

array<object>

The list of details.

object

DeductedInstanceId

string

The instance ID of the deducted instance.

oss-123123

InstanceId

string

The instance ID of the reserved instance.

oss-123123

DeductHours

number

The deduction coefficient. This parameter is valid only when the CommodityCode parameter is set to ecsRi.

24

ShareUid

integer

The UID of the account to which the deducted instance belongs.

  • Shared deduction: the UID of the account to which the deducted instance belongs.

  • Non-shared deduction: the same as the Uid field.

1111111111

DeductDate

string

The deduction date. Example format: YYYY/M/D HH:mm.

2019/5/23 12:00

InstanceSpec

string

The instance type of the deducted instance.

rds.mysql.s3.large

DeductedCommodityCode

string

The commodity code of the deducted item.

rds

DeductedProductDetail

string

The name of the deducted product.

ApsaraDB RDS

DeductMeasure

number

The original metered amount. This indicates the actual amount of resources used by the user within a specific period, without any rule-based adjustments.

1

Region

string

The region in the metering data. This parameter can be empty.

cn-hangzhou

DeductQuantity

number

The actual deducted computing power or capacity of the corresponding pay-as-you-go instance.

Note

The actual deducted amount (DeductQuantity) is calculated based on the original metered amount (DeductMeasure) and specific deduction rules.

1

DeductFactorTotal

number

The total computing power or capacity of the RI or SCU during the specified time period.

1

ResCode

string

The billing item.

PutRequest

Uid

integer

The UID of the deducted instance.

1111111111

Examples

Success response

JSON format

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "DF58589C-A06C-4224-8615-7797E6474FA3",
  "Success": true,
  "Data": {
    "NextToken": "CAESF***zNTAw",
    "DetailList": {
      "DetailList": [
        {
          "DeductedInstanceId": "oss-123123",
          "InstanceId": "oss-123123",
          "DeductHours": 24,
          "ShareUid": 1111111111,
          "DeductDate": "2019/5/23 12:00",
          "InstanceSpec": "rds.mysql.s3.large",
          "DeductedCommodityCode": "rds",
          "DeductedProductDetail": "云数据库RDS",
          "DeductMeasure": 1,
          "Region": "cn-hangzhou ",
          "DeductQuantity": 1,
          "DeductFactorTotal": 1,
          "ResCode": "PutRequest",
          "Uid": 1111111111
        }
      ]
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InternalError An error occurred in the internal server.
400 InvalidOwner The specified owner does not belong to caller.
400 InvalidParameter The specified request contains invalid parameters.
400 MissingParameter The specified request lacks essential parameters.
400 NotApplicable The specified API is not applicable for the user.
400 NotAuthorized The user is not authorized for the specified API.
400 InvalidInstanceSpec The specified Instance specification is not valid.
400 InvalidQueryTime The specified start time and end time are incorrect
400 CommodityNotSupported The specified commodity is not supported.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.