When elastic network interfaces (ENIs) are created, deleted, attached, or detached, ENI operation events are triggered and event notifications are sent.
Notifications of ENI operation events
- ENI operation events are in invitational preview.
- The operation objects are secondary ENIs.
ENIs are classified into primary ENIs and secondary ENIs. ENI operation events can be triggered only when the operation objects are secondary ENIs. For more information about the attributes of ENIs, see Overview.
- ENI operations succeed. ENI operation events can be triggered only when ENI operations succeed and no error messages are returned. For example, assume that an Elastic Compute Service (ECS) instance has already reached the maximum number of ENIs that the instance can have. If you attempt to attach more ENIs to the instance, the attach operation fails and an error message similar to the one shown in the following figure appears. In this case, no ENI operation event is triggered.
- If the operation object is a managed ENI, the operation is initiated by an Alibaba Cloud service. When the operation is complete, an event notification is sent to the Alibaba Cloud service. For more information about managed ENIs, see Managed ENIs.
- If the operation object is a regular ENI, the operation is initiated by a user who attaches, detaches, or deletes the ENI. When the operation is complete, an event notification is sent to the user.
You can make configurations in EventBridge and CloudMonitor to receive notifications of ENI operation events and view the ENI operation results by using emails and DingTalk chatbots. You can obtain the information about the ENIs and configure ENI operations to be automatically performed in response to the notifications. For more information, see Configure event notifications and ECS events.
{
"id":"2256A988-0B26-4E2B-820A-8B********A5",
"product":"ECS",
"resourceId":"acs:ecs:cn-hangzhou:169070********30:eni/eni-8vb1qo********cdeg2n",
"level":"INFO",
"name":"NetworkInterface:NetworkInterfaceOperateCompleted",
"userId":"169070********30",
"eventTime":"20190409T121826.922+0800",
"regionId":"cn-hangzhou",
"content":{
"eniId":"eni-8vb1qo********cdeg2n",
"operation":"AttachNetworkInterface",
"eniStatus":"InUse",
"result":"success",
"requestId":"59701492-A8F2-3375-B0B9-D9********27",
"primaryPrivateIp": "192.168.XX.XX",
"secondaryPrivateIps": ["192.168.XX.XX","192.168.XX.XX"],
"ipv4Prefixes": ["192.168.XX.XX/24"],
"ipv6s": ["2001:DB8:XXXX:23:8:800:200C:417A"],
"ipv6Prefixes": ["2001:DB8::/32"]
}
}
Subparameter | Description | Example |
---|---|---|
eniId | The ID of the ENI. | eni-8vb1qo********cdeg2n |
operation | The type of the operation. Valid values:
| AttachNetworkInterface |
eniStatus | The state of the ENI. Valid values:
| InUse |
result | The operation result. Valid values:
| success |
requestId | The ID of the request that corresponds to the operation. | 59701492-A8F2-3375-B0B9-D9********27 |
primaryPrivateIp | The primary private IP address. | 192.168.XX.XX |
secondaryPrivateIps | The secondary private IP addresses. | ["192.168.XX.XX"] |
ipv4Prefixes | The secondary private IP prefixes. | ["192.168.XX.XX/14"] |
ipv6s | The IPv6 addresses. | 2001:DB8:XXXX:23:8:800:200C:417A |
ipv6Prefixes | The IPv6 prefixes. | ["2001:DB8::/32"] |