All Products
Search
Document Center

Virtual Private Cloud:DescribeEipMonitorData

Last Updated:Nov 13, 2024

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.

Operation 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeEipMonitorDataget
  • Address
    acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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
AllocationIdstringYes

The ID of the EIP.

eip-2zeerraiwb7uj6idcfv****
StartTimestringYes

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 (UTC+8) on January 10, 2013.

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
EndTimestringYes

The end of the time range to query. The time must be in UTC. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. For example, 2013-01-10T12:00:00Z specifies 20:00:00 (UTC+8) on January 10, 2013.

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
PeriodintegerNo

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

  • 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.
60

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

C8B26B44-0189-443E-9816-D951F59623A9
EipMonitorDatasarray<object>

The detailed information about the monitoring data of the EIP.

EipMonitorDataobject
EipTXlong

The outbound traffic. Unit: bytes.

343
EipPacketsinteger

The number of packets.

3434
EipBandwidthinteger

The average bandwidth value. This value is equal to EipFlow/Period. Unit: byte/s. The default value of Period is 60. Unit: seconds.

10
TimeStampstring

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

2020-01-21T09:50:23Z
EipFlowlong

The sum of inbound and outbound traffic.

465
EipRXlong

The inbound traffic. Unit: bytes.

122

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParameter.TooManymonitor parameter too many data required.There are multiple invalid input parameters.
400InvalidStartTime.MalformedThe specified parameter "StartTime" is not valid.The start time is invalid.
400InvalidEndTime.MalformedThe specified parameter "EndTime" is not valid.EndTime is set to an invalid value.
400InvalidPeriod.ValueNotSupportedThe specified parameter "Period" is not valid.Period is set to an invalid value.
400InvalidStartTime.TooEarlyThe specified parameter "StartTime" is too early.The start time is invalid.
400InvalidAllocationId.NotFoundSpecified 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.
400OperationDenied.TooManyDataQueriedSpecified operation is denied as too many data to return.The number of data entries to be returned has reached the upper limit.
404InvalidIpInstanceId.NotFoundThe specified Eip InstanceId does not exist in our records.The specified EIP does not exist.
404InvalidInstanceId.NotFoundThe InstanceId provided does not exist in our records.The ECS instance does not exist in the VPC.
404Forbidden.RegionNotFoundSpecified region is not found during access authentication.The specified region does not exist. Check whether the specified region ID is valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-12-02The Error code has changed. The response structure of the API has changedView Change Details