All Products
Search
Document Center

Elastic Compute Service:DescribeEniMonitorData

Last Updated:Sep 20, 2026

Queries the traffic information of a secondary ENI within a specified time range by calling DescribeEniMonitorData.

Operation description

Operation description

The traffic information that you can query about a secondary ENI includes the number of packets sent and received by the secondary ENI, the inbound and outbound internal network traffic, and the number of packets dropped by the secondary ENI. If some information is missing from the response, the system may have failed to obtain the corresponding information. For example, if the instance is in the Stopped state or the secondary ENI is not attached to an instance and is in the Available state, the corresponding information cannot be obtained. When you call this operation, take note of the following items:

  • A maximum of 400 data entries are returned at a time. Make sure that the value of (EndTime–StartTime)/Period is less than or equal to 400. In other words, the value of the response parameter TotalCount cannot exceed 400. Otherwise, the InvalidParameter.TooManyDataQueried error is returned.

  • You can query monitoring information only within the last 30 days. The StartTime parameter that you specify cannot be more than 30 days earlier than the current time.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeEniMonitorData

get

NetworkInterface

acs:ecs:{#regionId}:{#accountId}:eni/{#eniId}

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

EniId

string

No

The ID of the secondary ENI. By default, all secondary ENIs that are attached to the specified instance are queried.

eni-bp19da36d6xdwey****

RegionId

string

Yes

The region ID. You can call DescribeRegions to query the most recent region list.

cn-hangzhou

InstanceId

string

Yes

The ID of the instance to which the secondary ENI is attached.

i-bp1a5zr3u7nq9cx****

StartTime

string

Yes

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 automatically rounded up to the next minute.

2018-05-21T12:19:00Z

EndTime

string

Yes

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 automatically rounded up to the next minute.

2018-05-21T12:22:00Z

Period

integer

No

The interval at which to retrieve monitoring data. Unit: seconds. Valid values:

  • 60.

Default value: 60.

Valid values:

  • 60 :

    60 seconds.

  • 600 :

    600 seconds.

  • 3600 :

    3600 seconds.

60

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of returned entries.

4

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

MonitorData

object

EniMonitorData

array<object>

The collection of monitoring data of type EniMonitorDataType for secondary ENI traffic.

object

PacketRx

string

The number of internal network packets received by the secondary ENI. Unit: packets.

0

TimeStamp

string

The timestamp of the monitoring data. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

2018-05-21T03:22:00Z

DropPacketRx

string

The number of internal network packets dropped on reception by the secondary ENI. Unit: packets.

0

EniId

string

The ID of the secondary ENI.

eni-bp19da36d6xdwey****

DropPacketTx

string

The number of internal network packets dropped on transmission by the secondary ENI. Unit: packets.

0

PacketTx

string

The number of internal network packets sent by the secondary ENI. Unit: packets.

0

IntranetTx

string

The average rate of internal network data sent by the secondary ENI. Unit: kB/s.

0

IntranetRx

string

The average rate of internal network data received by the secondary ENI. Unit: kB/s.

0

Examples

Success response

JSON format

{
  "TotalCount": 4,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "MonitorData": {
    "EniMonitorData": [
      {
        "PacketRx": "0",
        "TimeStamp": "2018-05-21T03:22:00Z",
        "DropPacketRx": "0",
        "EniId": "eni-bp19da36d6xdwey****",
        "DropPacketTx": "0",
        "PacketTx": "0",
        "IntranetTx": "0",
        "IntranetRx": "0"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidEniId.NotFound The specified ENI ID does not exist. The specified ENI ID does not exist.
403 InvalidStartTime.Malformed The specified parameter "StartTime" is not valid.
403 InvalidEndTime.Malformed The specified parameter "EndTime" is not valid.
403 InvalidPeriod.ValueNotSupported The specified parameter "Period" is not valid.
403 InvalidStartTime.TooEarly The specified parameter "StartTime" is too early.
403 InvalidParameter.TooManyDataQueried Too many data queried.
403 Throttling Request was denied due to request throttling.
403 InvalidInstanceType.NotSupportCredit The InstanceType of the specified instance does not support credit.
403 InvalidParameter.EndTime The specified parameter EndTime is earlier than StartTime.
4003 InvalidParam.Malformed The specified parameter "EniId" and "InstanceId" are not valid
404 InvalidDiskId.NotFound The DiskId provided does not exist in our records. The specified disk does not exist. Check whether the disk ID is correct.
404 InvalidEcsId.NotFound The specified instance ID is invalid. The specified instance ID is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.