async def get_virtual_machine_scale_set_network_interface(self, resource_group_name: str, virtual_machine_scale_set_name: str, virtualmachine_index: str, network_interface_name: str, expand: Optional[str]=None, **kwargs) -> '_models.NetworkInterface':
    'Get the specified network interface in a virtual machine scale set.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param virtual_machine_scale_set_name: The name of the virtual machine scale set.\n        :type virtual_machine_scale_set_name: str\n        :param virtualmachine_index: The virtual machine index.\n        :type virtualmachine_index: str\n        :param network_interface_name: The name of the network interface.\n        :type network_interface_name: str\n        :param expand: Expands referenced resources.\n        :type expand: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: NetworkInterface, or the result of cls(response)\n        :rtype: ~azure.mgmt.network.v2018_07_01.models.NetworkInterface\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2017-03-30'
    accept = 'application/json'
    url = self.get_virtual_machine_scale_set_network_interface.metadata['url']
    path_format_arguments = {'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'virtualMachineScaleSetName': self._serialize.url('virtual_machine_scale_set_name', virtual_machine_scale_set_name, 'str'), 'virtualmachineIndex': self._serialize.url('virtualmachine_index', virtualmachine_index, 'str'), 'networkInterfaceName': self._serialize.url('network_interface_name', network_interface_name, 'str'), 'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    if (expand is not None):
        query_parameters['$expand'] = self._serialize.query('expand', expand, 'str')
    header_parameters = {}
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    request = self._client.get(url, query_parameters, header_parameters)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    deserialized = self._deserialize('NetworkInterface', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized
Get the specified network interface in a virtual machine scale set.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param virtual_machine_scale_set_name: The name of the virtual machine scale set.
:type virtual_machine_scale_set_name: str
:param virtualmachine_index: The virtual machine index.
:type virtualmachine_index: str
:param network_interface_name: The name of the network interface.
:type network_interface_name: str
:param expand: Expands referenced resources.
:type expand: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: NetworkInterface, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2018_07_01.models.NetworkInterface
:raises: ~azure.core.exceptions.HttpResponseError
async def get_virtual_machine_scale_set_network_interface(self, resource_group_name: str, virtual_machine_scale_set_name: str, virtualmachine_index: str, network_interface_name: str, expand: Optional[str]=None, **kwargs) -> '_models.NetworkInterface':
    'Get the specified network interface in a virtual machine scale set.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param virtual_machine_scale_set_name: The name of the virtual machine scale set.\n        :type virtual_machine_scale_set_name: str\n        :param virtualmachine_index: The virtual machine index.\n        :type virtualmachine_index: str\n        :param network_interface_name: The name of the network interface.\n        :type network_interface_name: str\n        :param expand: Expands referenced resources.\n        :type expand: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: NetworkInterface, or the result of cls(response)\n        :rtype: ~azure.mgmt.network.v2018_07_01.models.NetworkInterface\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2017-03-30'
    accept = 'application/json'
    url = self.get_virtual_machine_scale_set_network_interface.metadata['url']
    path_format_arguments = {'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'virtualMachineScaleSetName': self._serialize.url('virtual_machine_scale_set_name', virtual_machine_scale_set_name, 'str'), 'virtualmachineIndex': self._serialize.url('virtualmachine_index', virtualmachine_index, 'str'), 'networkInterfaceName': self._serialize.url('network_interface_name', network_interface_name, 'str'), 'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    if (expand is not None):
        query_parameters['$expand'] = self._serialize.query('expand', expand, 'str')
    header_parameters = {}
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    request = self._client.get(url, query_parameters, header_parameters)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    deserialized = self._deserialize('NetworkInterface', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized