Package com.pulumi.aws.lex
Class Bot
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.lex.Bot
-
public class Bot extends com.pulumi.resources.CustomResourceProvides an Amazon Lex Bot resource. For more information see [Amazon Lex: How It Works](https://docs.aws.amazon.com/lex/latest/dg/how-it-works.html) ## Example Usage
## Import Using `pulumi import`, import bots using their name. For example: ```sh $ pulumi import aws:lex/bot:Bot order_flowers_bot OrderFlowers ```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.BotAbortStatementMessageArgs; import com.pulumi.aws.lex.inputs.BotClarificationPromptArgs; import com.pulumi.aws.lex.inputs.BotClarificationPromptMessageArgs; import com.pulumi.aws.lex.inputs.BotIntentArgs; import java.util.ArrayList; import java.util.Arrays; 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()) .clarificationPrompt(BotClarificationPromptArgs.builder() .messages(BotClarificationPromptMessageArgs.builder() .content("I didn't understand you, what would you like to do?") .contentType("PlainText") .build()) .maxAttempts(2) .build()) .intents(BotIntentArgs.builder() .intentName("OrderFlowers") .intentVersion("1") .build()) .childDirected(false) .createVersion(false) .description("Bot to order flowers on the behalf of a user") .idleSessionTtlInSeconds(600) .locale("en-US") .name("OrderFlowers") .processBehavior("BUILD") .voiceId("Salli") .build()); } }
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<BotAbortStatement>abortStatement()com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>checksum()com.pulumi.core.Output<java.lang.Boolean>childDirected()com.pulumi.core.Output<java.util.Optional<BotClarificationPrompt>>clarificationPrompt()com.pulumi.core.Output<java.lang.String>createdDate()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>createVersion()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>detectSentiment()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>enableModelImprovements()com.pulumi.core.Output<java.lang.String>failureReason()static Botget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BotState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>idleSessionTtlInSeconds()com.pulumi.core.Output<java.util.List<BotIntent>>intents()com.pulumi.core.Output<java.lang.String>lastUpdatedDate()com.pulumi.core.Output<java.util.Optional<java.lang.String>>locale()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.lang.Double>>nluIntentConfidenceThreshold()com.pulumi.core.Output<java.util.Optional<java.lang.String>>processBehavior()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>status()com.pulumi.core.Output<java.lang.String>version()com.pulumi.core.Output<java.lang.String>voiceId()
-
-
-
Constructor Detail
-
Bot
public Bot(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Bot
public Bot(java.lang.String name, BotArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Bot
public Bot(java.lang.String name, BotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
abortStatement
public com.pulumi.core.Output<BotAbortStatement> abortStatement()
- Returns:
- The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement.
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
-
checksum
public com.pulumi.core.Output<java.lang.String> checksum()
- Returns:
- Checksum identifying the version of the bot that was created. The checksum is not included as an argument because the resource will add it automatically when updating the bot.
-
childDirected
public com.pulumi.core.Output<java.lang.Boolean> childDirected()
- Returns:
- 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](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected).
-
clarificationPrompt
public com.pulumi.core.Output<java.util.Optional<BotClarificationPrompt>> clarificationPrompt()
- Returns:
- The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt.
-
createVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> createVersion()
- Returns:
- Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`.
-
createdDate
public com.pulumi.core.Output<java.lang.String> createdDate()
- Returns:
- The date when the bot version was created.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description of the bot. Must be less than or equal to 200 characters in length.
-
detectSentiment
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> detectSentiment()
- Returns:
- When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`.
-
enableModelImprovements
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableModelImprovements()
- Returns:
- Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` 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](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements).
-
failureReason
public com.pulumi.core.Output<java.lang.String> failureReason()
- Returns:
- If status is FAILED, Amazon Lex provides the reason that it failed to build the bot.
-
idleSessionTtlInSeconds
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> idleSessionTtlInSeconds()
- Returns:
- 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).
-
intents
public com.pulumi.core.Output<java.util.List<BotIntent>> intents()
- Returns:
- 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.
-
lastUpdatedDate
public com.pulumi.core.Output<java.lang.String> lastUpdatedDate()
- Returns:
- The date when the $LATEST version of this bot was updated.
-
locale
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> locale()
- Returns:
- 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](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length.
-
nluIntentConfidenceThreshold
public com.pulumi.core.Output<java.util.Optional<java.lang.Double>> nluIntentConfidenceThreshold()
- Returns:
- 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](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1.
-
processBehavior
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> processBehavior()
- Returns:
- If you set the `processBehavior` 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`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- When you send a request to create or update a bot, Amazon Lex sets the status response element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the failureReason response element.
-
version
public com.pulumi.core.Output<java.lang.String> version()
- Returns:
- The version of the bot.
-
voiceId
public com.pulumi.core.Output<java.lang.String> voiceId()
- Returns:
- 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](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide.
-
get
public static Bot get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable BotState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-