Queries the monitoring data of an elastic IP address (EIP). You can query data from the last 30 days, with up to 400 data points per request.
Operation description
We recommend that you use the DescribeMetricList operation provided by CloudMonitor to query EIP monitoring data. For more information, see DescribeMetricList and EIP monitoring data.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The ID of the region to which the EIP belongs. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| AllocationId |
string |
Yes |
The ID of the EIP. |
eip-2zeerraiwb7uj6idcfv**** |
| StartTime |
string |
Yes |
The start of the time range to query, in UTC. Use the ISO 8601 If the value of seconds (ss) is not 00, the start time is automatically rounded up to the next minute. |
2020-01-05T01:05:05Z |
| EndTime |
string |
Yes |
The end of the time range to query, in UTC. Use the ISO 8601 If the value of seconds (ss) is not 00, the end time is automatically rounded up to the next minute. |
2020-01-05T03:05:10Z |
| Period |
integer |
No |
The duration of each monitoring data entry. Unit: seconds. Valid values: 60 (default), 300, 900, and 3600.
|
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
C8B26B44-0189-443E-9816-D951F59623A9 |
| EipMonitorDatas |
object |
||
| EipMonitorData |
array<object> |
The monitoring data entries for the EIP. |
|
|
object |
|||
| EipTX |
integer |
The outbound traffic. Unit: bytes. |
343 |
| EipPackets |
integer |
The number of packets. |
3434 |
| EipBandwidth |
integer |
The average bandwidth, calculated as EipFlow/Period. Unit: byte/s. The default Period is 60 seconds. |
10 |
| TimeStamp |
string |
The timestamp of the data point, in ISO 8601 format. Example: |
2020-01-21T09:50:23Z |
| EipFlow |
integer |
The sum of inbound and outbound traffic. |
465 |
| EipRX |
integer |
The inbound traffic. Unit: bytes. |
122 |
Examples
Success response
JSON format
{
"RequestId": "C8B26B44-0189-443E-9816-D951F59623A9",
"EipMonitorDatas": {
"EipMonitorData": [
{
"EipTX": 343,
"EipPackets": 3434,
"EipBandwidth": 10,
"TimeStamp": "2020-01-21T09:50:23Z",
"EipFlow": 465,
"EipRX": 122
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.TooMany | monitor parameter too many data required. | There are multiple invalid input parameters. |
| 400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | |
| 400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | |
| 400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | |
| 400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | |
| 400 | InvalidAllocationId.NotFound | Specified allocation id is not found. | |
| 400 | OperationDenied.TooManyDataQueried | Specified operation is denied as too many data to return. | |
| 404 | InvalidIpInstanceId.NotFound | The specified Eip InstanceId does not exist in our records. | |
| 404 | InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | |
| 404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.