Queries the monitoring data of snapshot sizes in a region over the last 30 days.
Usage notes
Take note of the following items:
- Up to 400 entries of monitoring data can be returned at a time. If the result of the
(EndTime - StartTime)/Period
formula is greater than 400, an error is returned. - Only the monitoring data within the last 30 days can be queried. If the value of
StartTime
is more than 30 days earlier than the time when you call this operation, an error is returned.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | DescribeSnapshotMonitorData | The operation that you want to perform. Set the value to DescribeSnapshotMonitorData. |
RegionId | String | Yes | cn-hangzhou | The region ID. You can call the DescribeRegions operation to query the most recent region list. |
StartTime | String | Yes | 2019-05-10T00:00:00Z | The beginning of the time range to query. 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 time is rounded up to the next minute. |
EndTime | String | Yes | 2019-05-10T03:00:00Z | The end of the time range to query. 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 time is rounded up to the next minute. |
Period | Integer | No | 60 | The interval at which to query the monitoring data of snapshot sizes. Unit: seconds. Valid values:
Default value: 60. |
Category | String | No | Standard | The category of the snapshot. Valid values:
Default value: Standard. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 9F8163A8-F5DE-47A2-A572-4E062D223E09 | The ID of the request. |
MonitorData | Array of DataPoint | The monitoring data of snapshot sizes. |
|
DataPoint | |||
Size | Long | 243036848128 | The total size of snapshots. Unit: bytes. |
TimeStamp | String | 2019-05-10T04:00:00Z | The timestamp that corresponds to a snapshot size. |
Examples
Sample requests
https://ecs.aliyuncs.com/?&Action=DescribeSnapshotMonitorData
&RegionId=cn-hangzhou
&StartTime=2019-05-10T00:00:00Z
&EndTime=2019-05-10T03:00:00Z
&Period=60
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeSnapshotMonitorDataResponse>
<MonitorData>
<DataPoint>
<element>
<Size>243036848128</Size>
<TimeStamp>2019-05-10T01:00:00Z</TimeStamp>
</element>
<element>
<Size>243036848128</Size>
<TimeStamp>2019-05-10T02:00:00Z</TimeStamp>
</element>
<element>
<Size>243036848128</Size>
<TimeStamp>2019-05-10T03:00:00Z</TimeStamp>
</element>
</DataPoint>
</MonitorData>
<RequestId>9F8163A8-F5DE-47A2-A572-4E062D223E09</RequestId>
</DescribeSnapshotMonitorDataResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9F8163A8-F5DE-47A2-A572-4E062D223E09",
"MonitorData" : {
"DataPoint" : [ {
"TimeStamp" : "2019-05-10T01:00:00Z",
"Size" : 243036848128
}, {
"TimeStamp" : "2019-05-10T02:00:00Z",
"Size" : 243036848128
}, {
"TimeStamp" : "2019-05-10T03:00:00Z",
"Size" : 243036848128
} ]
}
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | Invalid EndTime value. |
400 | InvalidParameter.TooManyDataQueried | Too many data queried. | The maximum amount of monitoring data that can be queried is exceeded. |
400 | Throttling | Request was denied due to request throttling. | The request is denied due to throttling. |
For a list of error codes, see Service error codes.