You can modify the attributes of an Elastic Network Interface (ENI) based on your business requirements. For a secondary ENI, you can modify the name, description, and security groups. For the primary ENI, you can modify only the name and description. To change the security groups to which the primary ENI belongs, you must change the security groups of the Elastic Compute Service (ECS) instance to which the ENI is bound. This topic describes how to modify ENI attributes in the ECS console.
Prerequisites
Before you add a primary ENI to a new security group, make sure that the primary ENI belongs to the same virtual private cloud (VPC) and zone as the new security group. For more information, see Overview.
Limits
If you want to change the security groups of an ENI, take note of the following limits on the ENI and the ECS instance to which the ENI is bound:
An ECS instance cannot belong to basic and advanced security groups at the same time.
An ENI cannot belong to basic and advanced security groups at the same time.
An ENI can be added to up to five security groups.
For information about security groups, see Overview and Basic security groups and advanced security groups.
Procedure
To modify the names and descriptions of the primary ENI and secondary ENIs and change the security groups of a secondary ENI on the Elastic Network Interfaces page, perform the following steps:
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find the ENI that you want to modify and modify the following attributes:
ENI name: In the ENI ID/Name column, move the pointer over the ENI name, and then click the icon to set a new ENI name as prompted.
Description: Click the ENI ID in the ENI ID/Name column. In the Basic Information section, move the pointer over Description and click the icon to modify the description of the ENI as prompted.
Security groups: If the ENI is a secondary ENI, click Change Security Groups in the Operation column to change the security groups of the ENI. In the Change Security Groups dialog box, select new security groups or remove existing security groups for the ENI. You must retain at least one security group for the ENI.
NoteOn the Elastic Network Interfaces page, you can change security groups only for secondary ENIs. To change the security groups of a primary ENI, you can go to the Security group page. For more information, see Manage ENIs in security groups.
Click Confirm.
Refresh the list and check whether the attributes of the secondary ENI are changed. If the attributes are changed, the modification is successful.
References
You can call an API operation to modify the name, description, and security groups of an ENI. For more information, see ModifyNetworkInterfaceAttribute.