Queries the monitoring data of an elastic IP address (EIP). You can query monitoring data within the last 30 days and specify 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeEipMonitorData

The operation that you want to perform. Set the value to DescribeEipMonitorData.

AllocationId String Yes eip-2zeerraiwb7uj6idcfv****

The ID of the EIP.

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 YYYY-MM-DDThh:mm:ssZ format. For example, 2013-01-10T12:00:00Z specifies 20:00:00 on January 10, 2013 (UTC+8).

If the value of seconds (ss) is not 00, the end time is automatically rounded up to the next minute.

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 YYYY-MM-DDThh:mm:ssZ format. For example, 2013-01-10T12:00:00Z specifies 20:00:00 on January 10, 2013 (UTC+8).

If the value of seconds (ss) is not 00, the start time is automatically rounded up to the next minute.

RegionId String Yes cn-hangzhou

The ID of the region to which the EIP belongs.

Period Integer No 60

The duration of a monitoring data entry. Valid values: 60 (default), 300, 900, and 3600. Unit: seconds.

  • If the value of (EndTime - StartTime)/Period is greater than 200, a maximum of 200 monitoring data entries are returned at a time.
  • If the value of (EndTime - StartTime)/Period is less than or equal to 200, only the monitoring data collected between the start time and end time is returned.

Response parameters

Parameter Type Example Description
EipMonitorDatas Array of EipMonitorData

The detailed information about the monitoring data of the EIP.

EipMonitorData
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.

EipFlow Integer 465

The sum of inbound and outbound traffic.

EipPackets Integer 3434

The number of packets.

EipRX Long 122

The inbound traffic. Unit: bytes.

EipTX Long 343

The outbound bandwidth. Unit: bytes.

TimeStamp String 2020-01-21T09:50:23Z

The timestamp of the monitoring data. The timestamp follows the ISO8601 standard. Example: 2020-01-21T09:50:23Z.

RequestId String C8B26B44-0189-443E-9816-D951F59623A9

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeEipMonitorData
&AllocationId=eip-2zeerraiwb7uj6idcfv****
&EndTime=2020-01-05T03:05:10Z
&StartTime=2020-01-05T01:05:05Z
&<Common request parameters>

Sample success responses

XML format

<DescribeEipMonitorDataResponse>
  <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
  <EipMonitorDatas>
        <EipMonitorData>
              <EipPackets>3434</EipPackets>
              <EipBandwidth>10</EipBandwidth>
              <EipFlow>465</EipFlow>
              <EipTX>343</EipTX>
              <TimeStamp>2020-01-21T09:50:23Z</TimeStamp>
              <EipRX>122</EipRX>
        </EipMonitorData>
  </EipMonitorDatas>
</DescribeEipMonitorDataResponse>

JSON format

{
    "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9",
    "EipMonitorDatas": {
        "EipMonitorData": {
            "EipPackets": 3434,
            "EipBandwidth": 10,
            "EipFlow": 465,
            "EipTX": 343,
            "TimeStamp": "2020-01-21T09:50:23Z",
            "EipRX": 122
        }
    }
}

Error codes

HttpCode Error code Error message Description
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).
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 EIP 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 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, visit the API Error Center.