2022/01/12 - Amazon Lex Model Building V2 - 2 new 10 updated api methods
Changes This release adds support for Custom vocabulary in Amazon Lex V2 APIs for model building. Customers can give Amazon Lex V2 more information about how to process audio conversations with a bot by creating a custom vocabulary in a specific language.
Provides metadata information about a custom vocabulary.
See also: AWS API Documentation
Request Syntax
client.describe_custom_vocabulary_metadata( botId='string', botVersion='string', localeId='string' )
string
[REQUIRED]
The unique identifier of the bot that contains the custom vocabulary.
string
[REQUIRED]
The bot version of the bot to return metadata for.
string
[REQUIRED]
The locale to return the custom vocabulary information for. The locale must be en_GB .
dict
Response Syntax
{ 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'customVocabularyStatus': 'Ready'|'Deleting'|'Exporting'|'Importing'|'Creating', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the custom vocabulary.
botVersion (string) --
The version of the bot that contains the custom vocabulary to describe.
localeId (string) --
The locale that contains the custom vocabulary to describe.
customVocabularyStatus (string) --
The status of the custom vocabulary. If the status is Ready the custom vocabulary is ready to use.
creationDateTime (datetime) --
The date and time that the custom vocabulary was created.
lastUpdatedDateTime (datetime) --
The date and time that the custom vocabulary was last updated.
Removes a custom vocabulary from the specified locale in the specified bot.
See also: AWS API Documentation
Request Syntax
client.delete_custom_vocabulary( botId='string', botVersion='string', localeId='string' )
string
[REQUIRED]
The unique identifier of the bot to remove the custom vocabulary from.
string
[REQUIRED]
The version of the bot to remove the custom vocabulary from.
string
[REQUIRED]
The locale identifier for the locale that contains the custom vocabulary to remove.
dict
Response Syntax
{ 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'customVocabularyStatus': 'Ready'|'Deleting'|'Exporting'|'Importing'|'Creating' }
Response Structure
(dict) --
botId (string) --
The identifier of the bot that the custom vocabulary was removed from.
botVersion (string) --
The version of the bot that the custom vocabulary was removed from.
localeId (string) --
The locale identifier for the locale that the custom vocabulary was removed from.
customVocabularyStatus (string) --
The status of removing the custom vocabulary.
{'fileFormat': {'TSV'}, 'resourceSpecification': {'customVocabularyExportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}
Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.
You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.
For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots
See also: AWS API Documentation
Request Syntax
client.create_export( resourceSpecification={ 'botExportSpecification': { 'botId': 'string', 'botVersion': 'string' }, 'botLocaleExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' }, 'customVocabularyExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, fileFormat='LexJson'|'TSV', filePassword='string' )
dict
[REQUIRED]
Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.
botExportSpecification (dict) --
Parameters for exporting a bot.
botId (string) -- [REQUIRED]
The identifier of the bot assigned by Amazon Lex.
botVersion (string) -- [REQUIRED]
The version of the bot that was exported. This will be either DRAFT or the version number.
botLocaleExportSpecification (dict) --
Parameters for exporting a bot locale.
botId (string) -- [REQUIRED]
The identifier of the bot to create the locale for.
botVersion (string) -- [REQUIRED]
The version of the bot to export.
localeId (string) -- [REQUIRED]
The identifier of the language and locale to export. The string must match one of the locales in the bot.
customVocabularyExportSpecification (dict) --
The parameters required to export a custom vocabulary.
botId (string) -- [REQUIRED]
The identifier of the bot that contains the custom vocabulary to export.
botVersion (string) -- [REQUIRED]
The version of the bot that contains the custom vocabulary to export.
localeId (string) -- [REQUIRED]
The locale of the bot that contains the custom vocabulary to export.
string
[REQUIRED]
The file format of the bot or bot locale definition files.
string
An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.
dict
Response Syntax
{ 'exportId': 'string', 'resourceSpecification': { 'botExportSpecification': { 'botId': 'string', 'botVersion': 'string' }, 'botLocaleExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' }, 'customVocabularyExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'fileFormat': 'LexJson'|'TSV', 'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'creationDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
exportId (string) --
An identifier for a specific request to create an export.
resourceSpecification (dict) --
A description of the type of resource that was exported, either a bot or a bot locale.
botExportSpecification (dict) --
Parameters for exporting a bot.
botId (string) --
The identifier of the bot assigned by Amazon Lex.
botVersion (string) --
The version of the bot that was exported. This will be either DRAFT or the version number.
botLocaleExportSpecification (dict) --
Parameters for exporting a bot locale.
botId (string) --
The identifier of the bot to create the locale for.
botVersion (string) --
The version of the bot to export.
localeId (string) --
The identifier of the language and locale to export. The string must match one of the locales in the bot.
customVocabularyExportSpecification (dict) --
The parameters required to export a custom vocabulary.
botId (string) --
The identifier of the bot that contains the custom vocabulary to export.
botVersion (string) --
The version of the bot that contains the custom vocabulary to export.
localeId (string) --
The locale of the bot that contains the custom vocabulary to export.
fileFormat (string) --
The file format used for the bot or bot locale definition files.
exportStatus (string) --
The status of the export. When the status is Completed , you can use the DescribeExport operation to get the pre-signed S3 URL link to your exported bot or bot locale.
creationDateTime (datetime) --
The date and time that the request to export a bot was created.
{'valueSelectionSetting': {'advancedRecognitionSetting': {'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary'}}}
Creates a custom slot type
To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.
See also: AWS API Documentation
Request Syntax
client.create_slot_type( slotTypeName='string', description='string', slotTypeValues=[ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], valueSelectionSetting={ 'resolutionStrategy': 'OriginalValue'|'TopResolution', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, parentSlotTypeSignature='string', botId='string', botVersion='string', localeId='string', externalSourceSetting={ 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } } )
string
[REQUIRED]
The name for the slot. A slot type name must be unique within the account.
string
A description of the slot type. Use the description to help identify the slot type in lists.
list
A list of SlotTypeValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for a slot.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
dict
Determines the strategy that Amazon Lex uses to select a value from the list of possible values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list. If there is no resolution list, return null.
If you don't specify the valueSelectionSetting parameter, the default is OriginalValue .
resolutionStrategy (string) -- [REQUIRED]
Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) -- [REQUIRED]
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
string
The built-in slot type used as a parent of this slot type. When you define a parent slot type, the new slot type has the configuration of the parent slot type.
Only AMAZON.AlphaNumeric is supported.
string
[REQUIRED]
The identifier of the bot associated with this slot type.
string
[REQUIRED]
The identifier of the bot version associated with this slot type.
string
[REQUIRED]
The identifier of the language and locale that the slot type will be used in. The string must match one of the supported locales. All of the bots, intents, and slots used by the slot type must have the same locale. For more information, see Supported languages .
dict
Sets the type of external information used to create the slot type.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) -- [REQUIRED]
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) -- [REQUIRED]
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier assigned to the slot type. Use this to identify the slot type in the UpdateSlotType and DeleteSlotType operations.
slotTypeName (string) --
The name specified for the slot type.
description (string) --
The description specified for the slot type.
slotTypeValues (list) --
The list of values that the slot type can assume.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The strategy that Amazon Lex uses to select a value from the list of possible values.
resolutionStrategy (string) --
Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The signature of the base slot type specified for the slot type.
botId (string) --
The identifier for the bot associated with the slot type.
botVersion (string) --
The version of the bot associated with the slot type.
localeId (string) --
The specified language and local specified for the slot type.
creationDateTime (datetime) --
A timestamp of the date and time that the slot type was created.
externalSourceSetting (dict) --
The type of external information used to create the slot type.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
{'fileFormat': {'TSV'}, 'resourceSpecification': {'customVocabularyExportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}
Gets information about a specific export.
See also: AWS API Documentation
Request Syntax
client.describe_export( exportId='string' )
string
[REQUIRED]
The unique identifier of the export to describe.
dict
Response Syntax
{ 'exportId': 'string', 'resourceSpecification': { 'botExportSpecification': { 'botId': 'string', 'botVersion': 'string' }, 'botLocaleExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' }, 'customVocabularyExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'fileFormat': 'LexJson'|'TSV', 'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'failureReasons': [ 'string', ], 'downloadUrl': 'string', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
exportId (string) --
The unique identifier of the described export.
resourceSpecification (dict) --
The bot, bot ID, and optional locale ID of the exported bot or bot locale.
botExportSpecification (dict) --
Parameters for exporting a bot.
botId (string) --
The identifier of the bot assigned by Amazon Lex.
botVersion (string) --
The version of the bot that was exported. This will be either DRAFT or the version number.
botLocaleExportSpecification (dict) --
Parameters for exporting a bot locale.
botId (string) --
The identifier of the bot to create the locale for.
botVersion (string) --
The version of the bot to export.
localeId (string) --
The identifier of the language and locale to export. The string must match one of the locales in the bot.
customVocabularyExportSpecification (dict) --
The parameters required to export a custom vocabulary.
botId (string) --
The identifier of the bot that contains the custom vocabulary to export.
botVersion (string) --
The version of the bot that contains the custom vocabulary to export.
localeId (string) --
The locale of the bot that contains the custom vocabulary to export.
fileFormat (string) --
The file format used in the files that describe the resource.
exportStatus (string) --
The status of the export. When the status is Complete the export archive file is available for download.
failureReasons (list) --
If the exportStatus is failed, contains one or more reasons why the export could not be completed.
(string) --
downloadUrl (string) --
A pre-signed S3 URL that points to the bot or bot locale archive. The URL is only available for 5 minutes after calling the DescribeExport operation.
creationDateTime (datetime) --
The date and time that the export was created.
lastUpdatedDateTime (datetime) --
The last date and time that the export was updated.
{'resourceSpecification': {'customVocabularyImportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}
Gets information about a specific import.
See also: AWS API Documentation
Request Syntax
client.describe_import( importId='string' )
string
[REQUIRED]
The unique identifier of the import to describe.
dict
Response Syntax
{ 'importId': 'string', 'resourceSpecification': { 'botImportSpecification': { 'botName': 'string', 'roleArn': 'string', 'dataPrivacy': { 'childDirected': True|False }, 'idleSessionTTLInSeconds': 123, 'botTags': { 'string': 'string' }, 'testBotAliasTags': { 'string': 'string' } }, 'botLocaleImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'nluIntentConfidenceThreshold': 123.0, 'voiceSettings': { 'voiceId': 'string', 'engine': 'standard'|'neural' } }, 'customVocabularyImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'importedResourceId': 'string', 'importedResourceName': 'string', 'mergeStrategy': 'Overwrite'|'FailOnConflict'|'Append', 'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'failureReasons': [ 'string', ], 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
importId (string) --
The unique identifier of the described import.
resourceSpecification (dict) --
The specifications of the imported bot, bot locale, or custom vocabulary.
botImportSpecification (dict) --
Parameters for importing a bot.
botName (string) --
The name that Amazon Lex should use for the bot.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
dataPrivacy (dict) --
By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.
childDirected (boolean) --
For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .
idleSessionTTLInSeconds (integer) --
The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.
You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
botTags (dict) --
A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.
(string) --
(string) --
testBotAliasTags (dict) --
A list of tags to add to the test alias for a bot. You can only add tags when you import a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.
(string) --
(string) --
botLocaleImportSpecification (dict) --
Parameters for importing a bot locale.
botId (string) --
The identifier of the bot to import the locale to.
botVersion (string) --
The version of the bot to import the locale to. This can only be the DRAFT version of the bot.
localeId (string) --
The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages .
nluIntentConfidenceThreshold (float) --
Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent . Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:
AMAZON.FallbackIntent
IntentA
IntentB
IntentC
voiceSettings (dict) --
Defines settings for using an Amazon Polly voice to communicate with a user.
voiceId (string) --
The identifier of the Amazon Polly voice to use.
engine (string) --
Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the ` engine parameter of the SynthesizeSpeech operation <https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html#polly-SynthesizeSpeech-request-Engine>`__ in the Amazon Polly developer guide .
If you do not specify a value, the default is standard .
customVocabularyImportSpecification (dict) --
Provides the parameters required for importing a custom vocabulary.
botId (string) --
The identifier of the bot to import the custom vocabulary to.
botVersion (string) --
The version of the bot to import the custom vocabulary to.
localeId (string) --
The identifier of the local to import the custom vocabulary to. The value must be en_GB .
importedResourceId (string) --
The unique identifier that Amazon Lex assigned to the resource created by the import.
importedResourceName (string) --
The name of the imported resource.
mergeStrategy (string) --
The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
importStatus (string) --
The status of the import process. When the status is Completed the resource is imported and ready for use.
failureReasons (list) --
If the importStatus field is Failed , this provides one or more reasons for the failure.
(string) --
creationDateTime (datetime) --
The date and time that the import was created.
lastUpdatedDateTime (datetime) --
The date and time that the import was last updated.
{'valueSelectionSetting': {'advancedRecognitionSetting': {'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary'}}}
Gets metadata information about a slot type.
See also: AWS API Documentation
Request Syntax
client.describe_slot_type( slotTypeId='string', botId='string', botVersion='string', localeId='string' )
string
[REQUIRED]
The identifier of the slot type.
string
[REQUIRED]
The identifier of the bot associated with the slot type.
string
[REQUIRED]
The version of the bot associated with the slot type.
string
[REQUIRED]
The identifier of the language and locale of the slot type to describe. The string must match one of the supported locales. For more information, see Supported languages .
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier for the slot type.
slotTypeName (string) --
The name specified for the slot type.
description (string) --
The description specified for the slot type.
slotTypeValues (list) --
The values that the slot type can take. Includes any synonyms for the slot type values.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The strategy that Amazon Lex uses to choose a value from a list of possible values.
resolutionStrategy (string) --
Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The built in slot type used as a parent to this slot type.
botId (string) --
The identifier of the bot associated with the slot type.
botVersion (string) --
The version of the bot associated with the slot type.
localeId (string) --
The language and locale specified for the slot type.
creationDateTime (datetime) --
A timestamp of the date and time that the slot type was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
externalSourceSetting (dict) --
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
{'localeId': 'string'}Response
{'exportSummaries': {'fileFormat': {'TSV'}, 'resourceSpecification': {'customVocabularyExportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}, 'localeId': 'string'}
Lists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days.
See also: AWS API Documentation
Request Syntax
client.list_exports( botId='string', botVersion='string', sortBy={ 'attribute': 'LastUpdatedDateTime', 'order': 'Ascending'|'Descending' }, filters=[ { 'name': 'ExportResourceType', 'values': [ 'string', ], 'operator': 'CO'|'EQ' }, ], maxResults=123, nextToken='string', localeId='string' )
string
The unique identifier that Amazon Lex assigned to the bot.
string
The version of the bot to list exports for.
dict
Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.
attribute (string) -- [REQUIRED]
The export field to use for sorting.
order (string) -- [REQUIRED]
The order to sort the list.
list
Provides the specification of a filter used to limit the exports in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
(dict) --
Filters the response form the ListExports operation
name (string) -- [REQUIRED]
The name of the field to use for filtering.
values (list) -- [REQUIRED]
The values to use to filter the response. The values must be Bot , BotLocale , or CustomVocabulary .
(string) --
operator (string) -- [REQUIRED]
The operator to use for the filter. Specify EQ when the ListExports operation should return only resource types that equal the specified value. Specify CO when the ListExports operation should return resource types that contain the specified value.
integer
The maximum number of exports 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.
string
If the response from the ListExports operation contains more results that specified in the maxResults parameter, a token is returned in the response.
Use the returned token in the nextToken parameter of a ListExports request to return the next page of results. For a complete set of results, call the ListExports operation until the nextToken returned in the response is null.
string
Specifies the resources that should be exported. If you don't specify a resource type in the filters parameter, both bot locales and custom vocabularies are exported.
dict
Response Syntax
{ 'botId': 'string', 'botVersion': 'string', 'exportSummaries': [ { 'exportId': 'string', 'resourceSpecification': { 'botExportSpecification': { 'botId': 'string', 'botVersion': 'string' }, 'botLocaleExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' }, 'customVocabularyExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'fileFormat': 'LexJson'|'TSV', 'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1) }, ], 'nextToken': 'string', 'localeId': 'string' }
Response Structure
(dict) --
botId (string) --
The unique identifier assigned to the bot by Amazon Lex.
botVersion (string) --
The version of the bot that was exported.
exportSummaries (list) --
Summary information for the exports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more exports available, the nextToken field contains a token to get the next page of results.
(dict) --
Provides summary information about an export in an export list.
exportId (string) --
The unique identifier that Amazon Lex assigned to the export.
resourceSpecification (dict) --
Information about the bot or bot locale that was exported.
botExportSpecification (dict) --
Parameters for exporting a bot.
botId (string) --
The identifier of the bot assigned by Amazon Lex.
botVersion (string) --
The version of the bot that was exported. This will be either DRAFT or the version number.
botLocaleExportSpecification (dict) --
Parameters for exporting a bot locale.
botId (string) --
The identifier of the bot to create the locale for.
botVersion (string) --
The version of the bot to export.
localeId (string) --
The identifier of the language and locale to export. The string must match one of the locales in the bot.
customVocabularyExportSpecification (dict) --
The parameters required to export a custom vocabulary.
botId (string) --
The identifier of the bot that contains the custom vocabulary to export.
botVersion (string) --
The version of the bot that contains the custom vocabulary to export.
localeId (string) --
The locale of the bot that contains the custom vocabulary to export.
fileFormat (string) --
The file format used in the export files.
exportStatus (string) --
The status of the export. When the status is Completed the export is ready to download.
creationDateTime (datetime) --
The date and time that the export was created.
lastUpdatedDateTime (datetime) --
The date and time that the export was last updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListExports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListExports operation request to get the next page of results.
localeId (string) --
The locale specified in the request.
{'localeId': 'string'}Response
{'importSummaries': {'importedResourceType': 'Bot | BotLocale | ' 'CustomVocabulary'}, 'localeId': 'string'}
Lists the imports for a bot, bot locale, or custom vocabulary. Imports are kept in the list for 7 days.
See also: AWS API Documentation
Request Syntax
client.list_imports( botId='string', botVersion='string', sortBy={ 'attribute': 'LastUpdatedDateTime', 'order': 'Ascending'|'Descending' }, filters=[ { 'name': 'ImportResourceType', 'values': [ 'string', ], 'operator': 'CO'|'EQ' }, ], maxResults=123, nextToken='string', localeId='string' )
string
The unique identifier that Amazon Lex assigned to the bot.
string
The version of the bot to list imports for.
dict
Determines the field that the list of imports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.
attribute (string) -- [REQUIRED]
The export field to use for sorting.
order (string) -- [REQUIRED]
The order to sort the list.
list
Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
(dict) --
Filters the response from the ListImports operation.
name (string) -- [REQUIRED]
The name of the field to use for filtering.
values (list) -- [REQUIRED]
The values to use to filter the response. The values must be Bot , BotLocale , or CustomVocabulary .
(string) --
operator (string) -- [REQUIRED]
The operator to use for the filter. Specify EQ when the ListImports operation should return only resource types that equal the specified value. Specify CO when the ListImports operation should return resource types that contain the specified value.
integer
The maximum number of imports 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.
string
If the response from the ListImports operation contains more results than specified in the maxResults parameter, a token is returned in the response.
Use the returned token in the nextToken parameter of a ListImports request to return the next page of results. For a complete set of results, call the ListImports operation until the nextToken returned in the response is null.
string
Specifies the locale that should be present in the list. If you don't specify a resource type in the filters parameter, the list contains both bot locales and custom vocabularies.
dict
Response Syntax
{ 'botId': 'string', 'botVersion': 'string', 'importSummaries': [ { 'importId': 'string', 'importedResourceId': 'string', 'importedResourceName': 'string', 'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'mergeStrategy': 'Overwrite'|'FailOnConflict'|'Append', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1), 'importedResourceType': 'Bot'|'BotLocale'|'CustomVocabulary' }, ], 'nextToken': 'string', 'localeId': 'string' }
Response Structure
(dict) --
botId (string) --
The unique identifier assigned by Amazon Lex to the bot.
botVersion (string) --
The version of the bot that was imported. It will always be DRAFT .
importSummaries (list) --
Summary information for the imports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more imports available, the nextToken field contains a token to get the next page of results.
(dict) --
Provides summary information about an import in an import list.
importId (string) --
The unique identifier that Amazon Lex assigned to the import.
importedResourceId (string) --
The unique identifier that Amazon Lex assigned to the imported resource.
importedResourceName (string) --
The name that you gave the imported resource.
importStatus (string) --
The status of the resource. When the status is Completed the resource is ready to build.
mergeStrategy (string) --
The strategy used to merge existing bot or bot locale definitions with the imported definition.
creationDateTime (datetime) --
The date and time that the import was created.
lastUpdatedDateTime (datetime) --
The date and time that the import was last updated.
importedResourceType (string) --
The type of resource that was imported.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListImports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListImports operation request to get the next page of results.
localeId (string) --
The locale specified in the request.
{'resourceSpecification': {'customVocabularyImportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}
Starts importing a bot, bot locale, or custom vocabulary from a zip archive that you uploaded to an S3 bucket.
See also: AWS API Documentation
Request Syntax
client.start_import( importId='string', resourceSpecification={ 'botImportSpecification': { 'botName': 'string', 'roleArn': 'string', 'dataPrivacy': { 'childDirected': True|False }, 'idleSessionTTLInSeconds': 123, 'botTags': { 'string': 'string' }, 'testBotAliasTags': { 'string': 'string' } }, 'botLocaleImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'nluIntentConfidenceThreshold': 123.0, 'voiceSettings': { 'voiceId': 'string', 'engine': 'standard'|'neural' } }, 'customVocabularyImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, mergeStrategy='Overwrite'|'FailOnConflict'|'Append', filePassword='string' )
string
[REQUIRED]
The unique identifier for the import. It is included in the response from the CreateUploadUrl operation.
dict
[REQUIRED]
Parameters for creating the bot, bot locale or custom vocabulary.
botImportSpecification (dict) --
Parameters for importing a bot.
botName (string) -- [REQUIRED]
The name that Amazon Lex should use for the bot.
roleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
dataPrivacy (dict) -- [REQUIRED]
By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.
childDirected (boolean) -- [REQUIRED]
For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .
idleSessionTTLInSeconds (integer) --
The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.
You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
botTags (dict) --
A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.
(string) --
(string) --
testBotAliasTags (dict) --
A list of tags to add to the test alias for a bot. You can only add tags when you import a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.
(string) --
(string) --
botLocaleImportSpecification (dict) --
Parameters for importing a bot locale.
botId (string) -- [REQUIRED]
The identifier of the bot to import the locale to.
botVersion (string) -- [REQUIRED]
The version of the bot to import the locale to. This can only be the DRAFT version of the bot.
localeId (string) -- [REQUIRED]
The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages .
nluIntentConfidenceThreshold (float) --
Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent . Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:
AMAZON.FallbackIntent
IntentA
IntentB
IntentC
voiceSettings (dict) --
Defines settings for using an Amazon Polly voice to communicate with a user.
voiceId (string) -- [REQUIRED]
The identifier of the Amazon Polly voice to use.
engine (string) --
Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the ` engine parameter of the SynthesizeSpeech operation <https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html#polly-SynthesizeSpeech-request-Engine>`__ in the Amazon Polly developer guide .
If you do not specify a value, the default is standard .
customVocabularyImportSpecification (dict) --
Provides the parameters required for importing a custom vocabulary.
botId (string) -- [REQUIRED]
The identifier of the bot to import the custom vocabulary to.
botVersion (string) -- [REQUIRED]
The version of the bot to import the custom vocabulary to.
localeId (string) -- [REQUIRED]
The identifier of the local to import the custom vocabulary to. The value must be en_GB .
string
[REQUIRED]
The strategy to use when there is a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
string
The password used to encrypt the zip archive that contains the resource definition. You should always encrypt the zip archive to protect it during transit between your site and Amazon Lex.
dict
Response Syntax
{ 'importId': 'string', 'resourceSpecification': { 'botImportSpecification': { 'botName': 'string', 'roleArn': 'string', 'dataPrivacy': { 'childDirected': True|False }, 'idleSessionTTLInSeconds': 123, 'botTags': { 'string': 'string' }, 'testBotAliasTags': { 'string': 'string' } }, 'botLocaleImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'nluIntentConfidenceThreshold': 123.0, 'voiceSettings': { 'voiceId': 'string', 'engine': 'standard'|'neural' } }, 'customVocabularyImportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'mergeStrategy': 'Overwrite'|'FailOnConflict'|'Append', 'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'creationDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
importId (string) --
A unique identifier for the import.
resourceSpecification (dict) --
The parameters used when importing the resource.
botImportSpecification (dict) --
Parameters for importing a bot.
botName (string) --
The name that Amazon Lex should use for the bot.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
dataPrivacy (dict) --
By default, data stored by Amazon Lex is encrypted. The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.
childDirected (boolean) --
For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ .
idleSessionTTLInSeconds (integer) --
The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.
You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
botTags (dict) --
A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.
(string) --
(string) --
testBotAliasTags (dict) --
A list of tags to add to the test alias for a bot. You can only add tags when you import a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.
(string) --
(string) --
botLocaleImportSpecification (dict) --
Parameters for importing a bot locale.
botId (string) --
The identifier of the bot to import the locale to.
botVersion (string) --
The version of the bot to import the locale to. This can only be the DRAFT version of the bot.
localeId (string) --
The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages .
nluIntentConfidenceThreshold (float) --
Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent . Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:
AMAZON.FallbackIntent
IntentA
IntentB
IntentC
voiceSettings (dict) --
Defines settings for using an Amazon Polly voice to communicate with a user.
voiceId (string) --
The identifier of the Amazon Polly voice to use.
engine (string) --
Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the ` engine parameter of the SynthesizeSpeech operation <https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html#polly-SynthesizeSpeech-request-Engine>`__ in the Amazon Polly developer guide .
If you do not specify a value, the default is standard .
customVocabularyImportSpecification (dict) --
Provides the parameters required for importing a custom vocabulary.
botId (string) --
The identifier of the bot to import the custom vocabulary to.
botVersion (string) --
The version of the bot to import the custom vocabulary to.
localeId (string) --
The identifier of the local to import the custom vocabulary to. The value must be en_GB .
mergeStrategy (string) --
The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
importStatus (string) --
The current status of the import. When the status is Complete the bot, bot alias, or custom vocabulary is ready to use.
creationDateTime (datetime) --
The date and time that the import request was created.
{'fileFormat': {'TSV'}, 'resourceSpecification': {'customVocabularyExportSpecification': {'botId': 'string', 'botVersion': 'string', 'localeId': 'string'}}}
Updates the password used to protect an export zip archive.
The password is not required. If you don't supply a password, Amazon Lex generates a zip file that is not protected by a password. This is the archive that is available at the pre-signed S3 URL provided by the DescribeExport operation.
See also: AWS API Documentation
Request Syntax
client.update_export( exportId='string', filePassword='string' )
string
[REQUIRED]
The unique identifier Amazon Lex assigned to the export.
string
The new password to use to encrypt the export zip archive.
dict
Response Syntax
{ 'exportId': 'string', 'resourceSpecification': { 'botExportSpecification': { 'botId': 'string', 'botVersion': 'string' }, 'botLocaleExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' }, 'customVocabularyExportSpecification': { 'botId': 'string', 'botVersion': 'string', 'localeId': 'string' } }, 'fileFormat': 'LexJson'|'TSV', 'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
exportId (string) --
The unique identifier Amazon Lex assigned to the export.
resourceSpecification (dict) --
A description of the type of resource that was exported, either a bot or a bot locale.
botExportSpecification (dict) --
Parameters for exporting a bot.
botId (string) --
The identifier of the bot assigned by Amazon Lex.
botVersion (string) --
The version of the bot that was exported. This will be either DRAFT or the version number.
botLocaleExportSpecification (dict) --
Parameters for exporting a bot locale.
botId (string) --
The identifier of the bot to create the locale for.
botVersion (string) --
The version of the bot to export.
localeId (string) --
The identifier of the language and locale to export. The string must match one of the locales in the bot.
customVocabularyExportSpecification (dict) --
The parameters required to export a custom vocabulary.
botId (string) --
The identifier of the bot that contains the custom vocabulary to export.
botVersion (string) --
The version of the bot that contains the custom vocabulary to export.
localeId (string) --
The locale of the bot that contains the custom vocabulary to export.
fileFormat (string) --
The file format used for the files that define the resource. The TSV format is required to export a custom vocabulary only; otherwise use LexJson format.
exportStatus (string) --
The status of the export. When the status is Completed the export archive is available for download.
creationDateTime (datetime) --
The date and time that the export was created.
lastUpdatedDateTime (datetime) --
The date and time that the export was last updated.
{'valueSelectionSetting': {'advancedRecognitionSetting': {'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary'}}}
Updates the configuration of an existing slot type.
See also: AWS API Documentation
Request Syntax
client.update_slot_type( slotTypeId='string', slotTypeName='string', description='string', slotTypeValues=[ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], valueSelectionSetting={ 'resolutionStrategy': 'OriginalValue'|'TopResolution', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, parentSlotTypeSignature='string', botId='string', botVersion='string', localeId='string', externalSourceSetting={ 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } } )
string
[REQUIRED]
The unique identifier of the slot type to update.
string
[REQUIRED]
The new name of the slot type.
string
The new description of the slot type.
list
A new list of values and their optional synonyms that define the values that the slot type can take.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
dict
The strategy that Amazon Lex should use when deciding on a value from the list of slot type values.
resolutionStrategy (string) -- [REQUIRED]
Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) -- [REQUIRED]
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
string
The new built-in slot type that should be used as the parent of this slot type.
string
[REQUIRED]
The identifier of the bot that contains the slot type.
string
[REQUIRED]
The version of the bot that contains the slot type. Must be DRAFT .
string
[REQUIRED]
The identifier of the language and locale that contains the slot type. The string must match one of the supported locales. For more information, see Supported languages .
dict
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) -- [REQUIRED]
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) -- [REQUIRED]
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier of the updated slot type.
slotTypeName (string) --
The updated name of the slot type.
description (string) --
The updated description of the slot type.
slotTypeValues (list) --
The updated values that the slot type provides.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
resolutionStrategy (string) --
Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The updated signature of the built-in slot type that is the parent of this slot type.
botId (string) --
The identifier of the bot that contains the slot type.
botVersion (string) --
The version of the bot that contains the slot type. This is always DRAFT .
localeId (string) --
The language and locale of the updated slot type.
creationDateTime (datetime) --
The timestamp of the date and time that the slot type was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
externalSourceSetting (dict) --
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.