Skip to main content

bot_alias

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

Overview

Namebot_alias
TypeResource
Idaws.lexv2_models.bot_alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_alias_history_eventsarrayA list of events that affect a bot alias. For example, an event is recorded when the version that the alias points to changes.
bot_alias_idstringThe identifier of the bot alias. (pattern: <code>^(\bTSTALIASID\b|[0-9a-zA-Z]+)$</code>)
bot_alias_locale_settingsobjectThe locale settings that are unique to the alias.
bot_alias_namestringThe name of the bot alias. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>)
bot_alias_statusstringThe current status of the alias. When the alias is Available, the alias is ready for use with your bot. (Creating, Available, Deleting, Failed)
bot_idstringThe identifier of the bot associated with the bot alias. (pattern: <code>^[0-9a-zA-Z]+$</code>)
bot_versionstringThe version of the bot associated with the bot alias. (pattern: <code>^(DRAFT|[0-9]+)$</code>)
conversation_log_settingsobjectConfigures conversation logging that saves audio, text, and metadata for the conversations with your users.
creation_date_timestring (date-time)A timestamp of the date and time that the alias was created.
descriptionstringThe description of the bot alias.
last_updated_date_timestring (date-time)A timestamp of the date and time that the alias was last updated.
parent_bot_networksarrayA list of the networks to which the bot alias you described belongs.
sentiment_analysis_settingsobjectDetermines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_bot_aliasselectbot_alias_id, bot_id, regionGet information about a specific bot alias.
create_bot_aliasinsertbot_id, region, botAliasNameCreates 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.
update_bot_aliasupdatebot_alias_id, bot_id, region, botAliasNameUpdates the configuration of an existing bot alias.
delete_bot_aliasdeletebot_alias_id, bot_id, regionskipResourceInUseCheckDeletes the specified bot alias.

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_alias_idstringThe unique identifier of the bot alias to delete.
bot_idstringThe unique identifier of the bot associated with the alias to delete.
regionstringAWS region (default: us-east-1)
skipResourceInUseCheckbooleanBy default, Amazon Lex checks if any other resource, such as a bot network, is using the bot alias before it is deleted and throws a ResourceInUseException exception if the alias is being used by another resource. Set this parameter to true to skip this check and remove the alias even if it is being used by another resource.

SELECT examples

Get information about a specific bot alias.

SELECT
bot_alias_history_events,
bot_alias_id,
bot_alias_locale_settings,
bot_alias_name,
bot_alias_status,
bot_id,
bot_version,
conversation_log_settings,
creation_date_time,
description,
last_updated_date_time,
parent_bot_networks,
sentiment_analysis_settings
FROM aws.lexv2_models.bot_alias
WHERE bot_alias_id = '{{ bot_alias_id }}' -- required
AND bot_id = '{{ bot_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.lexv2_models.bot_alias (
botAliasName,
description,
botVersion,
botAliasLocaleSettings,
conversationLogSettings,
sentimentAnalysisSettings,
tags,
bot_id,
region
)
SELECT
'{{ botAliasName }}' /* required */,
'{{ description }}',
'{{ botVersion }}',
'{{ botAliasLocaleSettings }}',
'{{ conversationLogSettings }}',
'{{ sentimentAnalysisSettings }}',
'{{ tags }}',
'{{ bot_id }}',
'{{ region }}'
RETURNING
bot_alias_id,
bot_alias_locale_settings,
bot_alias_name,
bot_alias_status,
bot_id,
bot_version,
conversation_log_settings,
creation_date_time,
description,
sentiment_analysis_settings,
tags
;

UPDATE examples

Updates the configuration of an existing bot alias.

UPDATE aws.lexv2_models.bot_alias
SET
botAliasName = '{{ botAliasName }}',
description = '{{ description }}',
botVersion = '{{ botVersion }}',
botAliasLocaleSettings = '{{ botAliasLocaleSettings }}',
conversationLogSettings = '{{ conversationLogSettings }}',
sentimentAnalysisSettings = '{{ sentimentAnalysisSettings }}'
WHERE
bot_alias_id = '{{ bot_alias_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND region = '{{ region }}' --required
AND botAliasName = '{{ botAliasName }}' --required
RETURNING
bot_alias_id,
bot_alias_locale_settings,
bot_alias_name,
bot_alias_status,
bot_id,
bot_version,
conversation_log_settings,
creation_date_time,
description,
last_updated_date_time,
sentiment_analysis_settings;

DELETE examples

Deletes the specified bot alias.

DELETE FROM aws.lexv2_models.bot_alias
WHERE bot_alias_id = '{{ bot_alias_id }}' --required
AND bot_id = '{{ bot_id }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;