All Products
Search
Document Center

Elastic Compute Service:Modify the attributes of an ENI

Last Updated:Mar 14, 2024

You can modify the attributes of elastic network interfaces (ENIs) based on your business requirements. For a secondary ENI, you can modify the name, description, and security groups of the ENI. For a primary ENI, you can modify only the name and description of the ENI. To change the security groups of the primary ENI, change the security groups of the Elastic Compute Service (ECS) instance to which the primary ENI is bound. The primary ENI is added to or moved out of security groups together with the ECS instance.

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.

  • An ENI can be bound to an ECS instance only when they belong to the same type of security group.

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.

For more information about security groups, see Overview.

Procedure

Modify the attributes of an ENI in the ECS console

To modify the name and description of a primary or secondary ENI and change the security groups of a secondary ENI on the Network Interfaces page, perform the following steps.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Elastic Network Interfaces.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the ENI whose attributes you want to modify. In the Actions column, click Modify.

  5. In the Modify dialog box, follow the on-screen instructions to modify the ENI Name, Security Group, and Description parameters.

  6. Click OK.

    Refresh the ENI list. If the attributes of the ENI are modified, you can view the new attributes in the corresponding columns of the ENI.

Modify the attributes of an ENI by calling an API operation

Call the ModifyNetworkInterfaceAttribute operation to modify the attributes of an ENI, such as the name, description, and security groups of the ENI.