Queries the total usage data of reserved instances or storage capacity units (SCUs).
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
bssapi:DescribeResourceUsageTotal | Read |
|
| 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. | HOUR |
BillOwnerId | long | 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. | RI |
Response parameters
Examples
Sample success responses
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
For a list of error codes, visit the Service error codes.