Skip to main content

bot_locales

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

Overview

Namebot_locales
TypeResource
Idaws.lexv2_models.bot_locales

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
audio_filler_settingsobjectThe audio filler settings configured for the bot locale.
bot_idstringThe identifier of the bot associated with the locale. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_locale_history_eventsarrayHistory of changes, such as when a locale is used in an alias, that have taken place for the locale.
bot_locale_statusstringThe status of the bot. If the status is Failed, the reasons for the failure are listed in the failureReasons field. (Creating, Building, Built, ReadyExpressTesting, Failed, Deleting, NotBuilt, Importing, Processing)
bot_versionstringThe version of the bot associated with the locale. (pattern: <code>^(DRAFT|[0-9]+)$</code>)
creation_date_timestring (date-time)The date and time that the locale was created.
descriptionstringThe description of the locale.
failure_reasonsarrayif botLocaleStatus is Failed, Amazon Lex explains why it failed to build the bot.
generative_ai_settingsobjectContains settings for Amazon Bedrock's generative AI features for your bot locale.
intents_countintegerThe number of intents defined for the locale.
last_build_submitted_date_timestring (date-time)The date and time that the locale was last submitted for building.
last_updated_date_timestring (date-time)The date and time that the locale was last updated.
locale_idstringThe unique identifier of the described locale.
locale_namestringThe name of the locale.
nlu_intent_confidence_thresholdnumber (double)The confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.
recommended_actionsarrayRecommended actions to take to resolve an error in the failureReasons field.
slot_types_countintegerThe number of slot types defined for the locale.
speech_detection_sensitivitystringThe sensitivity level for voice activity detection (VAD) configured for the bot locale. (Default, HighNoiseTolerance, MaximumNoiseTolerance)
speech_recognition_settingsobjectThe speech-to-text settings configured for the bot locale.
unified_speech_settingsobjectThe unified speech settings configured for the bot locale.
voice_settingsobjectThe Amazon Polly voice Amazon Lex uses for voice interaction with the user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_bot_localeselectbot_id, bot_version, locale_id, regionDescribes the settings that a bot has for a specific locale.
list_bot_localesselectbot_id, bot_version, regionGets a list of locales for the specified bot.
create_bot_localeinsertbot_id, bot_version, region, localeId, nluIntentConfidenceThresholdCreates 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.
update_bot_localeupdatebot_id, bot_version, locale_id, region, nluIntentConfidenceThresholdUpdates the settings that a bot has for a specific locale.
delete_bot_localedeletebot_id, bot_version, locale_id, regionRemoves a locale from a bot. When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted.

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_idstringThe unique identifier of the bot that contains the locale.
bot_versionstringThe version of the bot that contains the locale.
locale_idstringThe 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.
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the settings that a bot has for a specific locale.

SELECT
audio_filler_settings,
bot_id,
bot_locale_history_events,
bot_locale_status,
bot_version,
creation_date_time,
description,
failure_reasons,
generative_ai_settings,
intents_count,
last_build_submitted_date_time,
last_updated_date_time,
locale_id,
locale_name,
nlu_intent_confidence_threshold,
recommended_actions,
slot_types_count,
speech_detection_sensitivity,
speech_recognition_settings,
unified_speech_settings,
voice_settings
FROM aws.lexv2_models.bot_locales
WHERE bot_id = '{{ bot_id }}' -- required
AND bot_version = '{{ bot_version }}' -- required
AND locale_id = '{{ locale_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.lexv2_models.bot_locales (
localeId,
description,
nluIntentConfidenceThreshold,
voiceSettings,
unifiedSpeechSettings,
audioFillerSettings,
speechRecognitionSettings,
generativeAISettings,
speechDetectionSensitivity,
bot_id,
bot_version,
region
)
SELECT
'{{ localeId }}' /* required */,
'{{ description }}',
{{ nluIntentConfidenceThreshold }} /* required */,
'{{ voiceSettings }}',
'{{ unifiedSpeechSettings }}',
'{{ audioFillerSettings }}',
'{{ speechRecognitionSettings }}',
'{{ generativeAISettings }}',
'{{ speechDetectionSensitivity }}',
'{{ bot_id }}',
'{{ bot_version }}',
'{{ region }}'
RETURNING
audio_filler_settings,
bot_id,
bot_locale_status,
bot_version,
creation_date_time,
description,
generative_ai_settings,
locale_id,
locale_name,
nlu_intent_confidence_threshold,
speech_detection_sensitivity,
speech_recognition_settings,
unified_speech_settings,
voice_settings
;

UPDATE examples

Updates the settings that a bot has for a specific locale.

UPDATE aws.lexv2_models.bot_locales
SET
description = '{{ description }}',
nluIntentConfidenceThreshold = {{ nluIntentConfidenceThreshold }},
voiceSettings = '{{ voiceSettings }}',
unifiedSpeechSettings = '{{ unifiedSpeechSettings }}',
audioFillerSettings = '{{ audioFillerSettings }}',
speechRecognitionSettings = '{{ speechRecognitionSettings }}',
generativeAISettings = '{{ generativeAISettings }}',
speechDetectionSensitivity = '{{ speechDetectionSensitivity }}'
WHERE
bot_id = '{{ bot_id }}' --required
AND bot_version = '{{ bot_version }}' --required
AND locale_id = '{{ locale_id }}' --required
AND region = '{{ region }}' --required
AND nluIntentConfidenceThreshold = '{{ nluIntentConfidenceThreshold }}' --required
RETURNING
audio_filler_settings,
bot_id,
bot_locale_status,
bot_version,
creation_date_time,
description,
failure_reasons,
generative_ai_settings,
last_updated_date_time,
locale_id,
locale_name,
nlu_intent_confidence_threshold,
recommended_actions,
speech_detection_sensitivity,
speech_recognition_settings,
unified_speech_settings,
voice_settings;

DELETE examples

Removes a locale from a bot. When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted.

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