def _create_network_interface(<EOL>self, ip_config_name, nic_name, public_ip, region,<EOL>resource_group_name, subnet, accelerated_networking=False<EOL>):
nic_config = {<EOL>'<STR_LIT:location>': region,<EOL>'<STR_LIT>': [{<EOL>'<STR_LIT:name>': ip_config_name,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': {<EOL>'<STR_LIT:id>': subnet.id<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT:id>': public_ip.id<EOL>},<EOL>}]<EOL>}<EOL>if accelerated_networking:<EOL><INDENT>nic_config['<STR_LIT>'] = True<EOL><DEDENT>try:<EOL><INDENT>nic_setup = self.network.network_interfaces.create_or_update(<EOL>resource_group_name, nic_name, nic_config<EOL>)<EOL><DEDENT>except Exception as error:<EOL><INDENT>raise AzureCloudException(<EOL>'<STR_LIT>'.format(<EOL>error<EOL>)<EOL>)<EOL><DEDENT>return nic_setup.result()<EOL>
Create a network interface in the resource group.

Attach NIC to the subnet and public IP provided.