get_bots(**kwargs)¶Returns bot information as follows:
nameContains field, the response includes information for the $LATEST version of all bots whose name contains the specified string.nameContains field, the operation returns information about the $LATEST version of all of your bots.This operation requires permission for the lex:GetBots action.
See also: AWS API Documentation
Request Syntax
response = client.get_bots(
    nextToken='string',
    maxResults=123,
    nameContains='string'
)
dict
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, with one entry for each bot.
(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) --
If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of bots.
Exceptions
LexModelBuildingService.Client.exceptions.NotFoundExceptionLexModelBuildingService.Client.exceptions.LimitExceededExceptionLexModelBuildingService.Client.exceptions.InternalFailureExceptionLexModelBuildingService.Client.exceptions.BadRequestExceptionExamples
This example shows how to get a list of all of the bots in your account.
response = client.get_bots(
    maxResults=5,
    nextToken='',
)
print(response)
Expected Output:
{
    'bots': [
        {
            'version': '$LATEST',
            'name': 'DocOrderPizzaBot',
            'createdDate': 1494360160.133,
            'description': 'Orders a pizza from a local pizzeria.',
            'lastUpdatedDate': 1494360160.133,
            'status': 'NOT_BUILT',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}