v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-171,1822,9897.4 MB

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

get/#Action=ModifyNetworkInterfaceAttribute

Query parameters

AttachmentIdstring

The ID of the network interface attachment.

DeleteOnTerminationboolean

Indicates whether the network interface is deleted when the instance is terminated.

Information about the interface attachment. If modifying the <code>delete on termination</code> attribute, you must specify the ID of the interface attachment.

Valuestring

The attribute value. The value is case-sensitive.

A description for the network interface.

DryRunboolean

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.

SecurityGroupIdstring[]

Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

NetworkInterfaceIdstring required

The ID of the network interface.

Valueboolean

The attribute value. The valid values are <code>true</code> or <code>false</code>.

Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is <code>true</code>, source/destination checks are enabled; otherwise, they are disabled. The default value is <code>true</code>. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

EnaSrdEnabledboolean

Indicates whether ENA Express is enabled for the network interface.

Updates the ENA Express configuration for the network interface that’s attached to the instance.

Action'ModifyNetworkInterfaceAttribute' required
Version'2016-11-15' required

Response

Success