Modifying an FNI Attribute
You can modify an attribute of a flexible network interface (FNI).
Using Cockpit, you can only modify the security groups associated with an FNI.
Using AWS CLI, you can modify the following attributes of an FNI:
-
Its description (
description
) -
Its associated security groups (
groups
) -
Its behavior when terminating the instance it is attached to (
DeleteOnTermination
)
You can specify only one attribute at a time.
Modifying the Security Groups Associated with an FNI Using Cockpit
-
Click Network/Security > Flexible Network Interfaces.
-
Click the FNI with which you want to associate one or more security groups.
The FNI is selected. -
Click Manage Security Groups .
The MANAGE SECURITY GROUPS dialog box appears and displays security groups associated with the FNI and the subnet of the VPC in which the FNI is located. -
To associate or disassociate a security group from the FNI, drag and drop it using .
The FNI must be associated with at least one security group.
-
Click Update to validate.
The security groups of the FNI are modified.
Modifying an FNI Attribute Using AWS CLI
To modify an attribute of the network interface, use the modify-network-interface-attribute command following this syntax:
$ aws ec2 modify-network-interface-attribute \
--profile YOUR_PROFILE \
--network-interface-id eni-12345678 \
[--description NOT_SPECIFIED] \
[--groups NOT_SPECIFIED] \
--attachment "AttachmentId=eni-attach-12345678,DeleteOnTermination=false" \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
network-interface-id
: The ID of the FNI. -
(optional)
description
: A new description for the FNI. -
(optional)
groups
: One or more IDs of security groups to associate with the FNI.The FNI must be associated with at least one security group.
-
(optional)
attachment
: A new configuration for the attachment. This attribute contains the following elements that you need to specify:-
AttachmentId
: The ID of the FNI attachment. For more information about how to retrieve it, see Getting Information About Your FNIs. -
DeleteOnTermination
: If set totrue
, the FNI is deleted when you terminate the instance. If set tofalse
, it is only detached.
-
-
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The specified attribute of the FNI is modified.
Related Pages
Corresponding API Method
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.