get_intents
(**kwargs)¶Returns intent information as follows:
nameContains
field, returns the $LATEST
version of all intents that contain the specified string.nameContains
field, returns information about the $LATEST
version of all intents.The operation requires permission for the lex:GetIntents
action.
See also: AWS API Documentation
Request Syntax
response = client.get_intents(
nextToken='string',
maxResults=123,
nameContains='string'
)
dict
Response Syntax
{
'intents': [
{
'name': 'string',
'description': 'string',
'lastUpdatedDate': datetime(2015, 1, 1),
'createdDate': datetime(2015, 1, 1),
'version': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
intents (list) --
An array of Intent
objects. For more information, see PutBot.
(dict) --
Provides information about an intent.
name (string) --
The name of the intent.
description (string) --
A description of the intent.
lastUpdatedDate (datetime) --
The date that the intent was updated. When you create an intent, the creation date and last updated date are the same.
createdDate (datetime) --
The date that the intent was created.
version (string) --
The version of the intent.
nextToken (string) --
If the response is truncated, the response includes a pagination token that you can specify in your next request to fetch the next page of intents.
Exceptions
LexModelBuildingService.Client.exceptions.NotFoundException
LexModelBuildingService.Client.exceptions.LimitExceededException
LexModelBuildingService.Client.exceptions.InternalFailureException
LexModelBuildingService.Client.exceptions.BadRequestException
Examples
This example shows how to get a list of all of the intents in your account.
response = client.get_intents(
maxResults=10,
nextToken='',
)
print(response)
Expected Output:
{
'intents': [
{
'version': '$LATEST',
'name': 'DocOrderPizza',
'createdDate': 1494359783.453,
'description': 'Order a pizza from a local pizzeria.',
'lastUpdatedDate': 1494359783.453,
},
],
'ResponseMetadata': {
'...': '...',
},
}