:doc:`LexModelBuildingService <../../lex-models>` / Client / get_bot_versions

****************
get_bot_versions
****************



.. py:method:: LexModelBuildingService.Client.get_bot_versions(**kwargs)

  

  Gets information about all of the versions of a bot.

   

  The ``GetBotVersions`` operation returns a ``BotMetadata`` object for each version of a bot. For example, if a bot has three numbered versions, the ``GetBotVersions`` operation returns four ``BotMetadata`` objects in the response, one for each numbered version and one for the ``$LATEST`` version.

   

  The ``GetBotVersions`` operation always returns at least one version, the ``$LATEST`` version.

   

  This operation requires permissions for the ``lex:GetBotVersions`` action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions>`_  


  **Request Syntax**
  ::

    response = client.get_bot_versions(
        name='string',
        nextToken='string',
        maxResults=123
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the bot for which versions should be returned.

    

  
  :type nextToken: string
  :param nextToken: 

    A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of bot versions to return in the response. The default is 10.

    

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

    
    ::

      {
          'bots': [
              {
                  'name': 'string',
                  'description': 'string',
                  'status': 'BUILDING'|'READY'|'READY_BASIC_TESTING'|'FAILED'|'NOT_BUILT',
                  'lastUpdatedDate': datetime(2015, 1, 1),
                  'createdDate': datetime(2015, 1, 1),
                  'version': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **bots** *(list) --* 

        An array of ``BotMetadata`` objects, one for each numbered version of the bot plus one for the ``$LATEST`` version.

        
        

        - *(dict) --* 

          Provides information about a bot. .

          
          

          - **name** *(string) --* 

            The name of the bot.

            
          

          - **description** *(string) --* 

            A description of the bot.

            
          

          - **status** *(string) --* 

            The status of the bot.

            
          

          - **lastUpdatedDate** *(datetime) --* 

            The date that the bot was updated. When you create a bot, the creation date and last updated date are the same.

            
          

          - **createdDate** *(datetime) --* 

            The date that the bot was created.

            
          

          - **version** *(string) --* 

            The version of the bot. For a new bot, the version is always ``$LATEST``.

            
      
    
      

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

        A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.

        
  
  **Exceptions**
  
  *   :py:class:`LexModelBuildingService.Client.exceptions.NotFoundException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.LimitExceededException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.InternalFailureException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.BadRequestException`

  