LexModelBuildingService / Client / get_bot_versions

get_bot_versions#

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

Request Syntax

response = client.get_bot_versions(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • name (string) –

    [REQUIRED]

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

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

  • maxResults (integer) – The maximum number of bot versions to return in the response. The default is 10.

Return type:

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

  • LexModelBuildingService.Client.exceptions.NotFoundException

  • LexModelBuildingService.Client.exceptions.LimitExceededException

  • LexModelBuildingService.Client.exceptions.InternalFailureException

  • LexModelBuildingService.Client.exceptions.BadRequestException