:doc:`CodeDeploy <../../codedeploy>` / Client / list_on_premises_instances

**************************
list_on_premises_instances
**************************



.. py:method:: CodeDeploy.Client.list_on_premises_instances(**kwargs)

  

  Gets a list of names for one or more on-premises instances.

   

  Unless otherwise specified, both registered and deregistered on-premises instance names are listed. To list only registered or deregistered on-premises instance names, use the registration status parameter.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListOnPremisesInstances>`_  


  **Request Syntax**
  ::

    response = client.list_on_premises_instances(
        registrationStatus='Registered'|'Deregistered',
        tagFilters=[
            {
                'Key': 'string',
                'Value': 'string',
                'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
            },
        ],
        nextToken='string'
    )
    
  :type registrationStatus: string
  :param registrationStatus: 

    The registration status of the on-premises instances:

     

    
    * ``Deregistered``: Include deregistered on-premises instances in the resulting list.
     
    * ``Registered``: Include registered on-premises instances in the resulting list.
    

    

  
  :type tagFilters: list
  :param tagFilters: 

    The on-premises instance tags that are used to restrict the on-premises instance names returned.

    

  
    - *(dict) --* 

      Information about an on-premises instance tag filter.

      

    
      - **Key** *(string) --* 

        The on-premises instance tag filter key.

        

      
      - **Value** *(string) --* 

        The on-premises instance tag filter value.

        

      
      - **Type** *(string) --* 

        The on-premises instance tag filter type:

         

        
        * KEY_ONLY: Key only.
         
        * VALUE_ONLY: Value only.
         
        * KEY_AND_VALUE: Key and value.
        

        

      
    

  :type nextToken: string
  :param nextToken: 

    An identifier returned from the previous list on-premises instances call. It can be used to return the next set of on-premises instances in the list.

    

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

    
    ::

      {
          'instanceNames': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of the list on-premises instances operation.

      
      

      - **instanceNames** *(list) --* 

        The list of matching on-premises instance names.

        
        

        - *(string) --* 
    
      

      - **nextToken** *(string) --* 

        If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list on-premises instances call to return the next set of on-premises instances in the list.

        
  
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidRegistrationStatusException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidTagFilterException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidNextTokenException`

  