Skip to main content

bots

Creates, updates, deletes, gets or lists a bots resource.

Overview

Namebots
TypeResource
Idaws.lexv2_models.bots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_idstringThe unique identifier of the bot. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_membersarrayThe list of bots in the network that was described.
bot_namestringThe name of the bot. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
bot_statusstringThe current status of the bot. When the status is Available the bot is ready to be used in conversations with users. (Creating, Available, Inactive, Deleting, Failed, Versioning, Importing, Updating)
bot_typestringThe type of the bot that was described. (Bot, BotNetwork)
creation_date_timestring (date-time)A timestamp of the date and time that the bot was created.
data_privacyobjectBy 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.
descriptionstringThe description of the bot.
error_log_settingsobjectSettings parameters for the error logs, whether it is enabled or disabled.
failure_reasonsarrayIf the botStatus is Failed, this contains a list of reasons that the bot couldn't be built.
idle_session_ttl_in_secondsintegerThe maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
last_updated_date_timestring (date-time)A timestamp of the date and time that the bot was last updated.
role_arnstringThe Amazon Resource Name (ARN) of an IAM role that has permission to access the bot. (pattern: <code>^arn:aws:iam::[0-9]{12}:role/.*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_botselectbot_id, regionProvides metadata information about a bot.
list_botsselectregionGets a list of available bots.
create_botinsertregion, botName, roleArn, dataPrivacy, idleSessionTTLInSecondsCreates an Amazon Lex conversational bot.
update_botupdatebot_id, region, botName, roleArn, dataPrivacy, idleSessionTTLInSecondsUpdates the configuration of an existing bot.
delete_custom_vocabularydeletebot_id, bot_version, locale_id, regionRemoves a custom vocabulary from the specified locale in the specified bot.
delete_botdeletebot_id, regionskipResourceInUseCheckDeletes 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.
batch_create_custom_vocabulary_itemexecbot_id, bot_version, locale_id, region, customVocabularyItemListCreate a batch of custom vocabulary items for a given bot locale's custom vocabulary.
batch_delete_custom_vocabulary_itemexecbot_id, bot_version, locale_id, region, customVocabularyItemListDelete a batch of custom vocabulary items for a given bot locale's custom vocabulary.
batch_update_custom_vocabulary_itemexecbot_id, bot_version, locale_id, region, customVocabularyItemListUpdate a batch of custom vocabulary items for a given bot locale's custom vocabulary.
build_bot_localeexecbot_id, bot_version, locale_id, regionBuilds 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.
delete_utterancesexecbot_id, regionlocaleId, sessionIdDeletes 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.
generate_bot_elementexecbot_id, bot_version, locale_id, region, intentIdGenerates sample utterances for an intent.
start_bot_recommendationexecbot_id, bot_version, locale_id, region, transcriptSourceSettingUse this to provide your transcript data, and to start the bot recommendation process.
start_bot_analyzerexecbot_id, region, analysisScopeInitiates an asynchronous analysis of your bot configuration using AI-powered analysis to identify potential issues and recommend improvements based on AWS best practices. The analysis examines your bot's configuration, including intents, utterances, slots, and conversation flows, to provide actionable recommendations for optimization.
start_bot_resource_generationexecbot_id, bot_version, locale_id, region, generationInputPromptStarts a request for the descriptive bot builder to generate a bot locale configuration based on the prompt you provide it. After you make this call, use the DescribeBotResourceGeneration operation to check on the status of the generation and for the generatedBotLocaleUrl when the generation is complete. Use that value to retrieve the Amazon S3 object containing the bot locale configuration. You can then modify and import this configuration.
stop_bot_analyzerexecbot_id, bot_analyzer_request_id, regionCancels an ongoing bot analysis execution. Once stopped, the analysis cannot be resumed and no recommendations will be generated.
stop_bot_recommendationexecbot_id, bot_version, locale_id, bot_recommendation_id, regionStop an already running Bot Recommendation request.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bot_analyzer_request_idstringThe unique identifier of the analysis request to stop.
bot_idstringThe unique identifier of the bot containing the bot recommendation to be stopped.
bot_recommendation_idstringThe unique identifier of the bot recommendation to be stopped.
bot_versionstringThe version of the bot containing the bot recommendation.
locale_idstringThe identifier of the language and locale of the bot recommendation to stop. The string must match one of the supported locales. For more information, see Supported languages
regionstringAWS region (default: us-east-1)
localeIdstringThe identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see Supported languages.
sessionIdstringThe unique identifier of the session with the user. The ID is returned in the response from the RecognizeText and RecognizeUtterance operations.
skipResourceInUseCheckbooleanBy default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a ResourceInUseException exception if the bot is being used by another resource. Set this parameter to true to skip this check and remove the bot even if it is being used by another resource.

SELECT examples

Provides metadata information about a bot.

SELECT
bot_id,
bot_members,
bot_name,
bot_status,
bot_type,
creation_date_time,
data_privacy,
description,
error_log_settings,
failure_reasons,
idle_session_ttl_in_seconds,
last_updated_date_time,
role_arn
FROM aws.lexv2_models.bots
WHERE bot_id = '{{ bot_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon Lex conversational bot.

INSERT INTO aws.lexv2_models.bots (
botName,
description,
roleArn,
dataPrivacy,
idleSessionTTLInSeconds,
botTags,
testBotAliasTags,
botType,
botMembers,
errorLogSettings,
region
)
SELECT
'{{ botName }}' /* required */,
'{{ description }}',
'{{ roleArn }}' /* required */,
'{{ dataPrivacy }}' /* required */,
{{ idleSessionTTLInSeconds }} /* required */,
'{{ botTags }}',
'{{ testBotAliasTags }}',
'{{ botType }}',
'{{ botMembers }}',
'{{ errorLogSettings }}',
'{{ region }}'
RETURNING
bot_id,
bot_members,
bot_name,
bot_status,
bot_tags,
bot_type,
creation_date_time,
data_privacy,
description,
error_log_settings,
idle_session_ttl_in_seconds,
role_arn,
test_bot_alias_tags
;

UPDATE examples

Updates the configuration of an existing bot.

UPDATE aws.lexv2_models.bots
SET
botName = '{{ botName }}',
description = '{{ description }}',
roleArn = '{{ roleArn }}',
dataPrivacy = '{{ dataPrivacy }}',
idleSessionTTLInSeconds = {{ idleSessionTTLInSeconds }},
botType = '{{ botType }}',
botMembers = '{{ botMembers }}',
errorLogSettings = '{{ errorLogSettings }}'
WHERE
bot_id = '{{ bot_id }}' --required
AND region = '{{ region }}' --required
AND botName = '{{ botName }}' --required
AND roleArn = '{{ roleArn }}' --required
AND dataPrivacy = '{{ dataPrivacy }}' --required
AND idleSessionTTLInSeconds = '{{ idleSessionTTLInSeconds }}' --required
RETURNING
bot_id,
bot_members,
bot_name,
bot_status,
bot_type,
creation_date_time,
data_privacy,
description,
error_log_settings,
idle_session_ttl_in_seconds,
last_updated_date_time,
role_arn;

DELETE examples

Removes a custom vocabulary from the specified locale in the specified bot.

DELETE FROM aws.lexv2_models.bots
WHERE bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Create a batch of custom vocabulary items for a given bot locale's custom vocabulary.

EXEC aws.lexv2_models.bots.batch_create_custom_vocabulary_item
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"customVocabularyItemList": "{{ customVocabularyItemList }}"
}'
;