:doc:`BackupGateway <../../backup-gateway>` / Client / list_virtual_machines

*********************
list_virtual_machines
*********************



.. py:method:: BackupGateway.Client.list_virtual_machines(**kwargs)

  

  Lists your virtual machines.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListVirtualMachines>`_  


  **Request Syntax**
  ::

    response = client.list_virtual_machines(
        HypervisorArn='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type HypervisorArn: string
  :param HypervisorArn: 

    The Amazon Resource Name (ARN) of the hypervisor connected to your virtual machine.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of virtual machines to list.

    

  
  :type NextToken: string
  :param NextToken: 

    The next item following a partial list of returned resources. For example, if a request is made to return ``maxResults`` number of resources, ``NextToken`` allows you to return more items in your list starting at the location pointed to by the next token.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'NextToken': 'string',
          'VirtualMachines': [
              {
                  'HostName': 'string',
                  'HypervisorId': 'string',
                  'LastBackupDate': datetime(2015, 1, 1),
                  'Name': 'string',
                  'Path': 'string',
                  'ResourceArn': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        The next item following a partial list of returned resources. For example, if a request is made to return ``maxResults`` number of resources, ``NextToken`` allows you to return more items in your list starting at the location pointed to by the next token.

        
      

      - **VirtualMachines** *(list) --* 

        A list of your ``VirtualMachine`` objects, ordered by their Amazon Resource Names (ARNs).

        
        

        - *(dict) --* 

          A virtual machine that is on a hypervisor.

          
          

          - **HostName** *(string) --* 

            The host name of the virtual machine.

            
          

          - **HypervisorId** *(string) --* 

            The ID of the virtual machine's hypervisor.

            
          

          - **LastBackupDate** *(datetime) --* 

            The most recent date a virtual machine was backed up, in Unix format and UTC time.

            
          

          - **Name** *(string) --* 

            The name of the virtual machine.

            
          

          - **Path** *(string) --* 

            The path of the virtual machine.

            
          

          - **ResourceArn** *(string) --* 

            The Amazon Resource Name (ARN) of the virtual machine. For example, ``arn:aws:backup-gateway:us-west-1:0000000000000:vm/vm-0000ABCDEFGIJKL``.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`BackupGateway.Client.exceptions.ValidationException`

  
  *   :py:class:`BackupGateway.Client.exceptions.InternalServerException`

  
  *   :py:class:`BackupGateway.Client.exceptions.ThrottlingException`

  