Skip to main content

bot_alias

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

Overview

Namebot_alias
TypeResource
Idaws.lex_models.bot_alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the bot alias. (pattern: <code>^([A-Za-z]_?)+$</code>)
bot_namestringThe name of the bot that the alias points to. (pattern: <code>^([A-Za-z]_?)+$</code>)
bot_versionstringThe version of the bot that the alias points to. (pattern: <code>$LATEST|[0-9]+</code>)
checksumstringChecksum of the bot alias.
conversation_logsobjectThe settings that determine how Amazon Lex uses conversation logs for the alias.
created_datestring (date-time)The date that the bot alias was created.
descriptionstringA description of the bot alias.
last_updated_datestring (date-time)The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bot_aliasselectname, bot_name, regionReturns information about an Amazon Lex bot alias. For more information about aliases, see versioning-aliases. This operation requires permissions for the lex:GetBotAlias action.
put_bot_aliasreplacename, bot_name, region, botVersionCreates an alias for the specified version of the bot or replaces an alias for the specified bot. To change the version of the bot that the alias points to, replace the alias. For more information about aliases, see versioning-aliases. This operation requires permissions for the lex:PutBotAlias action.
delete_bot_aliasdeletename, bot_name, regionDeletes an alias for the specified bot. You can't delete an alias that is used in the association between a bot and a messaging channel. If an alias is used in a channel association, the DeleteBot operation returns a ResourceInUseException exception that includes a reference to the channel association that refers to the bot. You can remove the reference to the alias by deleting the channel association. If you get the same exception again, delete the referring association until the DeleteBotAlias operation is successful.

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_namestringThe name of the bot that the alias points to.
namestringThe name of the alias to delete. The name is case sensitive.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about an Amazon Lex bot alias. For more information about aliases, see versioning-aliases. This operation requires permissions for the lex:GetBotAlias action.

SELECT
name,
bot_name,
bot_version,
checksum,
conversation_logs,
created_date,
description,
last_updated_date
FROM aws.lex_models.bot_alias
WHERE name = '{{ name }}' -- required
AND bot_name = '{{ bot_name }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Creates an alias for the specified version of the bot or replaces an alias for the specified bot. To change the version of the bot that the alias points to, replace the alias. For more information about aliases, see versioning-aliases. This operation requires permissions for the lex:PutBotAlias action.

REPLACE aws.lex_models.bot_alias
SET
description = '{{ description }}',
botVersion = '{{ botVersion }}',
checksum = '{{ checksum }}',
conversationLogs = '{{ conversationLogs }}',
tags = '{{ tags }}'
WHERE
name = '{{ name }}' --required
AND bot_name = '{{ bot_name }}' --required
AND region = '{{ region }}' --required
AND botVersion = '{{ botVersion }}' --required
RETURNING
name,
bot_name,
bot_version,
checksum,
conversation_logs,
created_date,
description,
last_updated_date,
tags;

DELETE examples

Deletes an alias for the specified bot. You can't delete an alias that is used in the association between a bot and a messaging channel. If an alias is used in a channel association, the DeleteBot operation returns a ResourceInUseException exception that includes a reference to the channel association that refers to the bot. You can remove the reference to the alias by deleting the channel association. If you get the same exception again, delete the referring association until the DeleteBotAlias operation is successful.

DELETE FROM aws.lex_models.bot_alias
WHERE name = '{{ name }}' --required
AND bot_name = '{{ bot_name }}' --required
AND region = '{{ region }}' --required
;