Queries the usage information of a disk within a specified period, such as read IOPS, write IOPS, read bandwidth (B/s), write bandwidth (B/s), read latency (μs), and write latency (μs).
Operation description
When you call this operation, take note of the following limits:
-
You can query only the usage information of disks that are in the In Use (
In_use) state. For more information, see Disk states.NoteIf the returned information has missing content, the disk was not in the In Use (
In_use) state during that period, and the usage information cannot be obtained. -
A maximum of 400 data entries can be returned at a time. The value of
(EndTime – StartTime) / Periodmust be less than or equal to 400. That is, the value of theTotalCountresponse parameter cannot exceed 400. Otherwise, theInvalidParameter.TooManyDataQueriederror is returned. -
You can query the monitoring information of up to the last 30 days. The specified
StartTimeparameter cannot be more than 30 days earlier than the current time.
Request example
Assume that you want to query the usage information of a disk whose ID is d-bp14emm68wx98vjk**** in the China (Hangzhou) region from 2025-02-17T00:00:00Z to 2025-02-18T10:00:00Z at intervals of 600 seconds. Configure the request parameters as follows:
RegionId:"cn-hangzhou", // Set the China (Hangzhou) region
DiskId:"d-bp14emm68wx98vjk****", // Set the disk ID
StartTime:"2025-02-15T00:00:00Z", // Set the query start time
EndTime:"2025-02-17T00:00:00Z", // Set the query end time
Period:"600", // Set the data granularity
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeDiskMonitorData |
get |
*Disk
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DiskId |
string |
Yes |
The ID of the disk to query. |
d-bp1bq5g3dxxo1x4o**** |
| StartTime |
string |
Yes |
The start time of the data. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. If the value of seconds (ss) is not 00, the start time is automatically set to the beginning of the next minute. Note
You can query the monitoring information of up to the last 30 days. The |
2014-07-23T12:07:00Z |
| EndTime |
string |
Yes |
The end time of the data. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. If the value of seconds (ss) is not 00, the end time is automatically set to the beginning of the next minute. |
2014-07-23T12:09:00Z |
| Period |
integer |
No |
The granularity of the data. Unit: seconds. Valid values: Default value: 60. Note
The value of (EndTime – StartTime) / Period must be less than or equal to 400. A maximum of 400 data entries can be returned at a time. |
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The number of entries returned for disk usage information, which is the number of periods. |
3 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| MonitorData |
object |
||
| DiskMonitorData |
array<object> |
The collection of disk monitoring data. |
|
|
object |
The collection of disk monitoring data. |
||
| BPSRead |
integer |
The read bandwidth of the disk. Unit: byte/s. |
0 |
| IOPSRead |
integer |
The number of read I/O operations per second on the disk. |
0 |
| LatencyRead |
integer |
The read latency of the disk. Unit: microseconds. |
0 |
| BPSTotal |
integer |
The total read and write bandwidth of the disk. Unit: byte/s. |
204 |
| IOPSTotal |
integer |
The total number of read and write I/O operations per second on the disk. |
0 |
| TimeStamp |
string |
The timestamp of the monitoring data. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2014-07-23T12:07:00Z |
| LatencyWrite |
integer |
The write latency of the disk. Unit: microseconds. |
0 |
| IOPSWrite |
integer |
The number of write I/O operations per second on the disk. |
0 |
| DiskId |
string |
The ID of the disk. |
d-bp1bq5g3dxxo1x4o**** |
| BPSWrite |
integer |
The write bandwidth of the disk. Unit: byte/s. |
204 |
Examples
Success response
JSON format
{
"TotalCount": 3,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"MonitorData": {
"DiskMonitorData": [
{
"BPSRead": 0,
"IOPSRead": 0,
"LatencyRead": 0,
"BPSTotal": 204,
"IOPSTotal": 0,
"TimeStamp": "2014-07-23T12:07:00Z",
"LatencyWrite": 0,
"IOPSWrite": 0,
"DiskId": "d-bp1bq5g3dxxo1x4o****",
"BPSWrite": 204
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | The specified StartTime parameter does not conform to the specification. |
| 400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | The specified EndTime parameter is invalid. |
| 400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | |
| 400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | |
| 400 | InvalidParameter.TooManyDataQueried | Too many data queried. | |
| 400 | Throttling | Request was denied due to request throttling. | |
| 400 | InvalidInstanceType.NotSupportCredit | The InstanceType of the specified instance does not support credit. | The instance type does not support burstable instances. |
| 400 | InvalidParameter.EndTime | The specified parameter EndTime is earlier than StartTime. | The end time cannot be earlier than the start time. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 404 | InvalidDiskId.NotFound | The DiskId provided does not exist in our records. | The specified disk does not exist. Check whether the disk ID is correct. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.