bot_alias
Creates, updates, deletes, gets or lists a bot_alias resource.
Overview
| Name | bot_alias |
| Type | Resource |
| Id | aws.lex_models.bot_alias |
Fields
The following fields are returned by SELECT queries:
- get_bot_alias
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the bot alias. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_name | string | The name of the bot that the alias points to. (pattern: <code>^([A-Za-z]_?)+$</code>) |
bot_version | string | The version of the bot that the alias points to. (pattern: <code>$LATEST|[0-9]+</code>) |
checksum | string | Checksum of the bot alias. |
conversation_logs | object | The settings that determine how Amazon Lex uses conversation logs for the alias. |
created_date | string (date-time) | The date that the bot alias was created. |
description | string | A description of the bot alias. |
last_updated_date | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bot_alias | select | name, bot_name, region | 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. | |
put_bot_alias | replace | name, bot_name, region, botVersion | 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. | |
delete_bot_alias | delete | name, bot_name, region | 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. |
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_name | string | The name of the bot that the alias points to. |
name | string | The name of the alias to delete. The name is case sensitive. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_bot_alias
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
- put_bot_alias
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
- delete_bot_alias
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
;