Skip to main content

bot_aliases

Creates, updates, deletes or gets a bot_alias resource or lists bot_aliases in a region

Overview

Namebot_aliases
TypeResource
DescriptionA Bot Alias enables you to change the version of a bot without updating applications that use the bot
Idawscc.lex.bot_aliases

Fields

NameDatatypeDescription
bot_alias_idstringUnique ID of resource
arnstring
bot_alias_statusstring
bot_alias_locale_settingsarrayA list of bot alias locale settings to add to the bot alias.
bot_alias_namestringA unique identifier for a resource.
bot_versionobjectA 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_settingsobjectContains information about code hooks that Amazon Lex calls during a conversation.
descriptionstringA description of the version. Use the description to help identify the version in lists.
sentiment_analysis_settingsobjectDetermines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
bot_alias_tagsarrayA list of tags to add to the bot alias.
regionstringAWS region.

For more information, see AWS::Lex::BotAlias.

Methods

NameResourceAccessible byRequired Params
create_resourcebot_aliasesINSERTBotId, BotAliasName, region
delete_resourcebot_aliasesDELETEIdentifier, region
update_resourcebot_aliasesUPDATEIdentifier, PatchDocument, region
list_resourcesbot_aliases_list_onlySELECTregion
get_resourcebot_aliasesSELECTIdentifier, region

SELECT examples

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 awscc.lex.bot_aliases
WHERE
region = '{{ region }}' AND
Identifier = '{{ bot_alias_id }}|{{ bot_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new bot_alias resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.lex.bot_aliases (
BotId,
BotAliasName,
region
)
SELECT
'{{ bot_id }}',
'{{ bot_alias_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a bot_alias resource, using stack-deploy.

/*+ update */
UPDATE awscc.lex.bot_aliases
SET PatchDocument = string('{{ {
"BotAliasLocaleSettings": bot_alias_locale_settings,
"BotAliasName": bot_alias_name,
"BotVersion": bot_version,
"ConversationLogSettings": conversation_log_settings,
"Description": description,
"SentimentAnalysisSettings": sentiment_analysis_settings,
"BotAliasTags": bot_alias_tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ bot_alias_id }}|{{ bot_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lex.bot_aliases
WHERE
Identifier = '{{ bot_alias_id }}|{{ bot_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the bot_aliases resource, the following permissions are required:

lex:CreateBotAlias,
lex:DescribeBot