All Products
Search
Document Center

Expenses and Costs:DescribeResourceUsageTotal

Last Updated:Jan 27, 2026

Queries the total usage data of reserved instances or storage capacity units (SCUs).

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

bssapi:DescribeResourceUsageTotal

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

StartPeriod

string

Yes

The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. The specified time is included in the time range.

2021-01-01 00:00:00

EndPeriod

string

No

The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format. The specified time is excluded from the time range. If you do not specify this parameter, this parameter is set to the current time.

2021-01-02 00:00:00

PeriodType

string

Yes

The time granularity at which the data is queried. Valid values: MONTH, DAY, and HOUR.

Valid values:

  • MONTH :

    MONTH

  • HOUR :

    HOUR

  • DAY :

    DAY

HOUR

BillOwnerId

integer

No

The ID of the account whose data you want to query. If you do not specify this parameter, the data of the current account and its linked accounts is queried. To query the data of a linked account, specify the ID of the linked account. You can specify only one account ID.

123745698925000

ResourceType

string

Yes

The type of the resource plan. Valid values: RI and SCU.

Valid values:

  • SCU :

    SCU

  • RI :

    RI

RI

Response elements

Element

Type

Description

Example

object

The response parameters.

Code

string

The response code.

Success

Message

string

The returned message. If the request was successful, a success message is returned. If the request failed, an error message is returned.

Successful!

RequestId

string

The request ID.

364C7C81-5E5E-51A0-B738-1969D2671B05

Success

boolean

Indicates whether the request was successful.

True

Data

object

The queried data.

PeriodCoverage

array<object>

The usage of resource plans in the specified period.

object

UsagePercentage

number

The usage of resource plans.

0.1

Period

string

The period.

2021071500

TotalUsage

object

The total usage of resource plans.

PostpaidCost

number

The total costs of pay-as-you-go instances.

200

SavedCost

number

The total savings.

100

UsagePercentage

number

The total usage of resource plans.

1

PotentialSavedCost

number

The total potential savings.

100

ReservationCost

number

The fee of purchased resource plans.

10

Examples

Success response

JSON format

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "364C7C81-5E5E-51A0-B738-1969D2671B05",
  "Success": true,
  "Data": {
    "PeriodCoverage": [
      {
        "UsagePercentage": 0.1,
        "Period": "2021071500"
      }
    ],
    "TotalUsage": {
      "PostpaidCost": 200,
      "SavedCost": 100,
      "UsagePercentage": 1,
      "PotentialSavedCost": 100,
      "ReservationCost": 10
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.