:doc:`Connect <../../connect>` / Client / list_bots

*********
list_bots
*********



.. py:method:: Connect.Client.list_bots(**kwargs)

  

  This API is in preview release for Amazon Connect and is subject to change.

   

  For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the instance. Use this API to return both Amazon Lex V1 and V2 bots.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/ListBots>`_  


  **Request Syntax**
  ::

    response = client.list_bots(
        InstanceId='string',
        NextToken='string',
        MaxResults=123,
        LexVersion='V1'|'V2'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return per page.

    

  
  :type LexVersion: string
  :param LexVersion: **[REQUIRED]** 

    The version of Amazon Lex or Amazon Lex V2.

    

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

    
    ::

      {
          'LexBots': [
              {
                  'LexBot': {
                      'Name': 'string',
                      'LexRegion': 'string'
                  },
                  'LexV2Bot': {
                      'AliasArn': 'string'
                  }
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **LexBots** *(list) --* 

        The names and Amazon Web Services Regions of the Amazon Lex or Amazon Lex V2 bots associated with the specified instance.

        
        

        - *(dict) --* 

          Configuration information of an Amazon Lex or Amazon Lex V2 bot.

          
          

          - **LexBot** *(dict) --* 

            Configuration information of an Amazon Lex bot.

            
            

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

              The name of the Amazon Lex bot.

              
            

            - **LexRegion** *(string) --* 

              The Amazon Web Services Region where the Amazon Lex bot was created.

              
        
          

          - **LexV2Bot** *(dict) --* 

            Configuration information of an Amazon Lex V2 bot.

            
            

            - **AliasArn** *(string) --* 

              The Amazon Resource Name (ARN) of the Amazon Lex V2 bot.

              
        
      
    
      

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

        If there are additional results, this is the token for the next set of results.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

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

  