Queries the usage information of a disk within a specified time 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 only query the usage information of disks that are in the
In_usestate. For more information, see Basic disk status table.NoteIf the returned information is incomplete, it is because the usage information for that time period cannot be obtained, which means the disk was not in the
In_usestate. -
A maximum of 400 data entries can be returned at a time. The condition
(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 monitoring information for up to the last 30 days. That is, the specified
StartTimeparameter cannot be more than 30 days before the current time.
Request example
Suppose you want to query the usage information of a disk with the ID d-bp14emm68wx98vjk**** in the China (Hangzhou) region from 2025-02-17T00:00:00Z to 2025-02-18T10:00:00Z at an interval of 600 seconds. The request parameters are configured as follows:
RegionId:"cn-hangzhou", // Set the region to China (Hangzhou).
DiskId:"d-bp14emm68wx98vjk****", // Set the disk ID.
StartTime:"2025-02-15T00:00:00Z", // Set the start time of the query.
EndTime:"2025-02-17T00:00:00Z", // Set the end time of the query.
Period:"600", // Set the data precision.
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. |
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 seconds (ss) are not 00, the time is automatically rounded up to the next minute. Note
You can query monitoring information for up to the last 30 days. That is, 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 seconds (ss) are not 00, the time is automatically rounded up to the next minute. |
2014-07-23T12:09:00Z |
| Period |
integer |
No |
The precision 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. That is, a maximum of 400 periods of data can be returned at a time. Valid values:
|
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The number of returned entries for the 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 monitoring data for the disk. |
|
|
object |
The collection of monitoring data for the disk. |
||
| BPSRead |
integer |
The read bandwidth of the disk. Unit: Byte/s. |
0 |
| IOPSRead |
integer |
The number of read I/O operations on the disk. Unit: operations/s. |
0 |
| LatencyRead |
integer |
The read latency of the disk. Unit: μs. |
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 on the disk. Unit: operations/s. |
0 |
| TimeStamp |
string |
The timestamp of the queried monitoring information. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
2014-07-23T12:07:00Z |
| LatencyWrite |
integer |
The write latency of the disk. Unit: μs. |
0 |
| IOPSWrite |
integer |
The number of write I/O operations on the disk. Unit: operations/s. |
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. | The monitoring data point is out of range. |
| 400 | Throttling | Request was denied due to request throttling. | The request is throttled. |
| 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 an internal error and you may retry later or contact support with the request ID. | |
| 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.