LexModelBuildingService.Client.
get_slot_types
(**kwargs)¶Returns slot type information as follows:
nameContains
field, returns the $LATEST
version of all slot types that contain the specified string.nameContains
field, returns information about the $LATEST
version of all slot types.The operation requires permission for the lex:GetSlotTypes
action.
See also: AWS API Documentation
Request Syntax
response = client.get_slot_types(
nextToken='string',
maxResults=123,
nameContains='string'
)
dict
Response Syntax
{
'slotTypes': [
{
'name': 'string',
'description': 'string',
'lastUpdatedDate': datetime(2015, 1, 1),
'createdDate': datetime(2015, 1, 1),
'version': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
slotTypes (list) --
An array of objects, one for each slot type, that provides information such as the name of the slot type, the version, and a description.
(dict) --
Provides information about a slot type..
name (string) --
The name of the slot type.
description (string) --
A description of the slot type.
lastUpdatedDate (datetime) --
The date that the slot type was updated. When you create a resource, the creation date and last updated date are the same.
createdDate (datetime) --
The date that the slot type was created.
version (string) --
The version of the slot type.
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 slot types.
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 slot types in your account.
response = client.get_slot_types(
maxResults=10,
nextToken='',
)
print(response)
Expected Output:
{
'slotTypes': [
{
'version': '$LATEST',
'name': 'DocPizzaCrustType',
'createdDate': 1494359274.403,
'description': 'Available crust types',
'lastUpdatedDate': 1494359274.403,
},
{
'version': '$LATEST',
'name': 'DocPizzaSauceType',
'createdDate': 1494356442.23,
'description': 'Available pizza sauces',
'lastUpdatedDate': 1494356442.23,
},
{
'version': '$LATEST',
'name': 'DocPizzaType',
'createdDate': 1494359198.656,
'description': 'Available pizzas',
'lastUpdatedDate': 1494359198.656,
},
],
'ResponseMetadata': {
'...': '...',
},
}