Queries the monitoring data of an elastic IP address (EIP). You can query monitoring data within the last 30 days, and obtain up to 400 data points in each request.
Description
To improve user experience in querying monitoring data, we recommend that you call the DescribeMetricList API operation provided by CloudMonitor to query EIP monitoring data. For more information, see DescribeMetricList and EIP monitoring data.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeEipMonitorData |
The operation that you want to perform. Set the value to DescribeEipMonitorData. |
RegionId | String | No | cn-hangzhou |
The ID of the region to which the EIP belongs. You can call the DescribeRegions operation to query available regions. |
AllocationId | String | Yes | eip-2zeerraiwb7uj6idcfv**** |
The ID of the EIP. |
StartTime | String | Yes | 2020-01-05T01:05:05Z |
The beginning of the time range to query. The time must be in UTC. Specify the time
in the ISO 8601 standard in If the value of seconds (ss) is not 00, the start time is automatically rounded up to the next minute. |
EndTime | String | Yes | 2020-01-05T03:05:10Z |
The end of the time range to query. The time must be in UTC. Specify the time in the
ISO 8601 standard in If the value of seconds (ss) is not 00, the end time is automatically rounded up to the next minute. |
Period | Integer | No | 60 |
The duration of each monitoring data entry. Unit: seconds. Valid values: 60 (default), 300, 900, and 3600.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C8B26B44-0189-443E-9816-D951F59623A9 |
The ID of the request. |
EipMonitorDatas | Array of EipMonitorData |
The detailed information about the monitoring data of the EIP. |
|
EipMonitorData | |||
EipTX | Long | 343 |
The outbound traffic. Unit: bytes. |
EipPackets | Integer | 3434 |
The number of packets. |
EipBandwidth | Integer | 10 |
The average bandwidth value. This value is equal to EipFlow/Period. Unit: byte/s. The default value of Period is 60. Unit: seconds. |
TimeStamp | String | 2020-01-21T09:50:23Z |
The timestamp of the monitoring data. Specify the time in the ISO8601 standard. Example:
|
EipFlow | Long | 465 |
The sum of inbound and outbound traffic. |
EipRX | Long | 122 |
The inbound traffic. Unit: bytes. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeEipMonitorData
&RegionId=cn-hangzhou
&AllocationId=eip-2zeerraiwb7uj6idcfv****
&StartTime=2020-01-05T01:05:05Z
&EndTime=2020-01-05T03:05:10Z
&Period=60
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeEipMonitorDataResponse>
<RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
<EipMonitorDatas>
<EipTX>343</EipTX>
<EipPackets>3434</EipPackets>
<EipBandwidth>10</EipBandwidth>
<TimeStamp>2020-01-21T09:50:23Z</TimeStamp>
<EipFlow>465</EipFlow>
<EipRX>122</EipRX>
</EipMonitorDatas>
</DescribeEipMonitorDataResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C8B26B44-0189-443E-9816-D951F59623A9",
"EipMonitorDatas" : [ {
"EipTX" : 343,
"EipPackets" : 3434,
"EipBandwidth" : 10,
"TimeStamp" : "2020-01-21T09:50:23Z",
"EipFlow" : 465,
"EipRX" : 122
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | The error message returned because the value of the StartTime parameter is invalid. |
400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | The error message returned because the value of the EndTime parameter is invalid. |
400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | The error message returned because the value of the Period parameter is invalid. |
400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | The error message returned because the value of the StartTime parameter is invalid. |
400 | InvalidAllocationId.NotFound | Specified allocation id is not found. | The error message returned because the specified EIP does not exist. Check whether the value of the parameter is valid. |
400 | OperationDenied.TooManyDataQueried | Specified operation is denied as too many data to return. | The error message returned because the number of data entries to be returned has reached the upper limit. |
404 | InvalidIpInstanceId.NotFound | The specified Eip InstanceId does not exist in our records. | The error message returned because the specified EIP does not exist. |
404 | InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | The error message returned because the specified Elastic Compute Service (ECS) instance does not exist in the virtual private cloud (VPC). |
404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. | The error message returned because the specified region does not exist. Check whether the specified region ID is valid. |
For a list of error codes, see Service error codes.