All Products
Search
Document Center

Expenses and Costs:QueryDPUtilizationDetail

Last Updated:Oct 23, 2026

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

Operation description

Limits:

  • Only usage records for the last 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 or 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 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 linked 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

Data

object

The returned data.

DetailList

object

DetailList

array<object>

The detail array.

object

DeductDate

string

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

2019/5/23 12:00

DeductFactorTotal

number

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

1

DeductHours

number

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

24

DeductMeasure

number

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

1

DeductQuantity

number

The actual computing power or capacity deducted for 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

DeductedCommodityCode

string

The deducted commodity code.

rds

DeductedInstanceId

string

The instance ID of the deducted instance.

oss-123123

DeductedProductDetail

string

The name of the deducted commodity (product detail).

ApsaraDB RDS

InstanceId

string

The instance ID of the reserved instance.

oss-123123

InstanceSpec

string

The instance type of the deducted instance.

rds.mysql.s3.large

Region

string

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

cn-hangzhou

ResCode

string

The billable item.

PutRequest

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

Uid

integer

The UID of the deducted instance.

1111111111

NextToken

string

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

CAESF***zNTAw

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

Examples

Success response

JSON format

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

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.