Scalr\Service\Aws\Ec2\DataType\InstanceData::attachNetworkInterface PHP Method

attachNetworkInterface() public method

Attaches a network interface to an instance.
public attachNetworkInterface ( string $networkInterfaceId, integer $deviceIndex ) : string
$networkInterfaceId string The ID of the network interface
$deviceIndex integer The index of the device for the network interface attachment.
return string Returns Attachment ID on success or throws an exception
    public function attachNetworkInterface($networkInterfaceId, $deviceIndex)
    {
        $this->throwExceptionIfNotInitialized();
        return $this->getEc2()->networkInterface->attach($networkInterfaceId, $this->instanceId, $deviceIndex);
    }