Table of Contents
LexModelsV2.
Client
¶A low-level client representing Amazon Lex Model Building V2 (Lex Models V2)
import boto3
client = boto3.client('lexv2-models')
These are the available methods:
build_bot_locale()
can_paginate()
close()
create_bot()
create_bot_alias()
create_bot_locale()
create_bot_version()
create_export()
create_intent()
create_resource_policy()
create_resource_policy_statement()
create_slot()
create_slot_type()
create_upload_url()
delete_bot()
delete_bot_alias()
delete_bot_locale()
delete_bot_version()
delete_custom_vocabulary()
delete_export()
delete_import()
delete_intent()
delete_resource_policy()
delete_resource_policy_statement()
delete_slot()
delete_slot_type()
delete_utterances()
describe_bot()
describe_bot_alias()
describe_bot_locale()
describe_bot_recommendation()
describe_bot_version()
describe_custom_vocabulary_metadata()
describe_export()
describe_import()
describe_intent()
describe_resource_policy()
describe_slot()
describe_slot_type()
get_paginator()
get_waiter()
list_aggregated_utterances()
list_bot_aliases()
list_bot_locales()
list_bot_recommendations()
list_bot_versions()
list_bots()
list_built_in_intents()
list_built_in_slot_types()
list_exports()
list_imports()
list_intents()
list_recommended_intents()
list_slot_types()
list_slots()
list_tags_for_resource()
search_associated_transcripts()
start_bot_recommendation()
start_import()
tag_resource()
untag_resource()
update_bot()
update_bot_alias()
update_bot_locale()
update_bot_recommendation()
update_export()
update_intent()
update_resource_policy()
update_slot()
update_slot_type()
build_bot_locale
(**kwargs)¶Builds a bot, its intents, and its slot types into a specific locale. A bot can be built into multiple locales. At runtime the locale is used to choose a specific build of the bot.
See also: AWS API Documentation
Request Syntax
response = client.build_bot_locale(
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The identifier of the bot to build. The identifier is returned in the response from the CreateBot operation.
[REQUIRED]
The version of the bot to build. This can only be the draft version of the bot.
[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 .
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
'lastBuildSubmittedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botId (string) --
The identifier of the specified bot.
botVersion (string) --
The version of the bot that was built. This is only the draft version of the bot.
localeId (string) --
The language and locale specified of where the bot can be used.
botLocaleStatus (string) --
The bot's build status. When the status is ReadyExpressTesting
you can test the bot using the utterances defined for the intents and slot types. When the status is Built
, the bot is ready for use and can be tested using any utterance.
lastBuildSubmittedDateTime (datetime) --
A timestamp indicating the date and time that the bot was last built for this locale.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
create_bot
(**kwargs)¶Creates an Amazon Lex conversational bot.
See also: AWS API Documentation
Request Syntax
response = client.create_bot(
botName='string',
description='string',
roleArn='string',
dataPrivacy={
'childDirected': True|False
},
idleSessionTTLInSeconds=123,
botTags={
'string': 'string'
},
testBotAliasTags={
'string': 'string'
}
)
[REQUIRED]
The name of the bot. The bot name must be unique in the account that creates the bot.
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
[REQUIRED]
Provides information on additional privacy protections Amazon Lex should use with the bot's data.
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 .
[REQUIRED]
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.
A list of tags to add to the bot. You can only add tags when you create a bot. You can't use the UpdateBot
operation to update tags. To update tags, use the TagResource
operation.
A list of tags to add to the test alias for a bot. You can only add tags when you create a bot. You can't use the UpdateAlias
operation to update tags. To update tags on the test alias, use the TagResource
operation.
dict
Response Syntax
{
'botId': 'string',
'botName': 'string',
'description': 'string',
'roleArn': 'string',
'dataPrivacy': {
'childDirected': True|False
},
'idleSessionTTLInSeconds': 123,
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'creationDateTime': datetime(2015, 1, 1),
'botTags': {
'string': 'string'
},
'testBotAliasTags': {
'string': 'string'
}
}
Response Structure
(dict) --
botId (string) --
A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.
botName (string) --
The name specified for the bot.
description (string) --
The description specified for the bot.
roleArn (string) --
The IAM role specified for the bot.
dataPrivacy (dict) --
The data privacy settings specified for the 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 session idle time specified for the bot.
botStatus (string) --
Shows the current status of the bot. The bot is first in the Creating
status. Once the bot is read for use, it changes to the Available
status. After the bot is created, you can use the Draft
version of the bot.
creationDateTime (datetime) --
A timestamp indicating the date and time that the bot was created.
botTags (dict) --
A list of tags associated with the bot.
testBotAliasTags (dict) --
A list of tags associated with the test alias for the bot.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_bot_alias
(**kwargs)¶Creates an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot without updating applications that use the bot.
For example, you can create an alias called "PROD" that your applications use to call the Amazon Lex bot.
See also: AWS API Documentation
Request Syntax
response = client.create_bot_alias(
botAliasName='string',
description='string',
botVersion='string',
botAliasLocaleSettings={
'string': {
'enabled': True|False,
'codeHookSpecification': {
'lambdaCodeHook': {
'lambdaARN': 'string',
'codeHookInterfaceVersion': 'string'
}
}
}
},
conversationLogSettings={
'textLogSettings': [
{
'enabled': True|False,
'destination': {
'cloudWatch': {
'cloudWatchLogGroupArn': 'string',
'logPrefix': 'string'
}
}
},
],
'audioLogSettings': [
{
'enabled': True|False,
'destination': {
's3Bucket': {
'kmsKeyArn': 'string',
's3BucketArn': 'string',
'logPrefix': 'string'
}
}
},
]
},
sentimentAnalysisSettings={
'detectSentiment': True|False
},
botId='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The alias to create. The name must be unique for the bot.
Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda function to run different functions in different locales.
Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
Determines whether the locale is enabled for the bot. If the value is false
, the locale isn't available for use.
Specifies the Lambda function that should be used in the locale.
Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot.
The Amazon Resource Name (ARN) of the Lambda function.
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3.
The Amazon CloudWatch Logs settings for logging text and metadata.
Defines settings to enable text conversation logs.
Determines whether conversation logs should be stored for an alias.
Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
The prefix of the log stream name within the log group that you specified
The Amazon S3 settings for logging audio to an S3 bucket.
Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
Determines whether audio logging in enabled for the bot.
The location of audio log files collected when conversation logging is enabled for a bot.
The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn
parameter of the CreateBot operation must have permission to write to this bucket.
The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
The S3 prefix to assign to audio log files.
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
[REQUIRED]
The unique identifier of the bot that the alias applies to.
A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the UpdateBotAlias
operation to update the tags on a bot alias. To update tags, use the TagResource
operation.
dict
Response Syntax
{
'botAliasId': 'string',
'botAliasName': 'string',
'description': 'string',
'botVersion': 'string',
'botAliasLocaleSettings': {
'string': {
'enabled': True|False,
'codeHookSpecification': {
'lambdaCodeHook': {
'lambdaARN': 'string',
'codeHookInterfaceVersion': 'string'
}
}
}
},
'conversationLogSettings': {
'textLogSettings': [
{
'enabled': True|False,
'destination': {
'cloudWatch': {
'cloudWatchLogGroupArn': 'string',
'logPrefix': 'string'
}
}
},
],
'audioLogSettings': [
{
'enabled': True|False,
'destination': {
's3Bucket': {
'kmsKeyArn': 'string',
's3BucketArn': 'string',
'logPrefix': 'string'
}
}
},
]
},
'sentimentAnalysisSettings': {
'detectSentiment': True|False
},
'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
'botId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
botAliasId (string) --
The unique identifier of the bot alias.
botAliasName (string) --
The name specified for the bot alias.
description (string) --
The description specified for the bot alias.
botVersion (string) --
The version of the bot associated with this alias.
botAliasLocaleSettings (dict) --
Configuration information for a specific locale.
(string) --
(dict) --
Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
enabled (boolean) --
Determines whether the locale is enabled for the bot. If the value is false
, the locale isn't available for use.
codeHookSpecification (dict) --
Specifies the Lambda function that should be used in the locale.
lambdaCodeHook (dict) --
Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot.
lambdaARN (string) --
The Amazon Resource Name (ARN) of the Lambda function.
codeHookInterfaceVersion (string) --
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
conversationLogSettings (dict) --
The conversation log settings specified for the alias.
textLogSettings (list) --
The Amazon CloudWatch Logs settings for logging text and metadata.
(dict) --
Defines settings to enable text conversation logs.
enabled (boolean) --
Determines whether conversation logs should be stored for an alias.
destination (dict) --
Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
cloudWatch (dict) --
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
cloudWatchLogGroupArn (string) --
The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
logPrefix (string) --
The prefix of the log stream name within the log group that you specified
audioLogSettings (list) --
The Amazon S3 settings for logging audio to an S3 bucket.
(dict) --
Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
enabled (boolean) --
Determines whether audio logging in enabled for the bot.
destination (dict) --
The location of audio log files collected when conversation logging is enabled for a bot.
s3Bucket (dict) --
The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn
parameter of the CreateBot operation must have permission to write to this bucket.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
s3BucketArn (string) --
The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
logPrefix (string) --
The S3 prefix to assign to audio log files.
sentimentAnalysisSettings (dict) --
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
detectSentiment (boolean) --
Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
botAliasStatus (string) --
The current status of the alias. The alias is first put into the Creating
state. When the alias is ready to be used, it is put into the Available
state. You can use the DescribeBotAlias
operation to get the current state of an alias.
botId (string) --
The unique identifier of the bot that this alias applies to.
creationDateTime (datetime) --
A Unix timestamp indicating the date and time that the bot alias was created.
tags (dict) --
A list of tags associated with the bot alias.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_bot_locale
(**kwargs)¶Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. You must add a locale to a bot before you can add intents and slot types to the bot.
See also: AWS API Documentation
Request Syntax
response = client.create_bot_locale(
botId='string',
botVersion='string',
localeId='string',
description='string',
nluIntentConfidenceThreshold=123.0,
voiceSettings={
'voiceId': 'string',
'engine': 'standard'|'neural'
}
)
[REQUIRED]
The identifier of the bot to create the locale for.
[REQUIRED]
The version of the bot to create the locale for. This can only be the draft version of the bot.
[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 .
[REQUIRED]
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 RecognizeText
operation would be:
The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.
The identifier of the Amazon Polly voice to use.
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
.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeName': 'string',
'localeId': 'string',
'description': 'string',
'nluIntentConfidenceThreshold': 123.0,
'voiceSettings': {
'voiceId': 'string',
'engine': 'standard'|'neural'
},
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
'creationDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botId (string) --
The specified bot identifier.
botVersion (string) --
The specified bot version.
localeName (string) --
The specified locale name.
localeId (string) --
The specified locale identifier.
description (string) --
The specified description of the bot locale.
nluIntentConfidenceThreshold (float) --
The specified confidence threshold for inserting the AMAZON.FallbackIntent
and AMAZON.KendraSearchIntent
intents.
voiceSettings (dict) --
The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the 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
.
botLocaleStatus (string) --
The status of the bot.
When the status is Creating
the bot locale is being configured. When the status is Building
Amazon Lex is building the bot for testing and use.
If the status of the bot is ReadyExpressTesting
, you can test the bot using the exact utterances specified in the bots' intents. When the bot is ready for full testing or to run, the status is Built
.
If there was a problem with building the bot, the status is Failed
. If the bot was saved but not built, the status is NotBuilt
.
creationDateTime (datetime) --
A timestamp specifying the date and time that the bot locale was created.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_bot_version
(**kwargs)¶Creates a new version of the bot based on the DRAFT
version. If the DRAFT
version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version, it returns the last created version.
When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1.
See also: AWS API Documentation
Request Syntax
response = client.create_bot_version(
botId='string',
description='string',
botVersionLocaleSpecification={
'string': {
'sourceBotVersion': 'string'
}
}
)
[REQUIRED]
The identifier of the bot to create the version for.
[REQUIRED]
Specifies the locales that Amazon Lex adds to this version. You can choose the Draft
version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.
The version of a bot used for a bot locale.
The version of a bot used for a bot locale.
dict
Response Syntax
{
'botId': 'string',
'description': 'string',
'botVersion': 'string',
'botVersionLocaleSpecification': {
'string': {
'sourceBotVersion': 'string'
}
},
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'creationDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botId (string) --
The bot identifier specified in the request.
description (string) --
The description of the version specified in the request.
botVersion (string) --
The version number assigned to the version.
botVersionLocaleSpecification (dict) --
The source versions used for each locale in the new version.
(string) --
(dict) --
The version of a bot used for a bot locale.
sourceBotVersion (string) --
The version of a bot used for a bot locale.
botStatus (string) --
When you send a request to create or update a bot, Amazon Lex sets the status response element to Creating
. After Amazon Lex builds the bot, it sets status to Available
. If Amazon Lex can't build the bot, it sets status to Failed
.
creationDateTime (datetime) --
A timestamp of the date and time that the version was created.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_export
(**kwargs)¶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
response = 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'
)
[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.
Parameters for exporting a bot.
The identifier of the bot assigned by Amazon Lex.
The version of the bot that was exported. This will be either DRAFT
or the version number.
Parameters for exporting a bot locale.
The identifier of the bot to create the locale for.
The version of the bot to export.
The identifier of the language and locale to export. The string must match one of the locales in the bot.
The parameters required to export a custom vocabulary.
The identifier of the bot that contains the custom vocabulary to export.
The version of the bot that contains the custom vocabulary to export.
The locale of the bot that contains the custom vocabulary to export.
[REQUIRED]
The file format of the bot or bot locale definition files.
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_intent
(**kwargs)¶Creates an intent.
To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza
intent.
When you create an intent, you must provide a name. You can optionally provide the following:
See also: AWS API Documentation
Request Syntax
response = client.create_intent(
intentName='string',
description='string',
parentIntentSignature='string',
sampleUtterances=[
{
'utterance': 'string'
},
],
dialogCodeHook={
'enabled': True|False
},
fulfillmentCodeHook={
'enabled': True|False,
'postFulfillmentStatusSpecification': {
'successResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'failureResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
}
},
'fulfillmentUpdatesSpecification': {
'active': True|False,
'startResponse': {
'delayInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'updateResponse': {
'frequencyInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutInSeconds': 123
}
},
intentConfirmationSetting={
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'declinationResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
intentClosingSetting={
'closingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
inputContexts=[
{
'name': 'string'
},
],
outputContexts=[
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
kendraConfiguration={
'kendraIndex': 'string',
'queryFilterStringEnabled': True|False,
'queryFilterString': 'string'
},
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.
An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".
In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.
For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant
to true
. You might find John's phone number and set the corresponding session attribute.
Enables the dialog code hook so that it processes user requests.
Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.
For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.
Indicates whether a Lambda function should be invoked to fulfill a specific intent.
Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent.
If the active
field is set to true, the startResponse
, updateResponse
, and timeoutInSeconds
fields are required.
Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Determines whether the user can interrupt the start message while it is playing.
Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Determines whether the user can interrupt an update message while it is playing.
The length of time that the fulfillment Lambda function should run before it times out.
Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza
intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
The maximum number of times the bot tries to elicit a response from the user using this prompt.
Indicates whether the user can interrupt a speech prompt from the bot.
Indicates how a message is selected from a message group among retries.
When the user answers "no" to the question defined in promptSpecification
, Amazon Lex responds with this response to acknowledge that the intent was canceled.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active
field isn't specified, the default is true.
Sets the response that Amazon Lex sends to the user when the intent is closed.
The response that Amazon Lex sends to the user when the intent is complete.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active
field isn't specified, the default is true.
A list of contexts that must be active for this intent to be considered by Amazon Lex.
When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.
A context can be automatically activated using the outputContexts
property or it can be set at runtime.
For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.
An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.
The name of a context that must be active for an intent to be selected by Amazon Lex.
The name of the context.
A lists of contexts that the intent activates when it is fulfilled.
You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.
When you use the outputContextsList
property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.
Describes a session context that is activated when an intent is fulfilled.
The name of the output context.
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
Configuration information required to use the AMAZON.KendraSearchIntent
intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent
intent is called when Amazon Lex can't determine another intent to invoke.
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .
[REQUIRED]
The identifier of the bot associated with this intent.
[REQUIRED]
The identifier of the version of the bot associated with this intent.
[REQUIRED]
The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see Supported languages .
dict
Response Syntax
{
'intentId': 'string',
'intentName': 'string',
'description': 'string',
'parentIntentSignature': 'string',
'sampleUtterances': [
{
'utterance': 'string'
},
],
'dialogCodeHook': {
'enabled': True|False
},
'fulfillmentCodeHook': {
'enabled': True|False,
'postFulfillmentStatusSpecification': {
'successResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'failureResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
}
},
'fulfillmentUpdatesSpecification': {
'active': True|False,
'startResponse': {
'delayInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'updateResponse': {
'frequencyInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutInSeconds': 123
}
},
'intentConfirmationSetting': {
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'declinationResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'intentClosingSetting': {
'closingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'inputContexts': [
{
'name': 'string'
},
],
'outputContexts': [
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
'kendraConfiguration': {
'kendraIndex': 'string',
'queryFilterStringEnabled': True|False,
'queryFilterString': 'string'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'creationDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
intentId (string) --
A unique identifier for the intent.
intentName (string) --
The name specified for the intent.
description (string) --
The description specified for the intent.
parentIntentSignature (string) --
The signature of the parent intent specified for the intent.
sampleUtterances (list) --
The sample utterances specified for the intent.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
dialogCodeHook (dict) --
The dialog Lambda function specified for the intent.
enabled (boolean) --
Enables the dialog code hook so that it processes user requests.
fulfillmentCodeHook (dict) --
The fulfillment Lambda function specified for the intent.
enabled (boolean) --
Indicates whether a Lambda function should be invoked to fulfill a specific intent.
postFulfillmentStatusSpecification (dict) --
Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
successResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
failureResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
timeoutResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
fulfillmentUpdatesSpecification (dict) --
Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
active (boolean) --
Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent.
If the active
field is set to true, the startResponse
, updateResponse
, and timeoutInSeconds
fields are required.
startResponse (dict) --
Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
delayInSeconds (integer) --
The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
messageGroups (list) --
One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt the start message while it is playing.
updateResponse (dict) --
Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
frequencyInSeconds (integer) --
The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
messageGroups (list) --
One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt an update message while it is playing.
timeoutInSeconds (integer) --
The length of time that the fulfillment Lambda function should run before it times out.
intentConfirmationSetting (dict) --
The confirmation setting specified for the intent.
promptSpecification (dict) --
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza
intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
declinationResponse (dict) --
When the user answers "no" to the question defined in promptSpecification
, Amazon Lex responds with this response to acknowledge that the intent was canceled.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active
field isn't specified, the default is true.
intentClosingSetting (dict) --
The closing setting specified for the intent.
closingResponse (dict) --
The response that Amazon Lex sends to the user when the intent is complete.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active
field isn't specified, the default is true.
inputContexts (list) --
The list of input contexts specified for the intent.
(dict) --
The name of a context that must be active for an intent to be selected by Amazon Lex.
name (string) --
The name of the context.
outputContexts (list) --
The list of output contexts specified for the intent.
(dict) --
Describes a session context that is activated when an intent is fulfilled.
name (string) --
The name of the output context.
timeToLiveInSeconds (integer) --
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
turnsToLive (integer) --
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
kendraConfiguration (dict) --
Configuration for searching a Amazon Kendra index specified for the intent.
kendraIndex (string) --
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
queryFilterStringEnabled (boolean) --
Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
queryFilterString (string) --
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .
botId (string) --
The identifier of the bot associated with the intent.
botVersion (string) --
The identifier of the version of the bot associated with the intent.
localeId (string) --
The locale that the intent is specified to use.
creationDateTime (datetime) --
A timestamp of the date and time that the intent was created.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_resource_policy
(**kwargs)¶Creates a new resource policy with the specified policy statements.
See also: AWS API Documentation
Request Syntax
response = client.create_resource_policy(
resourceArn='string',
policy='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
[REQUIRED]
A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference .
If the policy isn't valid, Amazon Lex returns a validation exception.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was attached to.
revisionId (string) --
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
create_resource_policy_statement
(**kwargs)¶Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added to the current resource policy. If a policy doesn't exist, a new policy is created.
You can't create a resource policy statement that allows cross-account access.
See also: AWS API Documentation
Request Syntax
response = client.create_resource_policy_statement(
resourceArn='string',
statementId='string',
effect='Allow'|'Deny',
principal=[
{
'service': 'string',
'arn': 'string'
},
],
action=[
'string',
],
condition={
'string': {
'string': 'string'
}
},
expectedRevisionId='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
[REQUIRED]
The name of the statement. The ID is the same as the Sid
IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid .
[REQUIRED]
Determines whether the statement allows or denies access to the resource.
[REQUIRED]
An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal .
The IAM principal that you allowing or denying access to an Amazon Lex action. You must provide a service
or an arn
, but not both in the same statement. For more information, see AWS JSON policy elements: Principal .
The name of the AWS service that should allowed or denied access to an Amazon Lex action.
The Amazon Resource Name (ARN) of the principal.
[REQUIRED]
The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2 .
Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.
For more information, see IAM JSON policy elements: Condition .
The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.
If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
revisionId (string) --
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
create_slot
(**kwargs)¶Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza
intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.
See also: AWS API Documentation
Request Syntax
response = client.create_slot(
slotName='string',
description='string',
slotTypeId='string',
valueElicitationSetting={
'defaultValueSpecification': {
'defaultValueList': [
{
'defaultValue': 'string'
},
]
},
'slotConstraint': 'Required'|'Optional',
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'sampleUtterances': [
{
'utterance': 'string'
},
],
'waitAndContinueSpecification': {
'waitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'continueResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'stillWaitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'frequencyInSeconds': 123,
'timeoutInSeconds': 123,
'allowInterrupt': True|False
},
'active': True|False
}
},
obfuscationSetting={
'obfuscationSettingType': 'None'|'DefaultObfuscation'
},
botId='string',
botVersion='string',
localeId='string',
intentId='string',
multipleValuesSetting={
'allowMultipleValues': True|False
}
)
[REQUIRED]
The name of the slot. Slot names must be unique within the bot that contains the slot.
[REQUIRED]
Specifies prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot.
A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
Specifies the default value to use when a user doesn't provide a value for a slot.
The default value to use when a user doesn't provide a value for a slot.
Specifies whether the slot is required or optional.
The prompt that Amazon Lex uses to elicit the slot value from the user.
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
The maximum number of times the bot tries to elicit a response from the user using this prompt.
Indicates whether the user can interrupt a speech prompt from the bot.
Indicates how a message is selected from a message group among retries.
If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
Indicates that the user can interrupt the response by speaking while the message is being played.
Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active
field isn't specified, the default is true.
Determines how slot values are used in Amazon CloudWatch logs. If the value of the obfuscationSetting
parameter is DefaultObfuscation
, slot values are obfuscated in the log output. If the value is None
, the actual value is present in the log output.
The default is to obfuscate values in the CloudWatch logs.
Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
[REQUIRED]
The identifier of the bot associated with the slot.
[REQUIRED]
The version of the bot associated with the slot.
[REQUIRED]
The identifier of the language and locale that the slot will be used in. The string must match one of the supported locales. All of the bots, intents, slot types used by the slot must have the same locale. For more information, see Supported languages .
[REQUIRED]
The identifier of the intent that contains the slot.
Indicates whether the slot returns multiple values in one response. Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the multipleValuesSetting
is not set, the default value is false
.
Indicates whether a slot can return multiple values. When true
, the slot may return more than one value in a response. When false
, the slot returns only a single value.
Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the allowMutlipleValues
is not set, the default value is false
.
dict
Response Syntax
{
'slotId': 'string',
'slotName': 'string',
'description': 'string',
'slotTypeId': 'string',
'valueElicitationSetting': {
'defaultValueSpecification': {
'defaultValueList': [
{
'defaultValue': 'string'
},
]
},
'slotConstraint': 'Required'|'Optional',
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'sampleUtterances': [
{
'utterance': 'string'
},
],
'waitAndContinueSpecification': {
'waitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'continueResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'stillWaitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'frequencyInSeconds': 123,
'timeoutInSeconds': 123,
'allowInterrupt': True|False
},
'active': True|False
}
},
'obfuscationSetting': {
'obfuscationSettingType': 'None'|'DefaultObfuscation'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'intentId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'multipleValuesSetting': {
'allowMultipleValues': True|False
}
}
Response Structure
(dict) --
slotId (string) --
The unique identifier associated with the slot. Use this to identify the slot when you update or delete it.
slotName (string) --
The name specified for the slot.
description (string) --
The description associated with the slot.
slotTypeId (string) --
The unique identifier of the slot type associated with this slot.
valueElicitationSetting (dict) --
The value elicitation settings specified for the slot.
defaultValueSpecification (dict) --
A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
defaultValueList (list) --
A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
(dict) --
Specifies the default value to use when a user doesn't provide a value for a slot.
defaultValue (string) --
The default value to use when a user doesn't provide a value for a slot.
slotConstraint (string) --
Specifies whether the slot is required or optional.
promptSpecification (dict) --
The prompt that Amazon Lex uses to elicit the slot value from the user.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
sampleUtterances (list) --
If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
waitAndContinueSpecification (dict) --
Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
waitingResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
continueResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
stillWaitingResponse (dict) --
A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
messageGroups (list) --
One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
frequencyInSeconds (integer) --
How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
timeoutInSeconds (integer) --
If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
allowInterrupt (boolean) --
Indicates that the user can interrupt the response by speaking while the message is being played.
active (boolean) --
Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active
field isn't specified, the default is true.
obfuscationSetting (dict) --
Indicates whether the slot is configured to obfuscate values in Amazon CloudWatch logs.
obfuscationSettingType (string) --
Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
botId (string) --
The unique identifier of the bot associated with the slot.
botVersion (string) --
The version of the bot associated with the slot.
localeId (string) --
The language and local specified for the slot.
intentId (string) --
The unique identifier of the intent associated with the slot.
creationDateTime (datetime) --
The timestamp of the date and time that the slot was created.
multipleValuesSetting (dict) --
Indicates whether the slot returns multiple values in one response.
allowMultipleValues (boolean) --
Indicates whether a slot can return multiple values. When true
, the slot may return more than one value in a response. When false
, the slot returns only a single value.
Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the allowMutlipleValues
is not set, the default value is false
.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_slot_type
(**kwargs)¶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
response = 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'
}
}
}
)
[REQUIRED]
The name for the slot. A slot type name must be unique within the account.
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.
Each slot type can have a set of values. Each SlotTypeValue
represents a value that the slot type can take.
The value of the slot type entry.
The value that can be used for a slot type.
Additional values related to the slot type entry.
Defines one of the values for a slot type.
The value that can be used for a slot type.
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
.
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:
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
A regular expression used to validate the value of a slot.
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:
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Provides settings that enable advanced recognition settings for slot values.
Enables using the slot values as a custom vocabulary for recognizing user utterances.
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.
[REQUIRED]
The identifier of the bot associated with this slot type.
[REQUIRED]
The identifier of the bot version associated with this slot type.
[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 .
Sets the type of external information used to create the slot type.
Settings required for a slot type based on a grammar that you provide.
The source of the grammar used to create the slot type.
The name of the S3 bucket that contains the grammar source.
The path to the grammar in the S3 bucket.
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:
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:
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
create_upload_url
()¶Gets a pre-signed S3 write URL that you use to upload the zip archive when importing a bot or a bot locale.
See also: AWS API Documentation
Request Syntax
response = client.create_upload_url()
{
'importId': 'string',
'uploadUrl': 'string'
}
Response Structure
An identifier for a unique import job. Use it when you call the StartImport operation.
A pre-signed S3 write URL. Upload the zip archive file that contains the definition of your bot or bot locale.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
delete_bot
(**kwargs)¶Deletes all versions of a bot, including the Draft
version. To delete a specific version, use the DeleteBotVersion
operation.
When you delete a bot, all of the resources contained in the bot are also deleted. Deleting a bot removes all locales, intents, slot, and slot types defined for the bot.
If a bot has an alias, the DeleteBot
operation returns a ResourceInUseException
exception. If you want to delete the bot and the alias, set the skipResourceInUseCheck
parameter to true
.
See also: AWS API Documentation
Request Syntax
response = client.delete_bot(
botId='string',
skipResourceInUseCheck=True|False
)
[REQUIRED]
The identifier of the bot to delete.
true
, Amazon Lex doesn't check to see if another resource, such as an alias, is using the bot before it is deleted.dict
Response Syntax
{
'botId': 'string',
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing'
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot that Amazon Lex is deleting.
botStatus (string) --
The current status of the bot. The status is Deleting
while the bot and its associated resources are being deleted.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_bot_alias
(**kwargs)¶Deletes the specified bot alias.
See also: AWS API Documentation
Request Syntax
response = client.delete_bot_alias(
botAliasId='string',
botId='string',
skipResourceInUseCheck=True|False
)
[REQUIRED]
The unique identifier of the bot alias to delete.
[REQUIRED]
The unique identifier of the bot associated with the alias to delete.
dict
Response Syntax
{
'botAliasId': 'string',
'botId': 'string',
'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed'
}
Response Structure
(dict) --
botAliasId (string) --
The unique identifier of the bot alias to delete.
botId (string) --
The unique identifier of the bot that contains the alias to delete.
botAliasStatus (string) --
The current status of the alias. The status is Deleting
while the alias is in the process of being deleted. Once the alias is deleted, it will no longer appear in the list of aliases returned by the ListBotAliases
operation.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_bot_locale
(**kwargs)¶Removes a locale from a bot.
When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted.
See also: AWS API Documentation
Request Syntax
response = client.delete_bot_locale(
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The unique identifier of the bot that contains the locale.
[REQUIRED]
The version of the bot that contains the locale.
[REQUIRED]
The identifier of the language and locale that will be deleted. The string must match one of the supported locales. For more information, see Supported languages .
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contained the deleted locale.
botVersion (string) --
The version of the bot that contained the deleted locale.
localeId (string) --
The language and locale of the deleted locale.
botLocaleStatus (string) --
The status of deleting the bot locale. The locale first enters the Deleting
status. Once the locale is deleted it no longer appears in the list of locales for the bot.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
delete_bot_version
(**kwargs)¶Deletes a specific version of a bot. To delete all version of a bot, use the DeleteBot operation.
See also: AWS API Documentation
Request Syntax
response = client.delete_bot_version(
botId='string',
botVersion='string',
skipResourceInUseCheck=True|False
)
[REQUIRED]
The identifier of the bot that contains the version.
[REQUIRED]
The version of the bot to delete.
DeleteBotVersion
operations throws a ResourceInUseException
exception if you try to delete a bot version that has an alias pointing at it. Set the skipResourceInUseCheck
parameter to true
to skip this check and remove the version even if an alias points to it.dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that is being deleted.
botVersion (string) --
The version of the bot that is being deleted.
botStatus (string) --
The current status of the bot.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_custom_vocabulary
(**kwargs)¶Removes a custom vocabulary from the specified locale in the specified bot.
See also: AWS API Documentation
Request Syntax
response = client.delete_custom_vocabulary(
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The unique identifier of the bot to remove the custom vocabulary from.
[REQUIRED]
The version of the bot to remove the custom vocabulary from.
[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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
delete_export
(**kwargs)¶Removes a previous export and the associated files stored in an S3 bucket.
See also: AWS API Documentation
Request Syntax
response = client.delete_export(
exportId='string'
)
[REQUIRED]
The unique identifier of the export to delete.
{
'exportId': 'string',
'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting'
}
Response Structure
The unique identifier of the deleted export.
The current status of the deletion. When the deletion is complete, the export will no longer be returned by the ListExports operation and calls to the DescribeExport operation with the export identifier will fail.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_import
(**kwargs)¶Removes a previous import and the associated file stored in an S3 bucket.
See also: AWS API Documentation
Request Syntax
response = client.delete_import(
importId='string'
)
[REQUIRED]
The unique identifier of the import to delete.
{
'importId': 'string',
'importStatus': 'InProgress'|'Completed'|'Failed'|'Deleting'
}
Response Structure
The unique identifier of the deleted import.
The current status of the deletion. When the deletion is complete, the import will no longer be returned by the ListImports operation and calls to the DescribeImport operation with the import identifier will fail.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_intent
(**kwargs)¶Removes the specified intent.
Deleting an intent also deletes the slots associated with the intent.
See also: AWS API Documentation
Request Syntax
response = client.delete_intent(
intentId='string',
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The unique identifier of the intent to delete.
[REQUIRED]
The identifier of the bot associated with the intent.
[REQUIRED]
The version of the bot associated with the intent.
[REQUIRED]
The identifier of the language and locale where the bot will be deleted. The string must match one of the supported locales. For more information, see Supported languages .
None
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_resource_policy
(**kwargs)¶Removes an existing policy from a bot or bot alias. If the resource doesn't have a policy attached, Amazon Lex returns an exception.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_policy(
resourceArn='string',
expectedRevisionId='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that has the resource policy attached.
The identifier of the revision to edit. If this ID doesn't match the current revision number, Amazon Lex returns an exception
If you don't specify a revision ID, Amazon Lex will delete the current policy.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was deleted from.
revisionId (string) --
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
delete_resource_policy_statement
(**kwargs)¶Deletes a policy statement from a resource policy. If you delete the last statement from a policy, the policy is deleted. If you specify a statement ID that doesn't exist in the policy, or if the bot or bot alias doesn't have a policy attached, Amazon Lex returns an exception.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_policy_statement(
resourceArn='string',
statementId='string',
expectedRevisionId='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
[REQUIRED]
The name of the statement (SID) to delete from the policy.
The identifier of the revision of the policy to delete the statement from. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.
If you don't specify a revision, Amazon Lex removes the current contents of the statement.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy statement was removed from.
revisionId (string) --
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
delete_slot
(**kwargs)¶Deletes the specified slot from an intent.
See also: AWS API Documentation
Request Syntax
response = client.delete_slot(
slotId='string',
botId='string',
botVersion='string',
localeId='string',
intentId='string'
)
[REQUIRED]
The identifier of the slot to delete.
[REQUIRED]
The identifier of the bot associated with the slot to delete.
[REQUIRED]
The version of the bot associated with the slot to delete.
[REQUIRED]
The identifier of the language and locale that the slot will be deleted from. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The identifier of the intent associated with the slot.
None
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_slot_type
(**kwargs)¶Deletes a slot type from a bot locale.
If a slot is using the slot type, Amazon Lex throws a ResourceInUseException
exception. To avoid the exception, set the skipResourceInUseCheck
parameter to true
.
See also: AWS API Documentation
Request Syntax
response = client.delete_slot_type(
slotTypeId='string',
botId='string',
botVersion='string',
localeId='string',
skipResourceInUseCheck=True|False
)
[REQUIRED]
The identifier of the slot type to delete.
[REQUIRED]
The identifier of the bot associated with the slot type.
[REQUIRED]
The version of the bot associated with the slot type.
[REQUIRED]
The identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see Supported languages .
DeleteSlotType
operations throws a ResourceInUseException
exception if you try to delete a slot type used by a slot. Set the skipResourceInUseCheck
parameter to true
to skip this check and remove the slot type even if a slot uses it.None
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.InternalServerException
delete_utterances
(**kwargs)¶Deletes stored utterances.
Amazon Lex stores the utterances that users send to your bot. Utterances are stored for 15 days for use with the ListAggregatedUtterances operation, and then stored indefinitely for use in improving the ability of your bot to respond to user input..
Use the DeleteUtterances
operation to manually delete utterances for a specific session. When you use the DeleteUtterances
operation, utterances stored for improving your bot's ability to respond to user input are deleted immediately. Utterances stored for use with the ListAggregatedUtterances
operation are deleted after 15 days.
See also: AWS API Documentation
Request Syntax
response = client.delete_utterances(
botId='string',
localeId='string',
sessionId='string'
)
[REQUIRED]
The unique identifier of the bot that contains the utterances.
dict
Response Syntax
{}
Response Structure
Exceptions
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.InternalServerException
describe_bot
(**kwargs)¶Provides metadata information about a bot.
See also: AWS API Documentation
Request Syntax
response = client.describe_bot(
botId='string'
)
[REQUIRED]
The unique identifier of the bot to describe.
{
'botId': 'string',
'botName': 'string',
'description': 'string',
'roleArn': 'string',
'dataPrivacy': {
'childDirected': True|False
},
'idleSessionTTLInSeconds': 123,
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
The unique identifier of the bot.
The name of the bot.
The description of the bot.
The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
Settings for managing data privacy of the bot and its conversations with users.
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 .
The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
The current status of the bot. When the status is Available
the bot is ready to be used in conversations with users.
A timestamp of the date and time that the bot was created.
A timestamp of the date and time that the bot was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_bot_alias
(**kwargs)¶Get information about a specific bot alias.
See also: AWS API Documentation
Request Syntax
response = client.describe_bot_alias(
botAliasId='string',
botId='string'
)
[REQUIRED]
The identifier of the bot alias to describe.
[REQUIRED]
The identifier of the bot associated with the bot alias to describe.
dict
Response Syntax
{
'botAliasId': 'string',
'botAliasName': 'string',
'description': 'string',
'botVersion': 'string',
'botAliasLocaleSettings': {
'string': {
'enabled': True|False,
'codeHookSpecification': {
'lambdaCodeHook': {
'lambdaARN': 'string',
'codeHookInterfaceVersion': 'string'
}
}
}
},
'conversationLogSettings': {
'textLogSettings': [
{
'enabled': True|False,
'destination': {
'cloudWatch': {
'cloudWatchLogGroupArn': 'string',
'logPrefix': 'string'
}
}
},
],
'audioLogSettings': [
{
'enabled': True|False,
'destination': {
's3Bucket': {
'kmsKeyArn': 'string',
's3BucketArn': 'string',
'logPrefix': 'string'
}
}
},
]
},
'sentimentAnalysisSettings': {
'detectSentiment': True|False
},
'botAliasHistoryEvents': [
{
'botVersion': 'string',
'startDate': datetime(2015, 1, 1),
'endDate': datetime(2015, 1, 1)
},
],
'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
'botId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botAliasId (string) --
The identifier of the bot alias.
botAliasName (string) --
The name of the bot alias.
description (string) --
The description of the bot alias.
botVersion (string) --
The version of the bot associated with the bot alias.
botAliasLocaleSettings (dict) --
The locale settings that are unique to the alias.
(string) --
(dict) --
Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
enabled (boolean) --
Determines whether the locale is enabled for the bot. If the value is false
, the locale isn't available for use.
codeHookSpecification (dict) --
Specifies the Lambda function that should be used in the locale.
lambdaCodeHook (dict) --
Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot.
lambdaARN (string) --
The Amazon Resource Name (ARN) of the Lambda function.
codeHookInterfaceVersion (string) --
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
conversationLogSettings (dict) --
Specifics of how Amazon Lex logs text and audio conversations with the bot associated with the alias.
textLogSettings (list) --
The Amazon CloudWatch Logs settings for logging text and metadata.
(dict) --
Defines settings to enable text conversation logs.
enabled (boolean) --
Determines whether conversation logs should be stored for an alias.
destination (dict) --
Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
cloudWatch (dict) --
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
cloudWatchLogGroupArn (string) --
The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
logPrefix (string) --
The prefix of the log stream name within the log group that you specified
audioLogSettings (list) --
The Amazon S3 settings for logging audio to an S3 bucket.
(dict) --
Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
enabled (boolean) --
Determines whether audio logging in enabled for the bot.
destination (dict) --
The location of audio log files collected when conversation logging is enabled for a bot.
s3Bucket (dict) --
The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn
parameter of the CreateBot operation must have permission to write to this bucket.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
s3BucketArn (string) --
The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
logPrefix (string) --
The S3 prefix to assign to audio log files.
sentimentAnalysisSettings (dict) --
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
detectSentiment (boolean) --
Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
botAliasHistoryEvents (list) --
A list of events that affect a bot alias. For example, an event is recorded when the version that the alias points to changes.
(dict) --
Provides a record of an event that affects a bot alias. For example, when the version of a bot that the alias points to changes.
botVersion (string) --
The version of the bot that was used in the event.
startDate (datetime) --
The date and time that the event started.
endDate (datetime) --
The date and time that the event ended.
botAliasStatus (string) --
The current status of the alias. When the alias is Available
, the alias is ready for use with your bot.
botId (string) --
The identifier of the bot associated with the bot alias.
creationDateTime (datetime) --
A timestamp of the date and time that the alias was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the alias was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_bot_locale
(**kwargs)¶Describes the settings that a bot has for a specific locale.
See also: AWS API Documentation
Request Syntax
response = client.describe_bot_locale(
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The identifier of the bot associated with the locale.
[REQUIRED]
The identifier of the version of the bot associated with the locale.
[REQUIRED]
The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages .
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'localeName': 'string',
'description': 'string',
'nluIntentConfidenceThreshold': 123.0,
'voiceSettings': {
'voiceId': 'string',
'engine': 'standard'|'neural'
},
'intentsCount': 123,
'slotTypesCount': 123,
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
'failureReasons': [
'string',
],
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'lastBuildSubmittedDateTime': datetime(2015, 1, 1),
'botLocaleHistoryEvents': [
{
'event': 'string',
'eventDate': datetime(2015, 1, 1)
},
],
'recommendedActions': [
'string',
]
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot associated with the locale.
botVersion (string) --
The identifier of the version of the bot associated with the locale.
localeId (string) --
The unique identifier of the described locale.
localeName (string) --
The name of the locale.
description (string) --
The description of the locale.
nluIntentConfidenceThreshold (float) --
The confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent
and AMAZON.KendraSearchIntent
intents in the list of possible intents for an utterance.
voiceSettings (dict) --
The Amazon Polly voice Amazon Lex uses for voice interaction with the 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
.
intentsCount (integer) --
The number of intents defined for the locale.
slotTypesCount (integer) --
The number of slot types defined for the locale.
botLocaleStatus (string) --
The status of the bot. If the status is Failed
, the reasons for the failure are listed in the failureReasons
field.
failureReasons (list) --
if botLocaleStatus
is Failed
, Amazon Lex explains why it failed to build the bot.
creationDateTime (datetime) --
The date and time that the locale was created.
lastUpdatedDateTime (datetime) --
The date and time that the locale was last updated.
lastBuildSubmittedDateTime (datetime) --
The date and time that the locale was last submitted for building.
botLocaleHistoryEvents (list) --
History of changes, such as when a locale is used in an alias, that have taken place for the locale.
(dict) --
Provides information about an event that occurred affecting the bot locale.
event (string) --
A description of the event that occurred.
eventDate (datetime) --
A timestamp of the date and time that the event occurred.
recommendedActions (list) --
Recommended actions to take to resolve an error in the failureReasons
field.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_bot_recommendation
(**kwargs)¶Provides metadata information about a bot recommendation. This information will enable you to get a description on the request inputs, to download associated transcripts after processing is complete, and to download intents and slot-types generated by the bot recommendation.
See also: AWS API Documentation
Request Syntax
response = client.describe_bot_recommendation(
botId='string',
botVersion='string',
localeId='string',
botRecommendationId='string'
)
[REQUIRED]
The unique identifier of the bot associated with the bot recommendation.
[REQUIRED]
The version of the bot associated with the bot recommendation.
[REQUIRED]
The identifier of the language and locale of the bot recommendation to describe. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The identifier of the bot recommendation to describe.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
'botRecommendationId': 'string',
'failureReasons': [
'string',
],
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'transcriptSourceSetting': {
's3BucketTranscriptSource': {
's3BucketName': 'string',
'pathFormat': {
'objectPrefixes': [
'string',
]
},
'transcriptFormat': 'Lex',
'transcriptFilter': {
'lexTranscriptFilter': {
'dateRangeFilter': {
'startDateTime': datetime(2015, 1, 1),
'endDateTime': datetime(2015, 1, 1)
}
}
},
'kmsKeyArn': 'string'
}
},
'encryptionSetting': {
'kmsKeyArn': 'string',
'botLocaleExportPassword': 'string',
'associatedTranscriptsPassword': 'string'
},
'botRecommendationResults': {
'botLocaleExportUrl': 'string',
'associatedTranscriptsUrl': 'string',
'statistics': {
'intents': {
'discoveredIntentCount': 123
},
'slotTypes': {
'discoveredSlotTypeCount': 123
}
}
}
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot associated with the bot recommendation.
botVersion (string) --
The version of the bot associated with the bot recommendation.
localeId (string) --
The identifier of the language and locale of the bot recommendation to describe.
botRecommendationStatus (string) --
The status of the bot recommendation. If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
botRecommendationId (string) --
The identifier of the bot recommendation being described.
failureReasons (list) --
If botRecommendationStatus is Failed, Amazon Lex explains why.
creationDateTime (datetime) --
The date and time that the bot recommendation was created.
lastUpdatedDateTime (datetime) --
The date and time that the bot recommendation was last updated.
transcriptSourceSetting (dict) --
The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
s3BucketTranscriptSource (dict) --
Indicates the setting of the Amazon S3 bucket where the transcript is stored.
s3BucketName (string) --
The name of the bucket containing the transcript and the associated metadata.
pathFormat (dict) --
The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.
objectPrefixes (list) --
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
transcriptFormat (string) --
The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.
transcriptFilter (dict) --
The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.
lexTranscriptFilter (dict) --
The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.
dateRangeFilter (dict) --
The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.
startDateTime (datetime) --
A timestamp indicating the start date for the date range filter.
endDateTime (datetime) --
A timestamp indicating the end date for the date range filter.
kmsKeyArn (string) --
The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.
encryptionSetting (dict) --
The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
kmsKeyArn (string) --
The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
botLocaleExportPassword (string) --
The password used to encrypt the recommended bot recommendation file.
associatedTranscriptsPassword (string) --
The password used to encrypt the associated transcript file.
botRecommendationResults (dict) --
The object representing the URL of the bot definition, the URL of the associated transcript and a statistical summary of the bot recommendation results.
botLocaleExportUrl (string) --
The presigned URL link of the recommended bot definition.
associatedTranscriptsUrl (string) --
The presigned url link of the associated transcript.
statistics (dict) --
The statistical summary of the bot recommendation results.
intents (dict) --
Statistical information about about the intents associated with the bot recommendation results.
discoveredIntentCount (integer) --
The number of recommended intents associated with the bot recommendation.
slotTypes (dict) --
Statistical information about the slot types associated with the bot recommendation results.
discoveredSlotTypeCount (integer) --
The number of recommended slot types associated with the bot recommendation.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_bot_version
(**kwargs)¶Provides metadata about a version of a bot.
See also: AWS API Documentation
Request Syntax
response = client.describe_bot_version(
botId='string',
botVersion='string'
)
[REQUIRED]
The identifier of the bot containing the version to return metadata for.
[REQUIRED]
The version of the bot to return metadata for.
dict
Response Syntax
{
'botId': 'string',
'botName': 'string',
'botVersion': 'string',
'description': 'string',
'roleArn': 'string',
'dataPrivacy': {
'childDirected': True|False
},
'idleSessionTTLInSeconds': 123,
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'failureReasons': [
'string',
],
'creationDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the version.
botName (string) --
The name of the bot that contains the version.
botVersion (string) --
The version of the bot to describe.
description (string) --
The description specified for the bot.
roleArn (string) --
The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot version.
dataPrivacy (dict) --
Data privacy settings for the bot version.
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 number of seconds that a session with the bot remains active before it is discarded by Amazon Lex.
botStatus (string) --
The current status of the bot. When the status is Available
, the bot version is ready for use.
failureReasons (list) --
If the botStatus
is Failed
, this contains a list of reasons that the version couldn't be built.
creationDateTime (datetime) --
A timestamp of the date and time that the bot version was created.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_custom_vocabulary_metadata
(**kwargs)¶Provides metadata information about a custom vocabulary.
See also: AWS API Documentation
Request Syntax
response = client.describe_custom_vocabulary_metadata(
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The unique identifier of the bot that contains the custom vocabulary.
[REQUIRED]
The bot version of the bot to return metadata for.
[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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_export
(**kwargs)¶Gets information about a specific export.
See also: AWS API Documentation
Request Syntax
response = client.describe_export(
exportId='string'
)
[REQUIRED]
The unique identifier of the export to describe.
{
'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
The unique identifier of the described export.
The bot, bot ID, and optional locale ID of the exported bot or bot locale.
Parameters for exporting a bot.
The identifier of the bot assigned by Amazon Lex.
The version of the bot that was exported. This will be either DRAFT
or the version number.
Parameters for exporting a bot locale.
The identifier of the bot to create the locale for.
The version of the bot to export.
The identifier of the language and locale to export. The string must match one of the locales in the bot.
The parameters required to export a custom vocabulary.
The identifier of the bot that contains the custom vocabulary to export.
The version of the bot that contains the custom vocabulary to export.
The locale of the bot that contains the custom vocabulary to export.
The file format used in the files that describe the resource.
The status of the export. When the status is Complete
the export archive file is available for download.
If the exportStatus
is failed, contains one or more reasons why the export could not be completed.
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.
The date and time that the export was created.
The last date and time that the export was updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_import
(**kwargs)¶Gets information about a specific import.
See also: AWS API Documentation
Request Syntax
response = client.describe_import(
importId='string'
)
[REQUIRED]
The unique identifier of the import to describe.
{
'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
The unique identifier of the described import.
The specifications of the imported bot, bot locale, or custom vocabulary.
Parameters for importing a bot.
The name that Amazon Lex should use for the bot.
The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
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.
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 .
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.
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.
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.
Parameters for importing a bot locale.
The identifier of the bot to import the locale to.
The version of the bot to import the locale to. This can only be the DRAFT
version of the bot.
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 .
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
Defines settings for using an Amazon Polly voice to communicate with a user.
The identifier of the Amazon Polly voice to use.
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
.
Provides the parameters required for importing a custom vocabulary.
The identifier of the bot to import the custom vocabulary to.
The version of the bot to import the custom vocabulary to.
The identifier of the local to import the custom vocabulary to. The value must be en_GB
.
The unique identifier that Amazon Lex assigned to the resource created by the import.
The name of the imported resource.
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.
The status of the import process. When the status is Completed
the resource is imported and ready for use.
If the importStatus
field is Failed
, this provides one or more reasons for the failure.
The date and time that the import was created.
The date and time that the import was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_intent
(**kwargs)¶Returns metadata about an intent.
See also: AWS API Documentation
Request Syntax
response = client.describe_intent(
intentId='string',
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The identifier of the intent to describe.
[REQUIRED]
The identifier of the bot associated with the intent.
[REQUIRED]
The version of the bot associated with the intent.
[REQUIRED]
The identifier of the language and locale of the intent to describe. The string must match one of the supported locales. For more information, see Supported languages .
dict
Response Syntax
{
'intentId': 'string',
'intentName': 'string',
'description': 'string',
'parentIntentSignature': 'string',
'sampleUtterances': [
{
'utterance': 'string'
},
],
'dialogCodeHook': {
'enabled': True|False
},
'fulfillmentCodeHook': {
'enabled': True|False,
'postFulfillmentStatusSpecification': {
'successResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'failureResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
}
},
'fulfillmentUpdatesSpecification': {
'active': True|False,
'startResponse': {
'delayInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'updateResponse': {
'frequencyInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutInSeconds': 123
}
},
'slotPriorities': [
{
'priority': 123,
'slotId': 'string'
},
],
'intentConfirmationSetting': {
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'declinationResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'intentClosingSetting': {
'closingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'inputContexts': [
{
'name': 'string'
},
],
'outputContexts': [
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
'kendraConfiguration': {
'kendraIndex': 'string',
'queryFilterStringEnabled': True|False,
'queryFilterString': 'string'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
intentId (string) --
The unique identifier assigned to the intent when it was created.
intentName (string) --
The name specified for the intent.
description (string) --
The description of the intent.
parentIntentSignature (string) --
The identifier of the built-in intent that this intent is derived from, if any.
sampleUtterances (list) --
User utterances that trigger this intent.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
dialogCodeHook (dict) --
The Lambda function called during each turn of a conversation with the intent.
enabled (boolean) --
Enables the dialog code hook so that it processes user requests.
fulfillmentCodeHook (dict) --
The Lambda function called when the intent is complete and ready for fulfillment.
enabled (boolean) --
Indicates whether a Lambda function should be invoked to fulfill a specific intent.
postFulfillmentStatusSpecification (dict) --
Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
successResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
failureResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
timeoutResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
fulfillmentUpdatesSpecification (dict) --
Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
active (boolean) --
Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent.
If the active
field is set to true, the startResponse
, updateResponse
, and timeoutInSeconds
fields are required.
startResponse (dict) --
Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
delayInSeconds (integer) --
The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
messageGroups (list) --
One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt the start message while it is playing.
updateResponse (dict) --
Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
frequencyInSeconds (integer) --
The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
messageGroups (list) --
One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt an update message while it is playing.
timeoutInSeconds (integer) --
The length of time that the fulfillment Lambda function should run before it times out.
slotPriorities (list) --
The list that determines the priority that slots should be elicited from the user.
(dict) --
Sets the priority that Amazon Lex should use when eliciting slot values from a user.
priority (integer) --
The priority that a slot should be elicited.
slotId (string) --
The unique identifier of the slot.
intentConfirmationSetting (dict) --
Prompts that Amazon Lex sends to the user to confirm completion of an intent.
promptSpecification (dict) --
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza
intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
declinationResponse (dict) --
When the user answers "no" to the question defined in promptSpecification
, Amazon Lex responds with this response to acknowledge that the intent was canceled.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active
field isn't specified, the default is true.
intentClosingSetting (dict) --
The response that Amazon Lex sends to when the intent is closed.
closingResponse (dict) --
The response that Amazon Lex sends to the user when the intent is complete.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active
field isn't specified, the default is true.
inputContexts (list) --
A list of contexts that must be active for the intent to be considered for sending to the user.
(dict) --
The name of a context that must be active for an intent to be selected by Amazon Lex.
name (string) --
The name of the context.
outputContexts (list) --
A list of contexts that are activated when the intent is fulfilled.
(dict) --
Describes a session context that is activated when an intent is fulfilled.
name (string) --
The name of the output context.
timeToLiveInSeconds (integer) --
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
turnsToLive (integer) --
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
kendraConfiguration (dict) --
Configuration information required to use the AMAZON.KendraSearchIntent
intent.
kendraIndex (string) --
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
queryFilterStringEnabled (boolean) --
Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
queryFilterString (string) --
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .
botId (string) --
The identifier of the bot associated with the intent.
botVersion (string) --
The version of the bot associated with the intent.
localeId (string) --
The language and locale specified for the intent.
creationDateTime (datetime) --
A timestamp of the date and time that the intent was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the intent was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_resource_policy
(**kwargs)¶Gets the resource policy and policy revision for a bot or bot alias.
See also: AWS API Documentation
Request Syntax
response = client.describe_resource_policy(
resourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
{
'resourceArn': 'string',
'policy': 'string',
'revisionId': 'string'
}
Response Structure
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
The JSON structure that contains the resource policy. For more information about the contents of a JSON policy document, see IAM JSON policy reference .
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
describe_slot
(**kwargs)¶Gets metadata information about a slot.
See also: AWS API Documentation
Request Syntax
response = client.describe_slot(
slotId='string',
botId='string',
botVersion='string',
localeId='string',
intentId='string'
)
[REQUIRED]
The unique identifier for the slot.
[REQUIRED]
The identifier of the bot associated with the slot.
[REQUIRED]
The version of the bot associated with the slot.
[REQUIRED]
The identifier of the language and locale of the slot to describe. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The identifier of the intent that contains the slot.
dict
Response Syntax
{
'slotId': 'string',
'slotName': 'string',
'description': 'string',
'slotTypeId': 'string',
'valueElicitationSetting': {
'defaultValueSpecification': {
'defaultValueList': [
{
'defaultValue': 'string'
},
]
},
'slotConstraint': 'Required'|'Optional',
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'sampleUtterances': [
{
'utterance': 'string'
},
],
'waitAndContinueSpecification': {
'waitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'continueResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'stillWaitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'frequencyInSeconds': 123,
'timeoutInSeconds': 123,
'allowInterrupt': True|False
},
'active': True|False
}
},
'obfuscationSetting': {
'obfuscationSettingType': 'None'|'DefaultObfuscation'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'intentId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'multipleValuesSetting': {
'allowMultipleValues': True|False
}
}
Response Structure
(dict) --
slotId (string) --
The unique identifier generated for the slot.
slotName (string) --
The name specified for the slot.
description (string) --
The description specified for the slot.
slotTypeId (string) --
The identifier of the slot type that determines the values entered into the slot.
valueElicitationSetting (dict) --
Prompts that Amazon Lex uses to elicit a value for the slot.
defaultValueSpecification (dict) --
A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
defaultValueList (list) --
A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
(dict) --
Specifies the default value to use when a user doesn't provide a value for a slot.
defaultValue (string) --
The default value to use when a user doesn't provide a value for a slot.
slotConstraint (string) --
Specifies whether the slot is required or optional.
promptSpecification (dict) --
The prompt that Amazon Lex uses to elicit the slot value from the user.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
sampleUtterances (list) --
If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
waitAndContinueSpecification (dict) --
Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
waitingResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
continueResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
stillWaitingResponse (dict) --
A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
messageGroups (list) --
One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
frequencyInSeconds (integer) --
How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
timeoutInSeconds (integer) --
If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
allowInterrupt (boolean) --
Indicates that the user can interrupt the response by speaking while the message is being played.
active (boolean) --
Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active
field isn't specified, the default is true.
obfuscationSetting (dict) --
Whether slot values are shown in Amazon CloudWatch logs. If the value is None
, the actual value of the slot is shown in logs.
obfuscationSettingType (string) --
Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
botId (string) --
The identifier of the bot associated with the slot.
botVersion (string) --
The version of the bot associated with the slot.
localeId (string) --
The language and locale specified for the slot.
intentId (string) --
The identifier of the intent associated with the slot.
creationDateTime (datetime) --
A timestamp of the date and time that the slot was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot was last updated.
multipleValuesSetting (dict) --
Indicates whether the slot accepts multiple values in a single utterance.
If the multipleValuesSetting
is not set, the default value is false
.
allowMultipleValues (boolean) --
Indicates whether a slot can return multiple values. When true
, the slot may return more than one value in a response. When false
, the slot returns only a single value.
Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the allowMutlipleValues
is not set, the default value is false
.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
describe_slot_type
(**kwargs)¶Gets metadata information about a slot type.
See also: AWS API Documentation
Request Syntax
response = client.describe_slot_type(
slotTypeId='string',
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The identifier of the slot type.
[REQUIRED]
The identifier of the bot associated with the slot type.
[REQUIRED]
The version of the bot associated with the slot type.
[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:
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:
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_aggregated_utterances
(**kwargs)¶Provides a list of utterances that users have sent to the bot.
Utterances are aggregated by the text of the utterance. For example, all instances where customers used the phrase "I want to order pizza" are aggregated into the same line in the response.
You can see both detected utterances and missed utterances. A detected utterance is where the bot properly recognized the utterance and activated the associated intent. A missed utterance was not recognized by the bot and didn't activate an intent.
Utterances can be aggregated for a bot alias or for a bot version, but not both at the same time.
Utterances statistics are not generated under the following conditions:
childDirected
field was set to true when the bot was created.See also: AWS API Documentation
Request Syntax
response = client.list_aggregated_utterances(
botId='string',
botAliasId='string',
botVersion='string',
localeId='string',
aggregationDuration={
'relativeAggregationDuration': {
'timeDimension': 'Hours'|'Days'|'Weeks',
'timeValue': 123
}
},
sortBy={
'attribute': 'HitCount'|'MissedCount',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'Utterance',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The unique identifier of the bot associated with this request.
[REQUIRED]
The identifier of the language and locale where the utterances were collected. For more information, see Supported languages .
[REQUIRED]
The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.
The desired time window for aggregating utterances.
The type of time period that the timeValue
field represents.
The period of the time window to gather statistics for. The valid value depends on the setting of the timeDimension
field.
Hours
- 1/3/6/12/24Days
- 3Weeks
- 1/2Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.
The utterance attribute to sort by.
Specifies whether to sort the aggregated utterances in ascending or descending order.
Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
Filters responses returned by the ListAggregatedUtterances
operation.
The name of the field to filter the utterance list.
The value to use for filtering the list of bots.
The operator to use for the filter. Specify EQ
when the ListAggregatedUtterances
operation should return only utterances that equal the specified value. Specify CO
when the ListAggregatedUtterances
operation should return utterances that contain the specified value.
maxResults
parameter, 1,000 results are returned.ListAggregatedUtterances
operation contains more results that specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botId': 'string',
'botAliasId': 'string',
'botVersion': 'string',
'localeId': 'string',
'aggregationDuration': {
'relativeAggregationDuration': {
'timeDimension': 'Hours'|'Days'|'Weeks',
'timeValue': 123
}
},
'aggregationWindowStartTime': datetime(2015, 1, 1),
'aggregationWindowEndTime': datetime(2015, 1, 1),
'aggregationLastRefreshedDateTime': datetime(2015, 1, 1),
'aggregatedUtterancesSummaries': [
{
'utterance': 'string',
'hitCount': 123,
'missedCount': 123,
'utteranceFirstRecordedInAggregationDuration': datetime(2015, 1, 1),
'utteranceLastRecordedInAggregationDuration': datetime(2015, 1, 1),
'containsDataFromDeletedResources': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the utterances.
botAliasId (string) --
The identifier of the bot alias that contains the utterances. If you specified the bot version, the bot alias ID isn't returned.
botVersion (string) --
The identifier of the bot version that contains the utterances. If you specified the bot alias, the bot version isn't returned.
localeId (string) --
The identifier of the language and locale that the utterances are in.
aggregationDuration (dict) --
The time period used to aggregate the utterance data.
relativeAggregationDuration (dict) --
The desired time window for aggregating utterances.
timeDimension (string) --
The type of time period that the timeValue
field represents.
timeValue (integer) --
The period of the time window to gather statistics for. The valid value depends on the setting of the timeDimension
field.
Hours
- 1/3/6/12/24Days
- 3Weeks
- 1/2aggregationWindowStartTime (datetime) --
The date and time that the aggregation window begins. Only data collected after this time is returned in the results.
aggregationWindowEndTime (datetime) --
The date and time that the aggregation window ends. Only data collected between the start time and the end time are returned in the results.
aggregationLastRefreshedDateTime (datetime) --
The last date and time that the aggregated data was collected. The time period depends on the length of the aggregation window.
aggregatedUtterancesSummaries (list) --
Summaries of the aggregated utterance data. Each response contains information about the number of times that the utterance was seen during the time period, whether it was detected or missed, and when it was seen during the time period.
(dict) --
Provides summary information for aggregated utterances. The ListAggregatedUtterances
operations combines all instances of the same utterance into a single aggregated summary.
utterance (string) --
The text of the utterance. If the utterance was used with the RecognizeUtterance
operation, the text is the transcription of the audio utterance.
hitCount (integer) --
The number of times that the utterance was detected by Amazon Lex during the time period. When an utterance is detected, it activates an intent or a slot.
missedCount (integer) --
The number of times that the utterance was missed by Amazon Lex An utterance is missed when it doesn't activate an intent or slot.
utteranceFirstRecordedInAggregationDuration (datetime) --
The date and time that the utterance was first recorded in the time window for aggregation. An utterance may have been sent to Amazon Lex before that time, but only utterances within the time window are counted.
utteranceLastRecordedInAggregationDuration (datetime) --
The last date and time that an utterance was recorded in the time window for aggregation. An utterance may be sent to Amazon Lex after that time, but only utterances within the time window are counted.
containsDataFromDeletedResources (boolean) --
Aggregated utterance data may contain utterances from versions of your bot that have since been deleted. When the aggregated contains this kind of data, this field is set to true.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListAggregatedUtterances
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListAggregatedUtterances
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.InternalServerException
list_bot_aliases
(**kwargs)¶Gets a list of aliases for the specified bot.
See also: AWS API Documentation
Request Syntax
response = client.list_bot_aliases(
botId='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the bot to list aliases for.
ListBotAliases
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botAliasSummaries': [
{
'botAliasId': 'string',
'botAliasName': 'string',
'description': 'string',
'botVersion': 'string',
'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string',
'botId': 'string'
}
Response Structure
(dict) --
botAliasSummaries (list) --
Summary information for the bot aliases that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more aliases available, the nextToken
field contains a token to get the next page of results.
(dict) --
Summary information about bot aliases returned from the ListBotAliases operation.
botAliasId (string) --
The unique identifier assigned to the bot alias. You can use this ID to get detailed information about the alias using the DescribeBotAlias operation.
botAliasName (string) --
The name of the bot alias.
description (string) --
The description of the bot alias.
botVersion (string) --
The version of the bot that the bot alias references.
botAliasStatus (string) --
The current state of the bot alias. If the status is Available
, the alias is ready for use.
creationDateTime (datetime) --
A timestamp of the date and time that the bot alias was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot alias was last updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBotAliases
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListBotAliases
operation request to get the next page of results.
botId (string) --
The identifier of the bot associated with the aliases.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_bot_locales
(**kwargs)¶Gets a list of locales for the specified bot.
See also: AWS API Documentation
Request Syntax
response = client.list_bot_locales(
botId='string',
botVersion='string',
sortBy={
'attribute': 'BotLocaleName',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'BotLocaleName',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the bot to list locales for.
[REQUIRED]
The version of the bot to list locales for.
Specifies sorting parameters for the list of locales. You can sort by locale name in ascending or descending order.
The bot locale attribute to sort by.
Specifies whether to sort the bot locales in ascending or descending order.
Provides the specification for a filter used to limit the response to only those locales that match the filter specification. You can only specify one filter and one value to filter on.
Filters responses returned by the ListBotLocales
operation.
The name of the field to filter the list of bots.
The value to use for filtering the list of bots.
The operator to use for the filter. Specify EQ
when the ListBotLocales
operation should return only aliases that equal the specified value. Specify CO
when the ListBotLocales
operation should return aliases that contain the specified value.
ListBotLocales
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token as the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'nextToken': 'string',
'botLocaleSummaries': [
{
'localeId': 'string',
'localeName': 'string',
'description': 'string',
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
'lastUpdatedDateTime': datetime(2015, 1, 1),
'lastBuildSubmittedDateTime': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot to list locales for.
botVersion (string) --
The version of the bot.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBotLocales
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListBotLocales
operation request to get the next page of results.
botLocaleSummaries (list) --
Summary information for the locales that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more locales available, the nextToken
field contains a token to get the next page of results.
(dict) --
Summary information about bot locales returned by the ListBotLocales operation.
localeId (string) --
The language and locale of the bot locale.
localeName (string) --
The name of the bot locale.
description (string) --
The description of the bot locale.
botLocaleStatus (string) --
The current status of the bot locale. When the status is Built
the locale is ready for use.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot locale was last updated.
lastBuildSubmittedDateTime (datetime) --
A timestamp of the date and time that the bot locale was last built.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_bot_recommendations
(**kwargs)¶Get a list of bot recommendations that meet the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.list_bot_recommendations(
botId='string',
botVersion='string',
localeId='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The unique identifier of the bot that contains the bot recommendation list.
[REQUIRED]
The version of the bot that contains the bot recommendation list.
[REQUIRED]
The identifier of the language and locale of the bot recommendation list.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationSummaries': [
{
'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
'botRecommendationId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot that contains the bot recommendation list.
botVersion (string) --
The version of the bot that contains the bot recommendation list.
localeId (string) --
The identifier of the language and locale of the bot recommendation list.
botRecommendationSummaries (list) --
Summary information for the bot recommendations that meet the filter specified in this request. The length of the list is specified in the maxResults parameter of the request. If there are more bot recommendations available, the nextToken field contains a token to get the next page of results.
(dict) --
A summary of the bot recommendation.
botRecommendationStatus (string) --
The status of the bot recommendation.
If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
botRecommendationId (string) --
The unique identifier of the bot recommendation to be updated.
creationDateTime (datetime) --
A timestamp of the date and time that the bot recommendation was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot recommendation was last updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBotRecommendations operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotRecommendations operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ResourceNotFoundException
list_bot_versions
(**kwargs)¶Gets information about all of the versions of a bot.
The ListBotVersions
operation returns a summary of each version of a bot. For example, if a bot has three numbered versions, the ListBotVersions
operation returns for summaries, one for each numbered version and one for the DRAFT
version.
The ListBotVersions
operation always returns at least one version, the DRAFT
version.
See also: AWS API Documentation
Request Syntax
response = client.list_bot_versions(
botId='string',
sortBy={
'attribute': 'BotVersion',
'order': 'Ascending'|'Descending'
},
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the bot to list versions for.
Specifies sorting parameters for the list of versions. You can specify that the list be sorted by version name in either ascending or descending order.
The attribute to use to sort the list of versions.
The order to sort the list. You can specify ascending or descending order.
ListBotVersion
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botId': 'string',
'botVersionSummaries': [
{
'botName': 'string',
'botVersion': 'string',
'description': 'string',
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'creationDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot to list versions for.
botVersionSummaries (list) --
Summary information for the bot versions that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more versions available, the nextToken
field contains a token to get the next page of results.
(dict) --
Summary information about a bot version returned by the ListBotVersions operation.
botName (string) --
The name of the bot associated with the version.
botVersion (string) --
The numeric version of the bot, or DRAFT
to indicate that this is the version of the bot that can be updated..
description (string) --
The description of the version.
botStatus (string) --
The status of the bot. When the status is available, the version of the bot is ready for use.
creationDateTime (datetime) --
A timestamp of the date and time that the version was created.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBotVersions
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListBotAliases
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_bots
(**kwargs)¶Gets a list of available bots.
See also: AWS API Documentation
Request Syntax
response = client.list_bots(
sortBy={
'attribute': 'BotName',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'BotName',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
Specifies sorting parameters for the list of bots. You can specify that the list be sorted by bot name in ascending or descending order.
The attribute to use to sort the list of bots.
The order to sort the list. You can choose ascending or descending.
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.
Filters the responses returned by the ListBots
operation.
The name of the field to filter the list of bots.
The value to use for filtering the list of bots.
The operator to use for the filter. Specify EQ
when the ListBots
operation should return only aliases that equal the specified value. Specify CO
when the ListBots
operation should return aliases that contain the specified value.
If the response from the ListBots
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 ListBots
request to return the next page of results. For a complete set of results, call the ListBots
operation until the nextToken
returned in the response is null.
dict
Response Syntax
{
'botSummaries': [
{
'botId': 'string',
'botName': 'string',
'description': 'string',
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'latestBotVersion': 'string',
'lastUpdatedDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botSummaries (list) --
Summary information for the bots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more bots available, the nextToken
field contains a token to the next page of results.
(dict) --
Summary information about a bot returned by the ListBots operation.
botId (string) --
The unique identifier assigned to the bot. Use this ID to get detailed information about the bot with the DescribeBot operation.
botName (string) --
The name of the bot.
description (string) --
The description of the bot.
botStatus (string) --
The current status of the bot. When the status is Available
the bot is ready for use.
latestBotVersion (string) --
The latest numerical version in use for the bot.
lastUpdatedDateTime (datetime) --
The date and time that the bot was last updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBots
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListBots
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_built_in_intents
(**kwargs)¶Gets a list of built-in intents provided by Amazon Lex that you can use in your bot.
To use a built-in intent as a the base for your own intent, include the built-in intent signature in the parentIntentSignature
parameter when you call the CreateIntent
operation. For more information, see CreateIntent .
See also: AWS API Documentation
Request Syntax
response = client.list_built_in_intents(
localeId='string',
sortBy={
'attribute': 'IntentSignature',
'order': 'Ascending'|'Descending'
},
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages .
Specifies sorting parameters for the list of built-in intents. You can specify that the list be sorted by the built-in intent signature in either ascending or descending order.
The attribute to use to sort the list of built-in intents.
The order to sort the list. You can specify ascending or descending order.
ListBuiltInIntents
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'builtInIntentSummaries': [
{
'intentSignature': 'string',
'description': 'string'
},
],
'nextToken': 'string',
'localeId': 'string'
}
Response Structure
(dict) --
builtInIntentSummaries (list) --
Summary information for the built-in intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more intents available, the nextToken
field contains a token to get the next page of results.
(dict) --
Provides summary information about a built-in intent for the ListBuiltInIntents operation.
intentSignature (string) --
The signature of the built-in intent. Use this to specify the parent intent of a derived intent.
description (string) --
The description of the intent.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBuiltInIntents
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListBotAliases
operation request to get the next page of results.
localeId (string) --
The language and locale of the intents in the list.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_built_in_slot_types
(**kwargs)¶Gets a list of built-in slot types that meet the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.list_built_in_slot_types(
localeId='string',
sortBy={
'attribute': 'SlotTypeSignature',
'order': 'Ascending'|'Descending'
},
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages .
Determines the sort order for the response from the ListBuiltInSlotTypes
operation. You can choose to sort by the slot type signature in either ascending or descending order.
The attribute to use to sort the list of built-in intents.
The order to sort the list. You can choose ascending or descending.
ListBuiltInSlotTypes
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'builtInSlotTypeSummaries': [
{
'slotTypeSignature': 'string',
'description': 'string'
},
],
'nextToken': 'string',
'localeId': 'string'
}
Response Structure
(dict) --
builtInSlotTypeSummaries (list) --
Summary information for the built-in slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more slot types available, the nextToken
field contains a token to get the next page of results.
(dict) --
Provides summary information about a built-in slot type for the ListBuiltInSlotTypes operation.
slotTypeSignature (string) --
The signature of the built-in slot type. Use this to specify the parent slot type of a derived slot type.
description (string) --
The description of the built-in slot type.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListBuiltInSlotTypes
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a LIstBuiltInSlotTypes
operation request to get the next page of results.
localeId (string) --
The language and locale of the slot types in the list.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_exports
(**kwargs)¶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
response = 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'
)
Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime
field in ascending or descending order.
The export field to use for sorting.
The order to sort the 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.
Filters the response form the ListExports operation
The name of the field to use for filtering.
The values to use to filter the response. The values must be Bot
, BotLocale
, or CustomVocabulary
.
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.
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.
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_imports
(**kwargs)¶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
response = 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'
)
Determines the field that the list of imports is sorted by. You can sort by the LastUpdatedDateTime
field in ascending or descending order.
The export field to use for sorting.
The order to sort the 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.
Filters the response from the ListImports operation.
The name of the field to use for filtering.
The values to use to filter the response. The values must be Bot
, BotLocale
, or CustomVocabulary
.
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.
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.
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_intents
(**kwargs)¶Get a list of intents that meet the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.list_intents(
botId='string',
botVersion='string',
localeId='string',
sortBy={
'attribute': 'IntentName'|'LastUpdatedDateTime',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'IntentName',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The unique identifier of the bot that contains the intent.
[REQUIRED]
The version of the bot that contains the intent.
[REQUIRED]
The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages .
Determines the sort order for the response from the ListIntents
operation. You can choose to sort by the intent name or last updated date in either ascending or descending order.
The attribute to use to sort the list of intents.
The order to sort the list. You can choose ascending or descending.
Provides the specification of a filter used to limit the intents in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
Filters the response from the ListIntents
operation.
The name of the field to use for the filter.
The value to use for the filter.
The operator to use for the filter. Specify EQ
when the ListIntents
operation should return only aliases that equal the specified value. Specify CO
when the ListIntents
operation should return aliases that contain the specified value.
If the response from the ListIntents
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 ListIntents
request to return the next page of results. For a complete set of results, call the ListIntents
operation until the nextToken
returned in the response is null.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'intentSummaries': [
{
'intentId': 'string',
'intentName': 'string',
'description': 'string',
'parentIntentSignature': 'string',
'inputContexts': [
{
'name': 'string'
},
],
'outputContexts': [
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
'lastUpdatedDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the intent.
botVersion (string) --
The version of the bot that contains the intent.
localeId (string) --
The language and locale of the intents in the list.
intentSummaries (list) --
Summary information for the intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more intents available, the nextToken
field contains a token to get the next page of results.
(dict) --
Summary information about an intent returned by the ListIntents
operation.
intentId (string) --
The unique identifier assigned to the intent. Use this ID to get detailed information about the intent with the DescribeIntent
operation.
intentName (string) --
The name of the intent.
description (string) --
The description of the intent.
parentIntentSignature (string) --
If this intent is derived from a built-in intent, the name of the parent intent.
inputContexts (list) --
The input contexts that must be active for this intent to be considered for recognition.
(dict) --
The name of a context that must be active for an intent to be selected by Amazon Lex.
name (string) --
The name of the context.
outputContexts (list) --
The output contexts that are activated when this intent is fulfilled.
(dict) --
Describes a session context that is activated when an intent is fulfilled.
name (string) --
The name of the output context.
timeToLiveInSeconds (integer) --
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
turnsToLive (integer) --
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
lastUpdatedDateTime (datetime) --
The timestamp of the date and time that the intent was last updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListIntents
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListIntents
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_recommended_intents
(**kwargs)¶Gets a list of recommended intents provided by the bot recommendation that you can use in your bot.
See also: AWS API Documentation
Request Syntax
response = client.list_recommended_intents(
botId='string',
botVersion='string',
localeId='string',
botRecommendationId='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The unique identifier of the bot associated with the recommended intents.
[REQUIRED]
The version of the bot that contains the recommended intents.
[REQUIRED]
The identifier of the language and locale of the recommended intents.
[REQUIRED]
The identifier of the bot recommendation that contains the recommended intents.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationId': 'string',
'summaryList': [
{
'intentId': 'string',
'intentName': 'string',
'sampleUtterancesCount': 123
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot associated with the recommended intent.
botVersion (string) --
The version of the bot that contains the intent.
localeId (string) --
The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages .
botRecommendationId (string) --
The identifier of the bot recommendation that contains the recommended intent.
summaryList (list) --
Summary information for the intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.
(dict) --
An object that contains a summary of a recommended intent.
intentId (string) --
The unique identifier of a recommended intent associated with the bot recommendation.
intentName (string) --
The name of a recommended intent associated with the bot recommendation.
sampleUtterancesCount (integer) --
The count of sample utterances of a recommended intent that is associated with a bot recommendation.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListRecommendedIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListRecommendedIntents operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ResourceNotFoundException
list_slot_types
(**kwargs)¶Gets a list of slot types that match the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.list_slot_types(
botId='string',
botVersion='string',
localeId='string',
sortBy={
'attribute': 'SlotTypeName'|'LastUpdatedDateTime',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'SlotTypeName'|'ExternalSourceType',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The unique identifier of the bot that contains the slot types.
[REQUIRED]
The version of the bot that contains the slot type.
[REQUIRED]
The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages .
Determines the sort order for the response from the ListSlotTypes
operation. You can choose to sort by the slot type name or last updated date in either ascending or descending order.
The attribute to use to sort the list of slot types.
The order to sort the list. You can say ascending or descending.
Provides the specification of a filter used to limit the slot types in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
Filters the response from the ListSlotTypes
operation.
The name of the field to use for filtering.
The value to use to filter the response.
The operator to use for the filter. Specify EQ
when the ListSlotTypes
operation should return only aliases that equal the specified value. Specify CO
when the ListSlotTypes
operation should return aliases that contain the specified value.
ListSlotTypes
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'slotTypeSummaries': [
{
'slotTypeId': 'string',
'slotTypeName': 'string',
'description': 'string',
'parentSlotTypeSignature': 'string',
'lastUpdatedDateTime': datetime(2015, 1, 1),
'slotTypeCategory': 'Custom'|'Extended'|'ExternalGrammar'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the slot types.
botVersion (string) --
The version of the bot that contains the slot types.
localeId (string) --
The language and local of the slot types in the list.
slotTypeSummaries (list) --
Summary information for the slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more slot types available, the nextToken
field contains a token to get the next page of results.
(dict) --
Provides summary information about a slot type.
slotTypeId (string) --
The unique identifier assigned to the slot type.
slotTypeName (string) --
The name of the slot type.
description (string) --
The description of the slot type.
parentSlotTypeSignature (string) --
If the slot type is derived from a built-on slot type, the name of the parent slot type.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
slotTypeCategory (string) --
Indicates the type of the slot type.
Custom
- A slot type that you created using custom values. For more information, see Creating custom slot types .Extended
- A slot type created by extending the AMAZON.AlphaNumeric built-in slot type. For more information, see AMAZON.AlphaNumeric .ExternalGrammar
- A slot type using a custom GRXML grammar to define values. For more information, see Using a custom grammar slot type .nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListSlotTypes
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListSlotTypes
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
list_slots
(**kwargs)¶Gets a list of slots that match the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.list_slots(
botId='string',
botVersion='string',
localeId='string',
intentId='string',
sortBy={
'attribute': 'SlotName'|'LastUpdatedDateTime',
'order': 'Ascending'|'Descending'
},
filters=[
{
'name': 'SlotName',
'values': [
'string',
],
'operator': 'CO'|'EQ'
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The identifier of the bot that contains the slot.
[REQUIRED]
The version of the bot that contains the slot.
[REQUIRED]
The identifier of the language and locale of the slots to list. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The unique identifier of the intent that contains the slot.
Determines the sort order for the response from the ListSlots
operation. You can choose to sort by the slot name or last updated date in either ascending or descending order.
The attribute to use to sort the list.
The order to sort the list. You can choose ascending or descending.
Provides the specification of a filter used to limit the slots in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
Filters the response from the ListSlots
operation.
The name of the field to use for filtering.
The value to use to filter the response.
The operator to use for the filter. Specify EQ
when the ListSlots
operation should return only aliases that equal the specified value. Specify CO
when the ListSlots
operation should return aliases that contain the specified value.
ListSlots
operation contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the nextToken
parameter to return the next page of results.dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'intentId': 'string',
'slotSummaries': [
{
'slotId': 'string',
'slotName': 'string',
'description': 'string',
'slotConstraint': 'Required'|'Optional',
'slotTypeId': 'string',
'valueElicitationPromptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'lastUpdatedDateTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the slots.
botVersion (string) --
The version of the bot that contains the slots.
localeId (string) --
The language and locale of the slots in the list.
intentId (string) --
The identifier of the intent that contains the slots.
slotSummaries (list) --
Summary information for the slots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults
parameter of the request. If there are more slots available, the nextToken
field contains a token to get the next page of results.
(dict) --
Summary information about a slot, a value that the bot elicits from the user.
slotId (string) --
The unique identifier of the slot.
slotName (string) --
The name given to the slot.
description (string) --
The description of the slot.
slotConstraint (string) --
Whether the slot is required or optional. An intent is complete when all required slots are filled.
slotTypeId (string) --
The unique identifier for the slot type that defines the values for the slot.
valueElicitationPromptSpecification (dict) --
Prompts that are sent to the user to elicit a value for the slot.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
lastUpdatedDateTime (datetime) --
The timestamp of the last date and time that the slot was updated.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListSlots
operation. If the nextToken
field is present, you send the contents as the nextToken
parameter of a ListSlots
operation request to get the next page of results.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
Gets a list of tags associated with a resource. Only bots, bot aliases, and bot channels can have tags associated with them.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceARN='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to get a list of tags for.
{
'tags': {
'string': 'string'
}
}
Response Structure
The tags associated with a resource.
Exceptions
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ValidationException
search_associated_transcripts
(**kwargs)¶Search for associated transcripts that meet the specified criteria.
See also: AWS API Documentation
Request Syntax
response = client.search_associated_transcripts(
botId='string',
botVersion='string',
localeId='string',
botRecommendationId='string',
searchOrder='Ascending'|'Descending',
filters=[
{
'name': 'IntentId'|'SlotTypeId',
'values': [
'string',
]
},
],
maxResults=123,
nextIndex=123
)
[REQUIRED]
The unique identifier of the bot associated with the transcripts that you are searching.
[REQUIRED]
The version of the bot containing the transcripts that you are searching.
[REQUIRED]
The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages
[REQUIRED]
The unique identifier of the bot recommendation associated with the transcripts to search.
[REQUIRED]
A list of filter objects.
Filters to search for the associated transcript.
The name of the field to use for filtering. The allowed names are IntentId and SlotTypeId.
The values to use to filter the transcript.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationId': 'string',
'nextIndex': 123,
'associatedTranscripts': [
{
'transcript': 'string'
},
],
'totalResults': 123
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot associated with the transcripts that you are searching.
botVersion (string) --
The version of the bot containing the transcripts that you are searching.
localeId (string) --
The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages
botRecommendationId (string) --
The unique identifier of the bot recommendation associated with the transcripts to search.
nextIndex (integer) --
A index that indicates whether there are more results to return in a response to the SearchAssociatedTranscripts operation. If the nextIndex field is present, you send the contents as the nextIndex parameter of a SearchAssociatedTranscriptsRequest operation to get the next page of results.
associatedTranscripts (list) --
The object that contains the associated transcript that meet the criteria you specified.
(dict) --
The object containing information that associates the recommended intent/slot type with a conversation.
transcript (string) --
The content of the transcript that meets the search filter criteria. For the JSON format of the transcript, see Output transcript format .
totalResults (integer) --
The total number of transcripts returned by the search.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ResourceNotFoundException
start_bot_recommendation
(**kwargs)¶Use this to provide your transcript data, and to start the bot recommendation process.
See also: AWS API Documentation
Request Syntax
response = client.start_bot_recommendation(
botId='string',
botVersion='string',
localeId='string',
transcriptSourceSetting={
's3BucketTranscriptSource': {
's3BucketName': 'string',
'pathFormat': {
'objectPrefixes': [
'string',
]
},
'transcriptFormat': 'Lex',
'transcriptFilter': {
'lexTranscriptFilter': {
'dateRangeFilter': {
'startDateTime': datetime(2015, 1, 1),
'endDateTime': datetime(2015, 1, 1)
}
}
},
'kmsKeyArn': 'string'
}
},
encryptionSetting={
'kmsKeyArn': 'string',
'botLocaleExportPassword': 'string',
'associatedTranscriptsPassword': 'string'
}
)
[REQUIRED]
The unique identifier of the bot containing the bot recommendation.
[REQUIRED]
The version of the bot containing the bot recommendation.
[REQUIRED]
The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages
[REQUIRED]
The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
Indicates the setting of the Amazon S3 bucket where the transcript is stored.
The name of the bucket containing the transcript and the associated metadata.
The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.
The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.
The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.
The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.
A timestamp indicating the start date for the date range filter.
A timestamp indicating the end date for the date range filter.
The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.
The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
The password used to encrypt the recommended bot recommendation file.
The password used to encrypt the associated transcript file.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
'botRecommendationId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'transcriptSourceSetting': {
's3BucketTranscriptSource': {
's3BucketName': 'string',
'pathFormat': {
'objectPrefixes': [
'string',
]
},
'transcriptFormat': 'Lex',
'transcriptFilter': {
'lexTranscriptFilter': {
'dateRangeFilter': {
'startDateTime': datetime(2015, 1, 1),
'endDateTime': datetime(2015, 1, 1)
}
}
},
'kmsKeyArn': 'string'
}
},
'encryptionSetting': {
'kmsKeyArn': 'string',
'botLocaleExportPassword': 'string',
'associatedTranscriptsPassword': 'string'
}
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot containing the bot recommendation.
botVersion (string) --
The version of the bot containing the bot recommendation.
localeId (string) --
The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages
botRecommendationStatus (string) --
The status of the bot recommendation.
If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
botRecommendationId (string) --
The identifier of the bot recommendation that you have created.
creationDateTime (datetime) --
A timestamp of the date and time that the bot recommendation was created.
transcriptSourceSetting (dict) --
The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
s3BucketTranscriptSource (dict) --
Indicates the setting of the Amazon S3 bucket where the transcript is stored.
s3BucketName (string) --
The name of the bucket containing the transcript and the associated metadata.
pathFormat (dict) --
The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.
objectPrefixes (list) --
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
transcriptFormat (string) --
The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.
transcriptFilter (dict) --
The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.
lexTranscriptFilter (dict) --
The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.
dateRangeFilter (dict) --
The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.
startDateTime (datetime) --
A timestamp indicating the start date for the date range filter.
endDateTime (datetime) --
A timestamp indicating the end date for the date range filter.
kmsKeyArn (string) --
The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.
encryptionSetting (dict) --
The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
kmsKeyArn (string) --
The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
botLocaleExportPassword (string) --
The password used to encrypt the recommended bot recommendation file.
associatedTranscriptsPassword (string) --
The password used to encrypt the associated transcript file.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
start_import
(**kwargs)¶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
response = 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'
)
[REQUIRED]
The unique identifier for the import. It is included in the response from the CreateUploadUrl operation.
[REQUIRED]
Parameters for creating the bot, bot locale or custom vocabulary.
Parameters for importing a bot.
The name that Amazon Lex should use for the bot.
The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
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.
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 .
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.
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.
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.
Parameters for importing a bot locale.
The identifier of the bot to import the locale to.
The version of the bot to import the locale to. This can only be the DRAFT
version of the bot.
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 .
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
Defines settings for using an Amazon Polly voice to communicate with a user.
The identifier of the Amazon Polly voice to use.
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
.
Provides the parameters required for importing a custom vocabulary.
The identifier of the bot to import the custom vocabulary to.
The version of the bot to import the custom vocabulary to.
The identifier of the local to import the custom vocabulary to. The value must be en_GB
.
[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.
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.
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.
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
tag_resource
(**kwargs)¶Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceARN='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.
[REQUIRED]
A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.
dict
Response Syntax
{}
Response Structure
Exceptions
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ValidationException
untag_resource
(**kwargs)¶Removes tags from a bot, bot alias, or bot channel.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceARN='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to remove the tags from.
[REQUIRED]
A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.
dict
Response Syntax
{}
Response Structure
Exceptions
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ValidationException
update_bot
(**kwargs)¶Updates the configuration of an existing bot.
See also: AWS API Documentation
Request Syntax
response = client.update_bot(
botId='string',
botName='string',
description='string',
roleArn='string',
dataPrivacy={
'childDirected': True|False
},
idleSessionTTLInSeconds=123
)
[REQUIRED]
The unique identifier of the bot to update. This identifier is returned by the CreateBot operation.
[REQUIRED]
The new name of the bot. The name must be unique in the account that creates the bot.
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.
[REQUIRED]
Provides information on additional privacy protections Amazon Lex should use with the bot's data.
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 .
[REQUIRED]
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.
dict
Response Syntax
{
'botId': 'string',
'botName': 'string',
'description': 'string',
'roleArn': 'string',
'dataPrivacy': {
'childDirected': True|False
},
'idleSessionTTLInSeconds': 123,
'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot that was updated.
botName (string) --
The name of the bot after the update.
description (string) --
The description of the bot after the update.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.
dataPrivacy (dict) --
The data privacy settings for the bot after the update.
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 session timeout, in seconds, for the bot after the update.
botStatus (string) --
Shows the current status of the bot. The bot is first in the Creating
status. Once the bot is read for use, it changes to the Available
status. After the bot is created, you can use the DRAFT
version of the bot.
creationDateTime (datetime) --
A timestamp of the date and time that the bot was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_bot_alias
(**kwargs)¶Updates the configuration of an existing bot alias.
See also: AWS API Documentation
Request Syntax
response = client.update_bot_alias(
botAliasId='string',
botAliasName='string',
description='string',
botVersion='string',
botAliasLocaleSettings={
'string': {
'enabled': True|False,
'codeHookSpecification': {
'lambdaCodeHook': {
'lambdaARN': 'string',
'codeHookInterfaceVersion': 'string'
}
}
}
},
conversationLogSettings={
'textLogSettings': [
{
'enabled': True|False,
'destination': {
'cloudWatch': {
'cloudWatchLogGroupArn': 'string',
'logPrefix': 'string'
}
}
},
],
'audioLogSettings': [
{
'enabled': True|False,
'destination': {
's3Bucket': {
'kmsKeyArn': 'string',
's3BucketArn': 'string',
'logPrefix': 'string'
}
}
},
]
},
sentimentAnalysisSettings={
'detectSentiment': True|False
},
botId='string'
)
[REQUIRED]
The unique identifier of the bot alias.
[REQUIRED]
The new name to assign to the bot alias.
The new Lambda functions to use in each locale for the bot alias.
Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
Determines whether the locale is enabled for the bot. If the value is false
, the locale isn't available for use.
Specifies the Lambda function that should be used in the locale.
Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot.
The Amazon Resource Name (ARN) of the Lambda function.
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
The new settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.
The Amazon CloudWatch Logs settings for logging text and metadata.
Defines settings to enable text conversation logs.
Determines whether conversation logs should be stored for an alias.
Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
The prefix of the log stream name within the log group that you specified
The Amazon S3 settings for logging audio to an S3 bucket.
Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
Determines whether audio logging in enabled for the bot.
The location of audio log files collected when conversation logging is enabled for a bot.
The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn
parameter of the CreateBot operation must have permission to write to this bucket.
The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
The S3 prefix to assign to audio log files.
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
[REQUIRED]
The identifier of the bot with the updated alias.
dict
Response Syntax
{
'botAliasId': 'string',
'botAliasName': 'string',
'description': 'string',
'botVersion': 'string',
'botAliasLocaleSettings': {
'string': {
'enabled': True|False,
'codeHookSpecification': {
'lambdaCodeHook': {
'lambdaARN': 'string',
'codeHookInterfaceVersion': 'string'
}
}
}
},
'conversationLogSettings': {
'textLogSettings': [
{
'enabled': True|False,
'destination': {
'cloudWatch': {
'cloudWatchLogGroupArn': 'string',
'logPrefix': 'string'
}
}
},
],
'audioLogSettings': [
{
'enabled': True|False,
'destination': {
's3Bucket': {
'kmsKeyArn': 'string',
's3BucketArn': 'string',
'logPrefix': 'string'
}
}
},
]
},
'sentimentAnalysisSettings': {
'detectSentiment': True|False
},
'botAliasStatus': 'Creating'|'Available'|'Deleting'|'Failed',
'botId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
botAliasId (string) --
The identifier of the updated bot alias.
botAliasName (string) --
The updated name of the bot alias.
description (string) --
The updated description of the bot alias.
botVersion (string) --
The updated version of the bot that the alias points to.
botAliasLocaleSettings (dict) --
The updated Lambda functions to use in each locale for the bot alias.
(string) --
(dict) --
Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
enabled (boolean) --
Determines whether the locale is enabled for the bot. If the value is false
, the locale isn't available for use.
codeHookSpecification (dict) --
Specifies the Lambda function that should be used in the locale.
lambdaCodeHook (dict) --
Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot.
lambdaARN (string) --
The Amazon Resource Name (ARN) of the Lambda function.
codeHookInterfaceVersion (string) --
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
conversationLogSettings (dict) --
The updated settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.
textLogSettings (list) --
The Amazon CloudWatch Logs settings for logging text and metadata.
(dict) --
Defines settings to enable text conversation logs.
enabled (boolean) --
Determines whether conversation logs should be stored for an alias.
destination (dict) --
Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
cloudWatch (dict) --
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
cloudWatchLogGroupArn (string) --
The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
logPrefix (string) --
The prefix of the log stream name within the log group that you specified
audioLogSettings (list) --
The Amazon S3 settings for logging audio to an S3 bucket.
(dict) --
Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
enabled (boolean) --
Determines whether audio logging in enabled for the bot.
destination (dict) --
The location of audio log files collected when conversation logging is enabled for a bot.
s3Bucket (dict) --
The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn
parameter of the CreateBot operation must have permission to write to this bucket.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
s3BucketArn (string) --
The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
logPrefix (string) --
The S3 prefix to assign to audio log files.
sentimentAnalysisSettings (dict) --
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
detectSentiment (boolean) --
Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
botAliasStatus (string) --
The current status of the bot alias. When the status is Available
the alias is ready for use.
botId (string) --
The identifier of the bot with the updated alias.
creationDateTime (datetime) --
A timestamp of the date and time that the bot was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot was last updated.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_bot_locale
(**kwargs)¶Updates the settings that a bot has for a specific locale.
See also: AWS API Documentation
Request Syntax
response = client.update_bot_locale(
botId='string',
botVersion='string',
localeId='string',
description='string',
nluIntentConfidenceThreshold=123.0,
voiceSettings={
'voiceId': 'string',
'engine': 'standard'|'neural'
}
)
[REQUIRED]
The unique identifier of the bot that contains the locale.
[REQUIRED]
The version of the bot that contains the locale to be updated. The version can only be the DRAFT
version.
[REQUIRED]
The identifier of the language and locale to update. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The new confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent
and AMAZON.KendraSearchIntent
intents in the list of possible intents for an utterance.
The new Amazon Polly voice Amazon Lex should use for voice interaction with the user.
The identifier of the Amazon Polly voice to use.
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
.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'localeName': 'string',
'description': 'string',
'nluIntentConfidenceThreshold': 123.0,
'voiceSettings': {
'voiceId': 'string',
'engine': 'standard'|'neural'
},
'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
'failureReasons': [
'string',
],
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'recommendedActions': [
'string',
]
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the updated locale.
botVersion (string) --
The version of the bot that contains the updated locale.
localeId (string) --
The language and locale of the updated bot locale.
localeName (string) --
The updated locale name for the locale.
description (string) --
The updated description of the locale.
nluIntentConfidenceThreshold (float) --
The updated confidence threshold for inserting the AMAZON.FallbackIntent
and AMAZON.KendraSearchIntent
intents in the list of possible intents for an utterance.
voiceSettings (dict) --
The updated Amazon Polly voice to use for voice interaction with the 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
.
botLocaleStatus (string) --
The current status of the locale. When the bot status is Built
the locale is ready for use.
failureReasons (list) --
If the botLocaleStatus
is Failed
, the failureReasons
field lists the errors that occurred while building the bot.
creationDateTime (datetime) --
A timestamp of the date and time that the locale was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the locale was last updated.
recommendedActions (list) --
Recommended actions to take to resolve an error in the failureReasons
field.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_bot_recommendation
(**kwargs)¶Updates an existing bot recommendation request.
See also: AWS API Documentation
Request Syntax
response = client.update_bot_recommendation(
botId='string',
botVersion='string',
localeId='string',
botRecommendationId='string',
encryptionSetting={
'kmsKeyArn': 'string',
'botLocaleExportPassword': 'string',
'associatedTranscriptsPassword': 'string'
}
)
[REQUIRED]
The unique identifier of the bot containing the bot recommendation to be updated.
[REQUIRED]
The version of the bot containing the bot recommendation to be updated.
[REQUIRED]
The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages
[REQUIRED]
The unique identifier of the bot recommendation to be updated.
[REQUIRED]
The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
The password used to encrypt the recommended bot recommendation file.
The password used to encrypt the associated transcript file.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed',
'botRecommendationId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'transcriptSourceSetting': {
's3BucketTranscriptSource': {
's3BucketName': 'string',
'pathFormat': {
'objectPrefixes': [
'string',
]
},
'transcriptFormat': 'Lex',
'transcriptFilter': {
'lexTranscriptFilter': {
'dateRangeFilter': {
'startDateTime': datetime(2015, 1, 1),
'endDateTime': datetime(2015, 1, 1)
}
}
},
'kmsKeyArn': 'string'
}
},
'encryptionSetting': {
'kmsKeyArn': 'string',
'botLocaleExportPassword': 'string',
'associatedTranscriptsPassword': 'string'
}
}
Response Structure
(dict) --
botId (string) --
The unique identifier of the bot containing the bot recommendation that has been updated.
botVersion (string) --
The version of the bot containing the bot recommendation that has been updated.
localeId (string) --
The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages
botRecommendationStatus (string) --
The status of the bot recommendation.
If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
botRecommendationId (string) --
The unique identifier of the bot recommendation to be updated.
creationDateTime (datetime) --
A timestamp of the date and time that the bot recommendation was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the bot recommendation was last updated.
transcriptSourceSetting (dict) --
The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
s3BucketTranscriptSource (dict) --
Indicates the setting of the Amazon S3 bucket where the transcript is stored.
s3BucketName (string) --
The name of the bucket containing the transcript and the associated metadata.
pathFormat (dict) --
The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.
objectPrefixes (list) --
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
transcriptFormat (string) --
The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.
transcriptFilter (dict) --
The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.
lexTranscriptFilter (dict) --
The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.
dateRangeFilter (dict) --
The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.
startDateTime (datetime) --
A timestamp indicating the start date for the date range filter.
endDateTime (datetime) --
A timestamp indicating the end date for the date range filter.
kmsKeyArn (string) --
The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.
encryptionSetting (dict) --
The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
kmsKeyArn (string) --
The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
botLocaleExportPassword (string) --
The password used to encrypt the recommended bot recommendation file.
associatedTranscriptsPassword (string) --
The password used to encrypt the associated transcript file.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_export
(**kwargs)¶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
response = client.update_export(
exportId='string',
filePassword='string'
)
[REQUIRED]
The unique identifier Amazon Lex assigned to the export.
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_intent
(**kwargs)¶Updates the settings for an intent.
See also: AWS API Documentation
Request Syntax
response = client.update_intent(
intentId='string',
intentName='string',
description='string',
parentIntentSignature='string',
sampleUtterances=[
{
'utterance': 'string'
},
],
dialogCodeHook={
'enabled': True|False
},
fulfillmentCodeHook={
'enabled': True|False,
'postFulfillmentStatusSpecification': {
'successResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'failureResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
}
},
'fulfillmentUpdatesSpecification': {
'active': True|False,
'startResponse': {
'delayInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'updateResponse': {
'frequencyInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutInSeconds': 123
}
},
slotPriorities=[
{
'priority': 123,
'slotId': 'string'
},
],
intentConfirmationSetting={
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'declinationResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
intentClosingSetting={
'closingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
inputContexts=[
{
'name': 'string'
},
],
outputContexts=[
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
kendraConfiguration={
'kendraIndex': 'string',
'queryFilterStringEnabled': True|False,
'queryFilterString': 'string'
},
botId='string',
botVersion='string',
localeId='string'
)
[REQUIRED]
The unique identifier of the intent to update.
[REQUIRED]
The new name for the intent.
New utterances used to invoke the intent.
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
The new Lambda function to use between each turn of the conversation with the bot.
Enables the dialog code hook so that it processes user requests.
The new Lambda function to call when all of the intents required slots are provided and the intent is ready for fulfillment.
Indicates whether a Lambda function should be invoked to fulfill a specific intent.
Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies a list of message groups that Amazon Lex uses to respond the user input.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent.
If the active
field is set to true, the startResponse
, updateResponse
, and timeoutInSeconds
fields are required.
Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Determines whether the user can interrupt the start message while it is playing.
Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Determines whether the user can interrupt an update message while it is playing.
The length of time that the fulfillment Lambda function should run before it times out.
A new list of slots and their priorities that are contained by the intent.
Sets the priority that Amazon Lex should use when eliciting slot values from a user.
The priority that a slot should be elicited.
The unique identifier of the slot.
New prompts that Amazon Lex sends to the user to confirm the completion of an intent.
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza
intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
The maximum number of times the bot tries to elicit a response from the user using this prompt.
Indicates whether the user can interrupt a speech prompt from the bot.
Indicates how a message is selected from a message group among retries.
When the user answers "no" to the question defined in promptSpecification
, Amazon Lex responds with this response to acknowledge that the intent was canceled.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active
field isn't specified, the default is true.
The new response that Amazon Lex sends the user when the intent is closed.
The response that Amazon Lex sends to the user when the intent is complete.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active
field isn't specified, the default is true.
A new list of contexts that must be active in order for Amazon Lex to consider the intent.
The name of a context that must be active for an intent to be selected by Amazon Lex.
The name of the context.
A new list of contexts that Amazon Lex activates when the intent is fulfilled.
Describes a session context that is activated when an intent is fulfilled.
The name of the output context.
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
New configuration settings for connecting to an Amazon Kendra index.
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .
[REQUIRED]
The identifier of the bot that contains the intent.
[REQUIRED]
The version of the bot that contains the intent. Must be DRAFT
.
[REQUIRED]
The identifier of the language and locale where this intent is used. The string must match one of the supported locales. For more information, see Supported languages .
dict
Response Syntax
{
'intentId': 'string',
'intentName': 'string',
'description': 'string',
'parentIntentSignature': 'string',
'sampleUtterances': [
{
'utterance': 'string'
},
],
'dialogCodeHook': {
'enabled': True|False
},
'fulfillmentCodeHook': {
'enabled': True|False,
'postFulfillmentStatusSpecification': {
'successResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'failureResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
}
},
'fulfillmentUpdatesSpecification': {
'active': True|False,
'startResponse': {
'delayInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'updateResponse': {
'frequencyInSeconds': 123,
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'timeoutInSeconds': 123
}
},
'slotPriorities': [
{
'priority': 123,
'slotId': 'string'
},
],
'intentConfirmationSetting': {
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'declinationResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'intentClosingSetting': {
'closingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'active': True|False
},
'inputContexts': [
{
'name': 'string'
},
],
'outputContexts': [
{
'name': 'string',
'timeToLiveInSeconds': 123,
'turnsToLive': 123
},
],
'kendraConfiguration': {
'kendraIndex': 'string',
'queryFilterStringEnabled': True|False,
'queryFilterString': 'string'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
intentId (string) --
The identifier of the intent that was updated.
intentName (string) --
The updated name of the intent.
description (string) --
The updated description of the intent.
parentIntentSignature (string) --
The updated built-in intent that is the parent of this intent.
sampleUtterances (list) --
The updated list of sample utterances for the intent.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
dialogCodeHook (dict) --
The updated Lambda function called during each turn of the conversation with the user.
enabled (boolean) --
Enables the dialog code hook so that it processes user requests.
fulfillmentCodeHook (dict) --
The updated Lambda function called when the intent is ready for fulfillment.
enabled (boolean) --
Indicates whether a Lambda function should be invoked to fulfill a specific intent.
postFulfillmentStatusSpecification (dict) --
Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
successResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
failureResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
timeoutResponse (dict) --
Specifies a list of message groups that Amazon Lex uses to respond the user input.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
fulfillmentUpdatesSpecification (dict) --
Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
active (boolean) --
Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent.
If the active
field is set to true, the startResponse
, updateResponse
, and timeoutInSeconds
fields are required.
startResponse (dict) --
Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
delayInSeconds (integer) --
The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
messageGroups (list) --
One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt the start message while it is playing.
updateResponse (dict) --
Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
frequencyInSeconds (integer) --
The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
messageGroups (list) --
One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Determines whether the user can interrupt an update message while it is playing.
timeoutInSeconds (integer) --
The length of time that the fulfillment Lambda function should run before it times out.
slotPriorities (list) --
The updated list of slots and their priorities that are elicited from the user for the intent.
(dict) --
Sets the priority that Amazon Lex should use when eliciting slot values from a user.
priority (integer) --
The priority that a slot should be elicited.
slotId (string) --
The unique identifier of the slot.
intentConfirmationSetting (dict) --
The updated prompts that Amazon Lex sends to the user to confirm the completion of an intent.
promptSpecification (dict) --
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza
intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
declinationResponse (dict) --
When the user answers "no" to the question defined in promptSpecification
, Amazon Lex responds with this response to acknowledge that the intent was canceled.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active
field isn't specified, the default is true.
intentClosingSetting (dict) --
The updated response that Amazon Lex sends the user when the intent is closed.
closingResponse (dict) --
The response that Amazon Lex sends to the user when the intent is complete.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
active (boolean) --
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active
field isn't specified, the default is true.
inputContexts (list) --
The updated list of contexts that must be active for the intent to be considered by Amazon Lex.
(dict) --
The name of a context that must be active for an intent to be selected by Amazon Lex.
name (string) --
The name of the context.
outputContexts (list) --
The updated list of contexts that Amazon Lex activates when the intent is fulfilled.
(dict) --
Describes a session context that is activated when an intent is fulfilled.
name (string) --
The name of the output context.
timeToLiveInSeconds (integer) --
The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
turnsToLive (integer) --
The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
kendraConfiguration (dict) --
The updated configuration for connecting to an Amazon Kendra index with the AMAZON.KendraSearchIntent
intent.
kendraIndex (string) --
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
queryFilterStringEnabled (boolean) --
Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
queryFilterString (string) --
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries .
botId (string) --
The identifier of the bot that contains the intent.
botVersion (string) --
The version of the bot that contains the intent. Will always be DRAFT
.
localeId (string) --
The updated language and locale of the intent.
creationDateTime (datetime) --
A timestamp of when the intent was created.
lastUpdatedDateTime (datetime) --
A timestamp of the last time that the intent was modified.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_resource_policy
(**kwargs)¶Replaces the existing resource policy for a bot or bot alias with a new one. If the policy doesn't exist, Amazon Lex returns an exception.
See also: AWS API Documentation
Request Syntax
response = client.update_resource_policy(
resourceArn='string',
policy='string',
expectedRevisionId='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
[REQUIRED]
A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference .
If the policy isn't valid, Amazon Lex returns a validation exception.
The identifier of the revision of the policy to update. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.
If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
revisionId (string) --
The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
Exceptions
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.InternalServerException
LexModelsV2.Client.exceptions.ThrottlingException
update_slot
(**kwargs)¶Updates the settings for a slot.
See also: AWS API Documentation
Request Syntax
response = client.update_slot(
slotId='string',
slotName='string',
description='string',
slotTypeId='string',
valueElicitationSetting={
'defaultValueSpecification': {
'defaultValueList': [
{
'defaultValue': 'string'
},
]
},
'slotConstraint': 'Required'|'Optional',
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'sampleUtterances': [
{
'utterance': 'string'
},
],
'waitAndContinueSpecification': {
'waitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'continueResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'stillWaitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'frequencyInSeconds': 123,
'timeoutInSeconds': 123,
'allowInterrupt': True|False
},
'active': True|False
}
},
obfuscationSetting={
'obfuscationSettingType': 'None'|'DefaultObfuscation'
},
botId='string',
botVersion='string',
localeId='string',
intentId='string',
multipleValuesSetting={
'allowMultipleValues': True|False
}
)
[REQUIRED]
The unique identifier for the slot to update.
[REQUIRED]
The new name for the slot.
[REQUIRED]
A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.
A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
Specifies the default value to use when a user doesn't provide a value for a slot.
The default value to use when a user doesn't provide a value for a slot.
Specifies whether the slot is required or optional.
The prompt that Amazon Lex uses to elicit the slot value from the user.
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
The maximum number of times the bot tries to elicit a response from the user using this prompt.
Indicates whether the user can interrupt a speech prompt from the bot.
Indicates how a message is selected from a message group among retries.
If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Indicates whether the user can interrupt a speech response from Amazon Lex.
A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
Provides one or more messages that Amazon Lex should send to the user.
The primary message that Amazon Lex should send to the user.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
The object that provides message text and it's type.
A message in plain text format.
The message to send to the user.
A message in a custom format defined by the client application.
The string that is sent to your application.
A message in Speech Synthesis Markup Language (SSML).
The SSML text that defines the prompt.
A message that defines a response card that the client application can show to the user.
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
Describes a button to use on a response card used to gather slot values from a user.
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
Indicates that the user can interrupt the response by speaking while the message is being played.
Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active
field isn't specified, the default is true.
New settings that determine how slot values are formatted in Amazon CloudWatch logs.
Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
[REQUIRED]
The unique identifier of the bot that contains the slot.
[REQUIRED]
The version of the bot that contains the slot. Must always be DRAFT
.
[REQUIRED]
The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see Supported languages .
[REQUIRED]
The identifier of the intent that contains the slot.
Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the multipleValuesSetting
is not set, the default value is false
.
Indicates whether a slot can return multiple values. When true
, the slot may return more than one value in a response. When false
, the slot returns only a single value.
Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the allowMutlipleValues
is not set, the default value is false
.
dict
Response Syntax
{
'slotId': 'string',
'slotName': 'string',
'description': 'string',
'slotTypeId': 'string',
'valueElicitationSetting': {
'defaultValueSpecification': {
'defaultValueList': [
{
'defaultValue': 'string'
},
]
},
'slotConstraint': 'Required'|'Optional',
'promptSpecification': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'maxRetries': 123,
'allowInterrupt': True|False,
'messageSelectionStrategy': 'Random'|'Ordered'
},
'sampleUtterances': [
{
'utterance': 'string'
},
],
'waitAndContinueSpecification': {
'waitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'continueResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'allowInterrupt': True|False
},
'stillWaitingResponse': {
'messageGroups': [
{
'message': {
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
'variations': [
{
'plainTextMessage': {
'value': 'string'
},
'customPayload': {
'value': 'string'
},
'ssmlMessage': {
'value': 'string'
},
'imageResponseCard': {
'title': 'string',
'subtitle': 'string',
'imageUrl': 'string',
'buttons': [
{
'text': 'string',
'value': 'string'
},
]
}
},
]
},
],
'frequencyInSeconds': 123,
'timeoutInSeconds': 123,
'allowInterrupt': True|False
},
'active': True|False
}
},
'obfuscationSetting': {
'obfuscationSettingType': 'None'|'DefaultObfuscation'
},
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'intentId': 'string',
'creationDateTime': datetime(2015, 1, 1),
'lastUpdatedDateTime': datetime(2015, 1, 1),
'multipleValuesSetting': {
'allowMultipleValues': True|False
}
}
Response Structure
(dict) --
slotId (string) --
The unique identifier of the slot that was updated.
slotName (string) --
The updated name of the slot.
description (string) --
The updated description of the bot.
slotTypeId (string) --
The updated identifier of the slot type that provides values for the slot.
valueElicitationSetting (dict) --
The updated prompts that Amazon Lex sends to the user to elicit a response that provides a value for the slot.
defaultValueSpecification (dict) --
A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
defaultValueList (list) --
A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
(dict) --
Specifies the default value to use when a user doesn't provide a value for a slot.
defaultValue (string) --
The default value to use when a user doesn't provide a value for a slot.
slotConstraint (string) --
Specifies whether the slot is required or optional.
promptSpecification (dict) --
The prompt that Amazon Lex uses to elicit the slot value from the user.
messageGroups (list) --
A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
maxRetries (integer) --
The maximum number of times the bot tries to elicit a response from the user using this prompt.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy (string) --
Indicates how a message is selected from a message group among retries.
sampleUtterances (list) --
If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
(dict) --
A sample utterance that invokes an intent or respond to a slot elicitation prompt.
utterance (string) --
The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
waitAndContinueSpecification (dict) --
Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
waitingResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
continueResponse (dict) --
The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
messageGroups (list) --
A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
allowInterrupt (boolean) --
Indicates whether the user can interrupt a speech response from Amazon Lex.
stillWaitingResponse (dict) --
A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
messageGroups (list) --
One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
(dict) --
Provides one or more messages that Amazon Lex should send to the user.
message (dict) --
The primary message that Amazon Lex should send to the user.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
variations (list) --
Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
(dict) --
The object that provides message text and it's type.
plainTextMessage (dict) --
A message in plain text format.
value (string) --
The message to send to the user.
customPayload (dict) --
A message in a custom format defined by the client application.
value (string) --
The string that is sent to your application.
ssmlMessage (dict) --
A message in Speech Synthesis Markup Language (SSML).
value (string) --
The SSML text that defines the prompt.
imageResponseCard (dict) --
A message that defines a response card that the client application can show to the user.
title (string) --
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
subtitle (string) --
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
imageUrl (string) --
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
buttons (list) --
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
(dict) --
Describes a button to use on a response card used to gather slot values from a user.
text (string) --
The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
value (string) --
The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
frequencyInSeconds (integer) --
How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
timeoutInSeconds (integer) --
If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
allowInterrupt (boolean) --
Indicates that the user can interrupt the response by speaking while the message is being played.
active (boolean) --
Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active
field isn't specified, the default is true.
obfuscationSetting (dict) --
The updated setting that determines whether the slot value is obfuscated in the Amazon CloudWatch logs.
obfuscationSettingType (string) --
Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
botId (string) --
The identifier of the bot that contains the slot.
botVersion (string) --
The identifier of the slot version that contains the slot. Will always be DRAFT
.
localeId (string) --
The locale that contains the slot.
intentId (string) --
The intent that contains the slot.
creationDateTime (datetime) --
The timestamp of the date and time that the slot was created.
lastUpdatedDateTime (datetime) --
The timestamp of the date and time that the slot was last updated.
multipleValuesSetting (dict) --
Indicates whether the slot accepts multiple values in one response.
allowMultipleValues (boolean) --
Indicates whether a slot can return multiple values. When true
, the slot may return more than one value in a response. When false
, the slot returns only a single value.
Multi-value slots are only available in the en-US locale. If you set this value to true
in any other locale, Amazon Lex throws a ValidationException
.
If the allowMutlipleValues
is not set, the default value is false
.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
update_slot_type
(**kwargs)¶Updates the configuration of an existing slot type.
See also: AWS API Documentation
Request Syntax
response = 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'
}
}
}
)
[REQUIRED]
The unique identifier of the slot type to update.
[REQUIRED]
The new name of the slot type.
A new list of values and their optional synonyms that define the values that the slot type can take.
Each slot type can have a set of values. Each SlotTypeValue
represents a value that the slot type can take.
The value of the slot type entry.
The value that can be used for a slot type.
Additional values related to the slot type entry.
Defines one of the values for a slot type.
The value that can be used for a slot type.
The strategy that Amazon Lex should use when deciding on a value from the list of slot type values.
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:
If you don't specify the valueSelectionStrategy, the default is OriginalValue.
A regular expression used to validate the value of a slot.
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:
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Provides settings that enable advanced recognition settings for slot values.
Enables using the slot values as a custom vocabulary for recognizing user utterances.
[REQUIRED]
The identifier of the bot that contains the slot type.
[REQUIRED]
The version of the bot that contains the slot type. Must be DRAFT
.
[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 .
Provides information about the external source of the slot type's definition.
Settings required for a slot type based on a grammar that you provide.
The source of the grammar used to create the slot type.
The name of the S3 bucket that contains the grammar source.
The path to the grammar in the S3 bucket.
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:
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:
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
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.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.PreconditionFailedException
LexModelsV2.Client.exceptions.ConflictException
LexModelsV2.Client.exceptions.InternalServerException
The available paginators are:
The available waiters are:
LexModelsV2.Waiter.BotAliasAvailable
LexModelsV2.Waiter.BotAvailable
LexModelsV2.Waiter.BotExportCompleted
LexModelsV2.Waiter.BotImportCompleted
LexModelsV2.Waiter.BotLocaleBuilt
LexModelsV2.Waiter.BotLocaleCreated
LexModelsV2.Waiter.BotLocaleExpressTestingAvailable
LexModelsV2.Waiter.BotVersionAvailable
LexModelsV2.Waiter.
BotAliasAvailable
¶waiter = client.get_waiter('bot_alias_available')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot_alias()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botAliasId='string',
botId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The identifier of the bot alias to describe.
[REQUIRED]
The identifier of the bot associated with the bot alias to describe.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotAvailable
¶waiter = client.get_waiter('bot_available')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The unique identifier of the bot to describe.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotExportCompleted
¶waiter = client.get_waiter('bot_export_completed')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_export()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
exportId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The unique identifier of the export to describe.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotImportCompleted
¶waiter = client.get_waiter('bot_import_completed')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_import()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
importId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The unique identifier of the import to describe.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotLocaleBuilt
¶waiter = client.get_waiter('bot_locale_built')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot_locale()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botId='string',
botVersion='string',
localeId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The identifier of the bot associated with the locale.
[REQUIRED]
The identifier of the version of the bot associated with the locale.
[REQUIRED]
The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages .
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotLocaleCreated
¶waiter = client.get_waiter('bot_locale_created')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot_locale()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botId='string',
botVersion='string',
localeId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The identifier of the bot associated with the locale.
[REQUIRED]
The identifier of the version of the bot associated with the locale.
[REQUIRED]
The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages .
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotLocaleExpressTestingAvailable
¶waiter = client.get_waiter('bot_locale_express_testing_available')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot_locale()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botId='string',
botVersion='string',
localeId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The identifier of the bot associated with the locale.
[REQUIRED]
The identifier of the version of the bot associated with the locale.
[REQUIRED]
The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages .
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None
LexModelsV2.Waiter.
BotVersionAvailable
¶waiter = client.get_waiter('bot_version_available')
wait
(**kwargs)¶Polls LexModelsV2.Client.describe_bot_version()
every 10 seconds until a successful state is reached. An error is returned after 35 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
botId='string',
botVersion='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The identifier of the bot containing the version to return metadata for.
[REQUIRED]
The version of the bot to return metadata for.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 10
The maximum number of attempts to be made. Default: 35
None