code: def virtual_machines_list(resource_group, **kwargs):
      '''
      .. versionadded:: 2019.2.0
  
      List all virtual machines within a resource group.
  
      :param resource_group: The resource group name to list virtual
          machines within.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-call azurearm_compute.virtual_machines_list testgroup
  
      '''
      result = {}
      compconn = __utils__['azurearm.get_client']('compute', **kwargs)
      try:
          vms = __utils__['azurearm.paged_object_to_list'](
              compconn.virtual_machines.list(
                  resource_group_name=resource_group
              )
          )
          for vm in vms:  # pylint: disable=invalid-name
              result[vm['name']] = vm
      except CloudError as exc:
          __utils__['azurearm.log_cloud_error']('compute', str(exc), **kwargs)
          result = {'error': str(exc)}
  
      return resulf virtual_machines_list(resource_group, **kwargs):
      '''
      .. versionadded:: 2019.2.0
  
      List all virtual machines within a resource group.
  
      :param resource_group: The resource group name to list virtual
          machines within.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-call azurearm_compute.virtual_machines_list testgroup
  
      '''
      result = {}
      compconn = __utils__['azurearm.get_client']('compute', **kwargs)
      try:
          vms = __utils__['azurearm.paged_object_to_list'](
              compconn.virtual_machines.list(
                  resource_group_name=resource_group
              )
          )
          for vm in vms:  # pylint: disable=invalid-name
              result[vm['name']] = vm
      except CloudError as exc:
          __utils__['azurearm.log_cloud_error']('compute', str(exc), **kwargs)
          result = {'error': str(exc)}
  
      return result
docs: .. versionadded:: 2019.2.0
  
      List all virtual machines within a resource group.
  
      :param resource_group: The resource group name to list virtual
          machines within.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-call azurearm_compute.virtual_machines_list testgroup