bots
Creates, updates, deletes, gets or lists a bots resource.
Overview
| Name | bots |
| Type | Resource |
| Id | aws.lexv2_models.bots |
Fields
The following fields are returned by SELECT queries:
- describe_bot
- list_bots
| Name | Datatype | Description |
|---|---|---|
bot_id | string | The unique identifier of the bot. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_members | array | The list of bots in the network that was described. |
bot_name | string | The name of the bot. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
bot_status | string | The 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_type | string | The type of the bot that was described. (Bot, BotNetwork) |
creation_date_time | string (date-time) | A timestamp of the date and time that the bot was created. |
data_privacy | object | 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. |
description | string | The description of the bot. |
error_log_settings | object | Settings parameters for the error logs, whether it is enabled or disabled. |
failure_reasons | array | If the botStatus is Failed, this contains a list of reasons that the bot couldn't be built. |
idle_session_ttl_in_seconds | integer | The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. |
last_updated_date_time | string (date-time) | A timestamp of the date and time that the bot was last updated. |
role_arn | string | The 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>) |
| Name | Datatype | Description |
|---|---|---|
bot_summaries | array | 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. |
next_token | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_bot | select | bot_id, region | Provides metadata information about a bot. | |
list_bots | select | region | Gets a list of available bots. | |
create_bot | insert | region, botName, roleArn, dataPrivacy, idleSessionTTLInSeconds | Creates an Amazon Lex conversational bot. | |
update_bot | update | bot_id, region, botName, roleArn, dataPrivacy, idleSessionTTLInSeconds | Updates the configuration of an existing bot. | |
delete_custom_vocabulary | delete | bot_id, bot_version, locale_id, region | Removes a custom vocabulary from the specified locale in the specified bot. | |
delete_bot | delete | bot_id, region | skipResourceInUseCheck | 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. |
batch_create_custom_vocabulary_item | exec | bot_id, bot_version, locale_id, region, customVocabularyItemList | Create a batch of custom vocabulary items for a given bot locale's custom vocabulary. | |
batch_delete_custom_vocabulary_item | exec | bot_id, bot_version, locale_id, region, customVocabularyItemList | Delete a batch of custom vocabulary items for a given bot locale's custom vocabulary. | |
batch_update_custom_vocabulary_item | exec | bot_id, bot_version, locale_id, region, customVocabularyItemList | Update a batch of custom vocabulary items for a given bot locale's custom vocabulary. | |
build_bot_locale | exec | bot_id, bot_version, locale_id, region | 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. | |
delete_utterances | exec | bot_id, region | localeId, sessionId | 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. |
generate_bot_element | exec | bot_id, bot_version, locale_id, region, intentId | Generates sample utterances for an intent. | |
start_bot_recommendation | exec | bot_id, bot_version, locale_id, region, transcriptSourceSetting | Use this to provide your transcript data, and to start the bot recommendation process. | |
start_bot_analyzer | exec | bot_id, region, analysisScope | Initiates 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_generation | exec | bot_id, bot_version, locale_id, region, generationInputPrompt | Starts 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_analyzer | exec | bot_id, bot_analyzer_request_id, region | Cancels an ongoing bot analysis execution. Once stopped, the analysis cannot be resumed and no recommendations will be generated. | |
stop_bot_recommendation | exec | bot_id, bot_version, locale_id, bot_recommendation_id, region | Stop 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.
| Name | Datatype | Description |
|---|---|---|
bot_analyzer_request_id | string | The unique identifier of the analysis request to stop. |
bot_id | string | The unique identifier of the bot containing the bot recommendation to be stopped. |
bot_recommendation_id | string | The unique identifier of the bot recommendation to be stopped. |
bot_version | string | The version of the bot containing the bot recommendation. |
locale_id | string | The 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 |
region | string | AWS region (default: us-east-1) |
localeId | string | The 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. |
sessionId | string | The unique identifier of the session with the user. The ID is returned in the response from the RecognizeText and RecognizeUtterance operations. |
skipResourceInUseCheck | boolean | By 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
- describe_bot
- list_bots
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
;
Gets a list of available bots.
SELECT
bot_summaries,
next_token
FROM aws.lexv2_models.bots
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_bot
- Manifest
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
;
# Description fields are for documentation purposes
- name: bots
props:
- name: region
value: "{{ region }}"
description: Required parameter for the bots resource.
- name: botName
value: "{{ botName }}"
- name: description
value: "{{ description }}"
- name: roleArn
value: "{{ roleArn }}"
- name: dataPrivacy
description: |
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.
value:
childDirected: {{ childDirected }}
- name: idleSessionTTLInSeconds
value: {{ idleSessionTTLInSeconds }}
- name: botTags
value: "{{ botTags }}"
- name: testBotAliasTags
value: "{{ testBotAliasTags }}"
- name: botType
value: "{{ botType }}"
valid_values: ['Bot', 'BotNetwork']
- name: botMembers
value:
- botMemberId: "{{ botMemberId }}"
botMemberName: "{{ botMemberName }}"
botMemberAliasId: "{{ botMemberAliasId }}"
botMemberAliasName: "{{ botMemberAliasName }}"
botMemberVersion: "{{ botMemberVersion }}"
- name: errorLogSettings
description: |
Settings parameters for the error logs, whether it is enabled or disabled.
value:
enabled: {{ enabled }}
UPDATE examples
- update_bot
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
- delete_custom_vocabulary
- delete_bot
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
;
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.
DELETE FROM aws.lexv2_models.bots
WHERE bot_id = '{{ bot_id }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;
Lifecycle Methods
- batch_create_custom_vocabulary_item
- batch_delete_custom_vocabulary_item
- batch_update_custom_vocabulary_item
- build_bot_locale
- delete_utterances
- generate_bot_element
- start_bot_recommendation
- start_bot_analyzer
- start_bot_resource_generation
- stop_bot_analyzer
- stop_bot_recommendation
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 }}"
}'
;
Delete a batch of custom vocabulary items for a given bot locale's custom vocabulary.
EXEC aws.lexv2_models.bots.batch_delete_custom_vocabulary_item
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"customVocabularyItemList": "{{ customVocabularyItemList }}"
}'
;
Update a batch of custom vocabulary items for a given bot locale's custom vocabulary.
EXEC aws.lexv2_models.bots.batch_update_custom_vocabulary_item
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"customVocabularyItemList": "{{ customVocabularyItemList }}"
}'
;
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.
EXEC aws.lexv2_models.bots.build_bot_locale
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
;
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.
EXEC aws.lexv2_models.bots.delete_utterances
@bot_id='{{ bot_id }}' --required,
@region='{{ region }}' --required,
@localeId='{{ localeId }}',
@sessionId='{{ sessionId }}'
;
Generates sample utterances for an intent.
EXEC aws.lexv2_models.bots.generate_bot_element
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"intentId": "{{ intentId }}"
}'
;
Use this to provide your transcript data, and to start the bot recommendation process.
EXEC aws.lexv2_models.bots.start_bot_recommendation
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"transcriptSourceSetting": "{{ transcriptSourceSetting }}",
"encryptionSetting": "{{ encryptionSetting }}"
}'
;
Initiates 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.
EXEC aws.lexv2_models.bots.start_bot_analyzer
@bot_id='{{ bot_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"analysisScope": "{{ analysisScope }}",
"localeId": "{{ localeId }}",
"botVersion": "{{ botVersion }}"
}'
;
Starts 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.
EXEC aws.lexv2_models.bots.start_bot_resource_generation
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"generationInputPrompt": "{{ generationInputPrompt }}"
}'
;
Cancels an ongoing bot analysis execution. Once stopped, the analysis cannot be resumed and no recommendations will be generated.
EXEC aws.lexv2_models.bots.stop_bot_analyzer
@bot_id='{{ bot_id }}' --required,
@bot_analyzer_request_id='{{ bot_analyzer_request_id }}' --required,
@region='{{ region }}' --required
;
Stop an already running Bot Recommendation request.
EXEC aws.lexv2_models.bots.stop_bot_recommendation
@bot_id='{{ bot_id }}' --required,
@bot_version='{{ bot_version }}' --required,
@locale_id='{{ locale_id }}' --required,
@bot_recommendation_id='{{ bot_recommendation_id }}' --required,
@region='{{ region }}' --required
;