Bot Args
Provides an Amazon Lex Bot resource. For more information see Amazon Lex: How It Works
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lex.Bot;
import com.pulumi.aws.lex.BotArgs;
import com.pulumi.aws.lex.inputs.BotAbortStatementArgs;
import com.pulumi.aws.lex.inputs.BotClarificationPromptArgs;
import com.pulumi.aws.lex.inputs.BotIntentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var orderFlowersBot = new Bot("orderFlowersBot", BotArgs.builder()
.abortStatement(BotAbortStatementArgs.builder()
.messages(BotAbortStatementMessageArgs.builder()
.content("Sorry, I am not able to assist at this time")
.contentType("PlainText")
.build())
.build())
.childDirected(false)
.clarificationPrompt(BotClarificationPromptArgs.builder()
.maxAttempts(2)
.messages(BotClarificationPromptMessageArgs.builder()
.content("I didn't understand you, what would you like to do?")
.contentType("PlainText")
.build())
.build())
.createVersion(false)
.description("Bot to order flowers on the behalf of a user")
.idleSessionTtlInSeconds(600)
.intents(BotIntentArgs.builder()
.intentName("OrderFlowers")
.intentVersion("1")
.build())
.locale("en-US")
.name("OrderFlowers")
.processBehavior("BUILD")
.voiceId("Salli")
.build());
}
}
Import
Using pulumi import
, import bots using their name. For example:
$ pulumi import aws:lex/bot:Bot order_flowers_bot OrderFlowers
Constructors
Functions
Properties
By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the Amazon Lex FAQ and the Amazon Lex PutBot API Docs.
Set to true
to enable access to natural language understanding improvements. When you set the enable_model_improvements
parameter to true you can use the nlu_intent_confidence_threshold
parameter to configure confidence scores. For more information, see Confidence Scores. You can only set the enable_model_improvements
parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the Amazon Lex Bot PutBot API Docs.
Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see Amazon Lex Bot PutBot API Docs. Default is en-US
.
Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see Amazon Lex Bot PutBot API Docs This value requires enable_model_improvements
to be set to true
and the default is 0
. Must be a float between 0 and 1.
The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see Available Voices in the Amazon Polly Developer Guide.