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.
Idawscc.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_arnstring
data_privacyobject
error_log_settingsobject
idle_session_ttl_in_secondsinteger
bot_localesarray
bot_file_s3_locationobject
bot_tagsarray
test_bot_alias_tagsarray
auto_build_bot_localesboolean
test_bot_alias_settingsobject
replicationobject
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcebotsINSERTName, RoleArn, DataPrivacy, IdleSessionTTLInSeconds, region
delete_resourcebotsDELETEIdentifier, region
update_resourcebotsUPDATEIdentifier, PatchDocument, region
list_resourcesbots_list_onlySELECTregion
get_resourcebotsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual bot.

SELECT
region,
id,
arn,
name,
description,
role_arn,
data_privacy,
error_log_settings,
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,
replication
FROM awscc.lex.bots
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.lex.bots (
Name,
RoleArn,
DataPrivacy,
IdleSessionTTLInSeconds,
region
)
SELECT
'{{ name }}',
'{{ role_arn }}',
'{{ data_privacy }}',
'{{ idle_session_ttl_in_seconds }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.lex.bots
SET PatchDocument = string('{{ {
"Name": name,
"Description": description,
"RoleArn": role_arn,
"DataPrivacy": data_privacy,
"ErrorLogSettings": error_log_settings,
"IdleSessionTTLInSeconds": idle_session_ttl_in_seconds,
"BotLocales": bot_locales,
"BotFileS3Location": bot_file_s3_location,
"BotTags": bot_tags,
"TestBotAliasTags": test_bot_alias_tags,
"AutoBuildBotLocales": auto_build_bot_locales,
"TestBotAliasSettings": test_bot_alias_settings,
"Replication": replication
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.lex.bots
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

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

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,
iam:CreateServiceLinkedRole,
iam:GetRole,
lex:CreateBotReplica,
lex:DescribeBotReplica,
lex:DeleteBotReplica