Skip to main content

bots

Creates, updates, deletes or gets a bot resource or lists bots in a region

Overview

Namebots
TypeResource
DescriptionAmazon Lex conversational bot performing automated tasks such as ordering a pizza, booking a hotel, and so on.
Idaws.lex.bots

Fields

NameDatatypeDescription
idstringUnique ID of resource
arnstring
namestringA unique identifier for a resource.
descriptionstringA description of the version. Use the description to help identify the version in lists.
role_arnstringThe Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
data_privacyobjectData privacy setting of the Bot.
idle_session_ttl_in_secondsintegerIdleSessionTTLInSeconds of the resource
bot_localesarrayList of bot locales
bot_file_s3_locationobjectS3 location of bot definitions zip file, if it's not defined inline in CloudFormation.
bot_tagsarrayA list of tags to add to the bot, which can only be added at bot creation.
test_bot_alias_tagsarrayA list of tags to add to the test alias for a bot, , which can only be added at bot/bot alias creation.
auto_build_bot_localesbooleanSpecifies whether to build the bot locales after bot creation completes.
test_bot_alias_settingsobjectConfiguring the test bot alias settings for a given bot
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, RoleArn, DataPrivacy, IdleSessionTTLInSeconds, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all bots in a region.

SELECT
region,
id,
arn,
name,
description,
role_arn,
data_privacy,
idle_session_ttl_in_seconds,
bot_locales,
bot_file_s3_location,
bot_tags,
test_bot_alias_tags,
auto_build_bot_locales,
test_bot_alias_settings
FROM aws.lex.bots
WHERE region = 'us-east-1';

Gets all properties from an individual bot.

SELECT
region,
id,
arn,
name,
description,
role_arn,
data_privacy,
idle_session_ttl_in_seconds,
bot_locales,
bot_file_s3_location,
bot_tags,
test_bot_alias_tags,
auto_build_bot_locales,
test_bot_alias_settings
FROM aws.lex.bots
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

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

/*+ create */
INSERT INTO aws.lex.bots (
Name,
RoleArn,
DataPrivacy,
IdleSessionTTLInSeconds,
region
)
SELECT
'{{ Name }}',
'{{ RoleArn }}',
'{{ DataPrivacy }}',
'{{ IdleSessionTTLInSeconds }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lex.bots
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

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

Create

iam:PassRole,
lex:DescribeBot,
lex:CreateUploadUrl,
lex:StartImport,
lex:DescribeImport,
lex:ListTagsForResource,
lex:TagResource,
lex:CreateBot,
lex:CreateBotLocale,
lex:CreateIntent,
lex:CreateSlot,
lex:CreateSlotType,
lex:UpdateBot,
lex:UpdateBotLocale,
lex:UpdateIntent,
lex:UpdateSlot,
lex:UpdateSlotType,
lex:DeleteBotLocale,
lex:DeleteIntent,
lex:DeleteSlot,
lex:DeleteSlotType,
lex:DescribeBotLocale,
lex:BuildBotLocale,
lex:ListBots,
lex:ListBotLocales,
lex:CreateCustomVocabulary,
lex:UpdateCustomVocabulary,
lex:DeleteCustomVocabulary,
s3:GetObject,
lex:UpdateBotAlias

Read

lex:DescribeBot,
lex:ListTagsForResource

Update

iam:PassRole,
lex:DescribeBot,
lex:CreateUploadUrl,
lex:StartImport,
lex:DescribeImport,
lex:ListTagsForResource,
lex:TagResource,
lex:UntagResource,
lex:CreateBot,
lex:CreateBotLocale,
lex:CreateIntent,
lex:CreateSlot,
lex:CreateSlotType,
lex:UpdateBot,
lex:UpdateBotLocale,
lex:UpdateIntent,
lex:UpdateSlot,
lex:UpdateSlotType,
lex:DeleteBotLocale,
lex:DeleteIntent,
lex:DeleteSlot,
lex:DeleteSlotType,
lex:DescribeBotLocale,
lex:BuildBotLocale,
lex:ListBots,
lex:ListBotLocales,
lex:CreateCustomVocabulary,
lex:UpdateCustomVocabulary,
lex:DeleteCustomVocabulary,
s3:GetObject,
lex:UpdateBotAlias

Delete

lex:DeleteBot,
lex:DescribeBot,
lex:DeleteBotLocale,
lex:DeleteIntent,
lex:DeleteSlotType,
lex:DeleteSlot,
lex:DeleteBotVersion,
lex:DeleteBotChannel,
lex:DeleteBotAlias,
lex:DeleteCustomVocabulary

List

lex:ListBots