BotArgs

data class BotArgs(val abortStatement: Output<BotAbortStatementArgs>? = null, val childDirected: Output<Boolean>? = null, val clarificationPrompt: Output<BotClarificationPromptArgs>? = null, val createVersion: Output<Boolean>? = null, val description: Output<String>? = null, val detectSentiment: Output<Boolean>? = null, val enableModelImprovements: Output<Boolean>? = null, val idleSessionTtlInSeconds: Output<Int>? = null, val intents: Output<List<BotIntentArgs>>? = null, val locale: Output<String>? = null, val name: Output<String>? = null, val nluIntentConfidenceThreshold: Output<Double>? = null, val processBehavior: Output<String>? = null, val voiceId: Output<String>? = null) : ConvertibleToJava<BotArgs>

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

Bots can be imported using their name.

$ pulumi import aws:lex/bot:Bot order_flowers_bot OrderFlowers

Constructors

Link copied to clipboard
constructor(abortStatement: Output<BotAbortStatementArgs>? = null, childDirected: Output<Boolean>? = null, clarificationPrompt: Output<BotClarificationPromptArgs>? = null, createVersion: Output<Boolean>? = null, description: Output<String>? = null, detectSentiment: Output<Boolean>? = null, enableModelImprovements: Output<Boolean>? = null, idleSessionTtlInSeconds: Output<Int>? = null, intents: Output<List<BotIntentArgs>>? = null, locale: Output<String>? = null, name: Output<String>? = null, nluIntentConfidenceThreshold: Output<Double>? = null, processBehavior: Output<String>? = null, voiceId: Output<String>? = null)

Properties

Link copied to clipboard

The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement.

Link copied to clipboard
val childDirected: Output<Boolean>? = null

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.

Link copied to clipboard

The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt.

Link copied to clipboard
val createVersion: Output<Boolean>? = null

Determines if a new bot version is created when the initial resource is created and on each update. Defaults to false.

Link copied to clipboard
val description: Output<String>? = null

A description of the bot. Must be less than or equal to 200 characters in length.

Link copied to clipboard
val detectSentiment: Output<Boolean>? = null

When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is false.

Link copied to clipboard
val enableModelImprovements: Output<Boolean>? = null

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.

Link copied to clipboard
val idleSessionTtlInSeconds: Output<Int>? = null

The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is 300. Must be a number between 60 and 86400 (inclusive).

Link copied to clipboard
val intents: Output<List<BotIntentArgs>>? = null

A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects.

Link copied to clipboard
val locale: Output<String>? = null

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.

Link copied to clipboard
val name: Output<String>? = null

The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length.

Link copied to clipboard

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.

Link copied to clipboard
val processBehavior: Output<String>? = null

If you set the process_behavior element to BUILD, Amazon Lex builds the bot so that it can be run. If you set the element to SAVE Amazon Lex saves the bot, but doesn't build it. Default is SAVE.

Link copied to clipboard
val voiceId: Output<String>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): BotArgs