:doc:`LexModelsV2 <../../lexv2-models>` / Client / list_bot_versions

*****************
list_bot_versions
*****************



.. py:method:: LexModelsV2.Client.list_bot_versions(**kwargs)

  

  Gets information about all of the versions of a bot.

   

  The ``ListBotVersions`` operation returns a summary of each version of a bot. For example, if a bot has three numbered versions, the ``ListBotVersions`` operation returns for summaries, one for each numbered version and one for the ``DRAFT`` version.

   

  The ``ListBotVersions`` operation always returns at least one version, the ``DRAFT`` version.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/ListBotVersions>`_  


  **Request Syntax**
  ::

    response = client.list_bot_versions(
        botId='string',
        sortBy={
            'attribute': 'BotVersion',
            'order': 'Ascending'|'Descending'
        },
        maxResults=123,
        nextToken='string'
    )
    
  :type botId: string
  :param botId: **[REQUIRED]** 

    The identifier of the bot to list versions for.

    

  
  :type sortBy: dict
  :param sortBy: 

    Specifies sorting parameters for the list of versions. You can specify that the list be sorted by version name in either ascending or descending order.

    

  
    - **attribute** *(string) --* **[REQUIRED]** 

      The attribute to use to sort the list of versions.

      

    
    - **order** *(string) --* **[REQUIRED]** 

      The order to sort the list. You can specify ascending or descending order.

      

    
  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of versions to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

    

  
  :type nextToken: string
  :param nextToken: 

    If the response to the ``ListBotVersion`` operation contains more results than specified in the ``maxResults`` parameter, a token is returned in the response. Use that token in the ``nextToken`` parameter to return the next page of results.

    

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

    
    ::

      {
          'botId': 'string',
          'botVersionSummaries': [
              {
                  'botName': 'string',
                  'botVersion': 'string',
                  'description': 'string',
                  'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing'|'Updating',
                  'creationDateTime': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **botId** *(string) --* 

        The identifier of the bot to list versions for.

        
      

      - **botVersionSummaries** *(list) --* 

        Summary information for the bot versions that meet the filter criteria specified in the request. The length of the list is specified in the ``maxResults`` parameter of the request. If there are more versions available, the ``nextToken`` field contains a token to get the next page of results.

        
        

        - *(dict) --* 

          Summary information about a bot version returned by the `ListBotVersions <https://docs.aws.amazon.com/lexv2/latest/APIReference/API_ListBotVersions.html>`__ operation.

          
          

          - **botName** *(string) --* 

            The name of the bot associated with the version.

            
          

          - **botVersion** *(string) --* 

            The numeric version of the bot, or ``DRAFT`` to indicate that this is the version of the bot that can be updated..

            
          

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

            The description of the version.

            
          

          - **botStatus** *(string) --* 

            The status of the bot. When the status is available, the version of the bot is ready for use.

            
          

          - **creationDateTime** *(datetime) --* 

            A timestamp of the date and time that the version was created.

            
      
    
      

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

        A token that indicates whether there are more results to return in a response to the ``ListBotVersions`` operation. If the ``nextToken`` field is present, you send the contents as the ``nextToken`` parameter of a ``ListBotAliases`` operation request to get the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`LexModelsV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ValidationException`

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

  