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

*************
list_gateways
*************



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

  

  Lists backup gateways owned by an Amazon Web Services account in an Amazon Web Services Region. The returned list is ordered by gateway Amazon Resource Name (ARN).

  

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


  **Request Syntax**
  ::

    response = client.list_gateways(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of gateways 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**

    
    ::

      {
          'Gateways': [
              {
                  'GatewayArn': 'string',
                  'GatewayDisplayName': 'string',
                  'GatewayType': 'BACKUP_VM',
                  'HypervisorId': 'string',
                  'LastSeenTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Gateways** *(list) --* 

        A list of your gateways.

        
        

        - *(dict) --* 

          A gateway is an Backup Gateway appliance that runs on the customer's network to provide seamless connectivity to backup storage in the Amazon Web Services Cloud.

          
          

          - **GatewayArn** *(string) --* 

            The Amazon Resource Name (ARN) of the gateway. Use the ``ListGateways`` operation to return a list of gateways for your account and Amazon Web Services Region.

            
          

          - **GatewayDisplayName** *(string) --* 

            The display name of the gateway.

            
          

          - **GatewayType** *(string) --* 

            The type of the gateway.

            
          

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

            The hypervisor ID of the gateway.

            
          

          - **LastSeenTime** *(datetime) --* 

            The last time Backup gateway communicated with the gateway, in Unix format and UTC time.

            
      
    
      

      - **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.

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

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

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

  