bot_alias
Creates, updates, deletes, gets or lists a bot_alias resource.
Overview
| Name | bot_alias |
| Type | Resource |
| Id | aws.lexv2_models.bot_alias |
Fields
The following fields are returned by SELECT queries:
- describe_bot_alias
| Name | Datatype | Description |
|---|---|---|
bot_alias_history_events | array | A 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_id | string | The identifier of the bot alias. (pattern: <code>^(\bTSTALIASID\b|[0-9a-zA-Z]+)$</code>) |
bot_alias_locale_settings | object | The locale settings that are unique to the alias. |
bot_alias_name | string | The name of the bot alias. (pattern: <code>^([0-9a-zA-Z][_-]?){1,100}$</code>) |
bot_alias_status | string | The current status of the alias. When the alias is Available, the alias is ready for use with your bot. (Creating, Available, Deleting, Failed) |
bot_id | string | The identifier of the bot associated with the bot alias. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
bot_version | string | The version of the bot associated with the bot alias. (pattern: <code>^(DRAFT|[0-9]+)$</code>) |
conversation_log_settings | object | Configures conversation logging that saves audio, text, and metadata for the conversations with your users. |
creation_date_time | string (date-time) | A timestamp of the date and time that the alias was created. |
description | string | The description of the bot alias. |
last_updated_date_time | string (date-time) | A timestamp of the date and time that the alias was last updated. |
parent_bot_networks | array | A list of the networks to which the bot alias you described belongs. |
sentiment_analysis_settings | object | Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_bot_alias | select | bot_alias_id, bot_id, region | Get information about a specific bot alias. | |
create_bot_alias | insert | bot_id, region, botAliasName | 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. | |
update_bot_alias | update | bot_alias_id, bot_id, region, botAliasName | Updates the configuration of an existing bot alias. | |
delete_bot_alias | delete | bot_alias_id, bot_id, region | skipResourceInUseCheck | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
bot_alias_id | string | The unique identifier of the bot alias to delete. |
bot_id | string | The unique identifier of the bot associated with the alias to delete. |
region | string | AWS region (default: us-east-1) |
skipResourceInUseCheck | boolean | By 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
- describe_bot_alias
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
- create_bot_alias
- Manifest
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
;
# Description fields are for documentation purposes
- name: bot_alias
props:
- name: bot_id
value: "{{ bot_id }}"
description: Required parameter for the bot_alias resource.
- name: region
value: "{{ region }}"
description: Required parameter for the bot_alias resource.
- name: botAliasName
value: "{{ botAliasName }}"
- name: description
value: "{{ description }}"
- name: botVersion
value: "{{ botVersion }}"
- name: botAliasLocaleSettings
value: "{{ botAliasLocaleSettings }}"
- name: conversationLogSettings
description: |
Configures conversation logging that saves audio, text, and metadata for the conversations with your users.
value:
textLogSettings:
- enabled: {{ enabled }}
destination:
cloudWatch:
cloudWatchLogGroupArn: "{{ cloudWatchLogGroupArn }}"
logPrefix: "{{ logPrefix }}"
selectiveLoggingEnabled: {{ selectiveLoggingEnabled }}
audioLogSettings:
- enabled: {{ enabled }}
destination:
s3Bucket:
kmsKeyArn: "{{ kmsKeyArn }}"
s3BucketArn: "{{ s3BucketArn }}"
logPrefix: "{{ logPrefix }}"
selectiveLoggingEnabled: {{ selectiveLoggingEnabled }}
- name: sentimentAnalysisSettings
description: |
Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
value:
detectSentiment: {{ detectSentiment }}
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_bot_alias
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
- delete_bot_alias
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 }}'
;