bot_aliases
Creates, updates, deletes or gets a bot_alias
resource or lists bot_aliases
in a region
Overview
Name | bot_aliases |
Type | Resource |
Description | A Bot Alias enables you to change the version of a bot without updating applications that use the bot |
Id | aws.lex.bot_aliases |
Fields
Name | Datatype | Description |
---|---|---|
bot_alias_id | string | Unique ID of resource |
bot_id | string | Unique ID of resource |
arn | string | |
bot_alias_status | string | |
bot_alias_locale_settings | array | A list of bot alias locale settings to add to the bot alias. |
bot_alias_name | string | A unique identifier for a resource. |
bot_version | object | A version is a numbered snapshot of your work that you can publish for use in different parts of your workflow, such as development, beta deployment, and production. |
conversation_log_settings | object | Contains information about code hooks that Amazon Lex calls during a conversation. |
description | string | A description of the version. Use the description to help identify the version in lists. |
sentiment_analysis_settings | object | Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances. |
bot_alias_tags | array | A list of tags to add to the bot alias. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BotId, BotAliasName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all bot_aliases
in a region.
SELECT
region,
bot_alias_id,
bot_id,
arn,
bot_alias_status,
bot_alias_locale_settings,
bot_alias_name,
bot_version,
conversation_log_settings,
description,
sentiment_analysis_settings,
bot_alias_tags
FROM aws.lex.bot_aliases
WHERE region = 'us-east-1';
Gets all properties from an individual bot_alias
.
SELECT
region,
bot_alias_id,
bot_id,
arn,
bot_alias_status,
bot_alias_locale_settings,
bot_alias_name,
bot_version,
conversation_log_settings,
description,
sentiment_analysis_settings,
bot_alias_tags
FROM aws.lex.bot_aliases
WHERE region = 'us-east-1' AND data__Identifier = '<BotAliasId>|<BotId>';
INSERT
example
Use the following StackQL query and manifest file to create a new bot_alias
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lex.bot_aliases (
BotId,
BotAliasName,
region
)
SELECT
'{{ BotId }}',
'{{ BotAliasName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lex.bot_aliases (
BotId,
BotAliasLocaleSettings,
BotAliasName,
BotVersion,
ConversationLogSettings,
Description,
SentimentAnalysisSettings,
BotAliasTags,
region
)
SELECT
'{{ BotId }}',
'{{ BotAliasLocaleSettings }}',
'{{ BotAliasName }}',
'{{ BotVersion }}',
'{{ ConversationLogSettings }}',
'{{ Description }}',
'{{ SentimentAnalysisSettings }}',
'{{ BotAliasTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: bot_alias
props:
- name: BotId
value: '{{ BotId }}'
- name: BotAliasLocaleSettings
value:
- LocaleId: '{{ LocaleId }}'
BotAliasLocaleSetting:
CodeHookSpecification:
LambdaCodeHook:
CodeHookInterfaceVersion: '{{ CodeHookInterfaceVersion }}'
LambdaArn: '{{ LambdaArn }}'
Enabled: '{{ Enabled }}'
- name: BotAliasName
value: '{{ BotAliasName }}'
- name: BotVersion
value:
BotId: null
Description: '{{ Description }}'
BotVersionLocaleSpecification:
- LocaleId: '{{ LocaleId }}'
BotVersionLocaleDetails:
SourceBotVersion: null
- name: ConversationLogSettings
value:
AudioLogSettings:
- Destination:
S3Bucket:
S3BucketArn: '{{ S3BucketArn }}'
LogPrefix: '{{ LogPrefix }}'
KmsKeyArn: '{{ KmsKeyArn }}'
Enabled: '{{ Enabled }}'
TextLogSettings:
- Destination:
CloudWatch:
CloudWatchLogGroupArn: '{{ CloudWatchLogGroupArn }}'
LogPrefix: '{{ LogPrefix }}'
Enabled: '{{ Enabled }}'
- name: Description
value: null
- name: SentimentAnalysisSettings
value:
DetectSentiment: '{{ DetectSentiment }}'
- name: BotAliasTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.lex.bot_aliases
WHERE data__Identifier = '<BotAliasId|BotId>'
AND region = 'us-east-1';
Permissions
To operate on the bot_aliases
resource, the following permissions are required:
Create
lex:CreateBotAlias,
lex:DescribeBot
Update
lex:UpdateBotAlias,
lex:DescribeBotAlias,
lex:ListTagsForResource,
lex:TagResource,
lex:UntagResource
Read
lex:DescribeBotAlias
Delete
lex:DeleteBotAlias
List
lex:ListBotAliases