| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Attaches a network interface to an instance.
NetworkInterfaceIdThe ID of the network interface to attach.
Type: String
Default: None
Required: Yes
InstanceIdThe ID of the instance to attach to the network interface.
Type: String
Default: None
Required: Yes
DeviceIndexThe index of the device for the network interface attachment.
Type: Integer
Default: None
Required: Yes
The following elements are returned in an
AttachNetworkInterfaceResponse element.
requestIdThe ID of the attachment request.
Type: xsd:string
attachmentIdThe ID of the attachment.
Type: xsd:string
This example attaches an elastic network interface (ENI) eni-ffda3197 to the specified instance
i-9cc316fe.
https://ec2.amazonaws.com/?Action=AttachNetworkInterface &DeviceIndex=1 &InstanceId=i-9cc316fe &NetworkInterfaceId=eni-ffda3197 &AUTHPARAMS
<AttachNetworkInterfaceResponse xmlns='http://ec2.amazonaws.com/doc/2013-02-01/'>
<requestId>ace8cd1e-e685-4e44-90fb-92014d907212</requestId>
<attachmentId>eni-attach-d94b09b0</attachmentId>
</AttachNetworkInterfaceResponse>