bots
Creates, updates, deletes or gets a bot
resource or lists bots
in a region
Overview
Name | bots |
Type | Resource |
Description | Amazon Lex conversational bot performing automated tasks such as ordering a pizza, booking a hotel, and so on. |
Id | aws.lex.bots |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Unique ID of resource |
arn | string | |
name | string | A unique identifier for a resource. |
description | string | A description of the version. Use the description to help identify the version in lists. |
role_arn | string | The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot. |
data_privacy | object | Data privacy setting of the Bot. |
idle_session_ttl_in_seconds | integer | IdleSessionTTLInSeconds of the resource |
bot_locales | array | List of bot locales |
bot_file_s3_location | object | S3 location of bot definitions zip file, if it's not defined inline in CloudFormation. |
bot_tags | array | A list of tags to add to the bot, which can only be added at bot creation. |
test_bot_alias_tags | array | A 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_locales | boolean | Specifies whether to build the bot locales after bot creation completes. |
test_bot_alias_settings | object | Configuring the test bot alias settings for a given bot |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, RoleArn, DataPrivacy, IdleSessionTTLInSeconds, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lex.bots (
Name,
RoleArn,
DataPrivacy,
IdleSessionTTLInSeconds,
region
)
SELECT
'{{ Name }}',
'{{ RoleArn }}',
'{{ DataPrivacy }}',
'{{ IdleSessionTTLInSeconds }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lex.bots (
Name,
Description,
RoleArn,
DataPrivacy,
IdleSessionTTLInSeconds,
BotLocales,
BotFileS3Location,
BotTags,
TestBotAliasTags,
AutoBuildBotLocales,
TestBotAliasSettings,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ RoleArn }}',
'{{ DataPrivacy }}',
'{{ IdleSessionTTLInSeconds }}',
'{{ BotLocales }}',
'{{ BotFileS3Location }}',
'{{ BotTags }}',
'{{ TestBotAliasTags }}',
'{{ AutoBuildBotLocales }}',
'{{ TestBotAliasSettings }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: bot
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: DataPrivacy
value:
ChildDirected: '{{ ChildDirected }}'
- name: IdleSessionTTLInSeconds
value: '{{ IdleSessionTTLInSeconds }}'
- name: BotLocales
value:
- LocaleId: '{{ LocaleId }}'
Description: null
VoiceSettings:
VoiceId: '{{ VoiceId }}'
Engine: '{{ Engine }}'
NluConfidenceThreshold: null
Intents:
- Name: null
Description: null
ParentIntentSignature: '{{ ParentIntentSignature }}'
SampleUtterances:
- Utterance: '{{ Utterance }}'
DialogCodeHook:
Enabled: '{{ Enabled }}'
FulfillmentCodeHook:
FulfillmentUpdatesSpecification:
StartResponse:
MessageGroups:
- Message:
PlainTextMessage:
Value: '{{ Value }}'
CustomPayload:
Value: '{{ Value }}'
SSMLMessage:
Value: '{{ Value }}'
ImageResponseCard:
Title: '{{ Title }}'
Subtitle: null
ImageUrl: '{{ ImageUrl }}'
Buttons:
- Text: '{{ Text }}'
Value: '{{ Value }}'
Variations:
- null
DelayInSeconds: '{{ DelayInSeconds }}'
AllowInterrupt: '{{ AllowInterrupt }}'
UpdateResponse:
MessageGroups: null
FrequencyInSeconds: '{{ FrequencyInSeconds }}'
AllowInterrupt: '{{ AllowInterrupt }}'
TimeoutInSeconds: '{{ TimeoutInSeconds }}'
Active: '{{ Active }}'
PostFulfillmentStatusSpecification:
SuccessResponse:
MessageGroupsList: null
AllowInterrupt: '{{ AllowInterrupt }}'
SuccessNextStep:
DialogAction:
Type: '{{ Type }}'
SlotToElicit: null
SuppressNextMessage: '{{ SuppressNextMessage }}'
Intent:
Name: null
Slots:
- SlotName: null
SlotValueOverride:
Shape: '{{ Shape }}'
Value:
InterpretedValue: '{{ InterpretedValue }}'
Values:
- null
SessionAttributes:
- Key: '{{ Key }}'
Value: '{{ Value }}'
SuccessConditional:
IsActive: '{{ IsActive }}'
ConditionalBranches:
- Name: null
Condition:
ExpressionString: '{{ ExpressionString }}'
NextStep: null
Response: null
DefaultBranch:
NextStep: null
Response: null
FailureResponse: null
FailureNextStep: null
FailureConditional: null
TimeoutResponse: null
TimeoutNextStep: null
TimeoutConditional: null
Enabled: '{{ Enabled }}'
IsActive: '{{ IsActive }}'
IntentConfirmationSetting:
PromptSpecification:
MessageGroupsList: null
MaxRetries: '{{ MaxRetries }}'
AllowInterrupt: '{{ AllowInterrupt }}'
MessageSelectionStrategy: '{{ MessageSelectionStrategy }}'
PromptAttemptsSpecification: {}
IsActive: '{{ IsActive }}'
ConfirmationResponse: null
ConfirmationNextStep: null
ConfirmationConditional: null
DeclinationResponse: null
DeclinationNextStep: null
DeclinationConditional: null
FailureResponse: null
FailureNextStep: null
FailureConditional: null
CodeHook:
EnableCodeHookInvocation: '{{ EnableCodeHookInvocation }}'
IsActive: '{{ IsActive }}'
InvocationLabel: null
PostCodeHookSpecification:
SuccessResponse: null
SuccessNextStep: null
SuccessConditional: null
FailureResponse: null
FailureNextStep: null
FailureConditional: null
TimeoutResponse: null
TimeoutNextStep: null
TimeoutConditional: null
ElicitationCodeHook:
EnableCodeHookInvocation: '{{ EnableCodeHookInvocation }}'
InvocationLabel: null
IntentClosingSetting:
ClosingResponse: null
IsActive: '{{ IsActive }}'
Conditional: null
NextStep: null
InitialResponseSetting:
InitialResponse: null
NextStep: null
Conditional: null
CodeHook: null
InputContexts:
- Name: null
OutputContexts:
- Name: null
TimeToLiveInSeconds: '{{ TimeToLiveInSeconds }}'
TurnsToLive: '{{ TurnsToLive }}'
KendraConfiguration:
KendraIndex: '{{ KendraIndex }}'
QueryFilterStringEnabled: '{{ QueryFilterStringEnabled }}'
QueryFilterString: '{{ QueryFilterString }}'
SlotPriorities:
- Priority: '{{ Priority }}'
SlotName: null
Slots:
- Name: null
Description: null
SlotTypeName: '{{ SlotTypeName }}'
ValueElicitationSetting:
DefaultValueSpecification:
DefaultValueList:
- DefaultValue: '{{ DefaultValue }}'
SlotConstraint: '{{ SlotConstraint }}'
PromptSpecification: null
SampleUtterances: null
WaitAndContinueSpecification:
WaitingResponse: null
ContinueResponse: null
StillWaitingResponse:
MessageGroupsList: null
FrequencyInSeconds: '{{ FrequencyInSeconds }}'
TimeoutInSeconds: '{{ TimeoutInSeconds }}'
AllowInterrupt: '{{ AllowInterrupt }}'
IsActive: '{{ IsActive }}'
SlotCaptureSetting:
CaptureResponse: null
CaptureNextStep: null
CaptureConditional: null
FailureResponse: null
FailureNextStep: null
FailureConditional: null
CodeHook: null
ElicitationCodeHook: null
ObfuscationSetting:
ObfuscationSettingType: '{{ ObfuscationSettingType }}'
MultipleValuesSetting:
AllowMultipleValues: '{{ AllowMultipleValues }}'
SlotTypes:
- Name: null
Description: null
ParentSlotTypeSignature: '{{ ParentSlotTypeSignature }}'
SlotTypeValues:
- SampleValue:
Value: '{{ Value }}'
Synonyms:
- null
ValueSelectionSetting:
ResolutionStrategy: '{{ ResolutionStrategy }}'
RegexFilter:
Pattern: '{{ Pattern }}'
AdvancedRecognitionSetting:
AudioRecognitionStrategy: '{{ AudioRecognitionStrategy }}'
ExternalSourceSetting:
GrammarSlotTypeSetting:
Source:
S3BucketName: '{{ S3BucketName }}'
S3ObjectKey: '{{ S3ObjectKey }}'
KmsKeyArn: '{{ KmsKeyArn }}'
CustomVocabulary:
CustomVocabularyItems:
- Phrase: '{{ Phrase }}'
Weight: '{{ Weight }}'
DisplayAs: '{{ DisplayAs }}'
- name: BotFileS3Location
value:
S3Bucket: null
S3ObjectKey: null
S3ObjectVersion: '{{ S3ObjectVersion }}'
- name: BotTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: TestBotAliasTags
value:
- null
- name: AutoBuildBotLocales
value: '{{ AutoBuildBotLocales }}'
- name: TestBotAliasSettings
value:
BotAliasLocaleSettings:
- LocaleId: '{{ LocaleId }}'
BotAliasLocaleSetting:
CodeHookSpecification:
LambdaCodeHook:
CodeHookInterfaceVersion: '{{ CodeHookInterfaceVersion }}'
LambdaArn: '{{ LambdaArn }}'
Enabled: '{{ Enabled }}'
ConversationLogSettings:
AudioLogSettings:
- Destination:
S3Bucket:
S3BucketArn: '{{ S3BucketArn }}'
LogPrefix: '{{ LogPrefix }}'
KmsKeyArn: '{{ KmsKeyArn }}'
Enabled: '{{ Enabled }}'
TextLogSettings:
- Destination:
CloudWatch:
CloudWatchLogGroupArn: '{{ CloudWatchLogGroupArn }}'
LogPrefix: '{{ LogPrefix }}'
Enabled: '{{ Enabled }}'
Description: null
SentimentAnalysisSettings:
DetectSentiment: '{{ DetectSentiment }}'
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