Package com.pulumi.aws.lex
Class Intent
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.lex.Intent
-
public class Intent extends com.pulumi.resources.CustomResource
Provides an Amazon Lex Intent resource. For more information see [Amazon Lex: How It Works](https://docs.aws.amazon.com/lex/latest/dg/how-it-works.html) ## Example Usage <!--Start PulumiCodeChooser -->package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.lex.Intent; import com.pulumi.aws.lex.IntentArgs; import com.pulumi.aws.lex.inputs.IntentConfirmationPromptArgs; import com.pulumi.aws.lex.inputs.IntentFulfillmentActivityArgs; import com.pulumi.aws.lex.inputs.IntentRejectionStatementArgs; import com.pulumi.aws.lex.inputs.IntentSlotArgs; import com.pulumi.aws.lex.inputs.IntentSlotValueElicitationPromptArgs; 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 orderFlowersIntent = new Intent("orderFlowersIntent", IntentArgs.builder() .confirmationPrompt(IntentConfirmationPromptArgs.builder() .maxAttempts(2) .messages(IntentConfirmationPromptMessageArgs.builder() .content("Okay, your {FlowerType} will be ready for pickup by {PickupTime} on {PickupDate}. Does this sound okay?") .contentType("PlainText") .build()) .build()) .createVersion(false) .name("OrderFlowers") .description("Intent to order a bouquet of flowers for pick up") .fulfillmentActivity(IntentFulfillmentActivityArgs.builder() .type("ReturnIntent") .build()) .rejectionStatement(IntentRejectionStatementArgs.builder() .messages(IntentRejectionStatementMessageArgs.builder() .content("Okay, I will not place your order.") .contentType("PlainText") .build()) .build()) .sampleUtterances( "I would like to order some flowers", "I would like to pick up flowers") .slots( IntentSlotArgs.builder() .description("The type of flowers to pick up") .name("FlowerType") .priority(1) .sampleUtterances("I would like to order {FlowerType}") .slotConstraint("Required") .slotType("FlowerTypes") .slotTypeVersion("$$LATEST") .valueElicitationPrompt(IntentSlotValueElicitationPromptArgs.builder() .maxAttempts(2) .messages(IntentSlotValueElicitationPromptMessageArgs.builder() .content("What type of flowers would you like to order?") .contentType("PlainText") .build()) .build()) .build(), IntentSlotArgs.builder() .description("The date to pick up the flowers") .name("PickupDate") .priority(2) .sampleUtterances("I would like to order {FlowerType}") .slotConstraint("Required") .slotType("AMAZON.DATE") .slotTypeVersion("$$LATEST") .valueElicitationPrompt(IntentSlotValueElicitationPromptArgs.builder() .maxAttempts(2) .messages(IntentSlotValueElicitationPromptMessageArgs.builder() .content("What day do you want the {FlowerType} to be picked up?") .contentType("PlainText") .build()) .build()) .build(), IntentSlotArgs.builder() .description("The time to pick up the flowers") .name("PickupTime") .priority(3) .sampleUtterances("I would like to order {FlowerType}") .slotConstraint("Required") .slotType("AMAZON.TIME") .slotTypeVersion("$$LATEST") .valueElicitationPrompt(IntentSlotValueElicitationPromptArgs.builder() .maxAttempts(2) .messages(IntentSlotValueElicitationPromptMessageArgs.builder() .content("Pick up the {FlowerType} at what time on {PickupDate}?") .contentType("PlainText") .build()) .build()) .build()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Intent(java.lang.String name)
Intent(java.lang.String name, IntentArgs args)
Intent(java.lang.String name, IntentArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.lang.String>
checksum()
com.pulumi.core.Output<java.util.Optional<IntentConclusionStatement>>
conclusionStatement()
com.pulumi.core.Output<java.util.Optional<IntentConfirmationPrompt>>
confirmationPrompt()
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<IntentDialogCodeHook>>
dialogCodeHook()
com.pulumi.core.Output<java.util.Optional<IntentFollowUpPrompt>>
followUpPrompt()
com.pulumi.core.Output<IntentFulfillmentActivity>
fulfillmentActivity()
static Intent
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, IntentState 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.lang.String>
lastUpdatedDate()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
parentIntentSignature()
com.pulumi.core.Output<java.util.Optional<IntentRejectionStatement>>
rejectionStatement()
com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>
sampleUtterances()
com.pulumi.core.Output<java.util.Optional<java.util.List<IntentSlot>>>
slots()
com.pulumi.core.Output<java.lang.String>
version()
-
-
-
Constructor Detail
-
Intent
public Intent(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Intent
public Intent(java.lang.String name, IntentArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Intent
public Intent(java.lang.String name, IntentArgs 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
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- The ARN of the Lex intent.
-
checksum
public com.pulumi.core.Output<java.lang.String> checksum()
- Returns:
- Checksum identifying the version of the intent that was created. The checksum is not included as an argument because the resource will add it automatically when updating the intent.
-
conclusionStatement
public com.pulumi.core.Output<java.util.Optional<IntentConclusionStatement>> conclusionStatement()
- Returns:
- The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function. This element is relevant only if you provide a Lambda function in the `fulfillment_activity`. If you return the intent to the client application, you can't specify this element. The `follow_up_prompt` and `conclusion_statement` are mutually exclusive. You can specify only one. Attributes are documented under statement.
-
confirmationPrompt
public com.pulumi.core.Output<java.util.Optional<IntentConfirmationPrompt>> confirmationPrompt()
- Returns:
- Prompts the user to confirm the intent. This question should have a yes or no answer. You you must provide both the `rejection_statement` and `confirmation_prompt`, or neither. Attributes are documented under prompt.
-
createVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> createVersion()
- Returns:
- Determines if a new slot type 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 intent version was created.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description of the intent. Must be less than or equal to 200 characters in length.
-
dialogCodeHook
public com.pulumi.core.Output<java.util.Optional<IntentDialogCodeHook>> dialogCodeHook()
- Returns:
- Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
-
followUpPrompt
public com.pulumi.core.Output<java.util.Optional<IntentFollowUpPrompt>> followUpPrompt()
- Returns:
- Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink. The `follow_up_prompt` field and the `conclusion_statement` field are mutually exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
-
fulfillmentActivity
public com.pulumi.core.Output<IntentFulfillmentActivity> fulfillmentActivity()
- Returns:
- Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, `fulfillment_activity` defines how the bot places an order with a local pizza store. Attributes are documented under fulfillment_activity.
-
lastUpdatedDate
public com.pulumi.core.Output<java.lang.String> lastUpdatedDate()
- Returns:
- The date when the $LATEST version of this intent was updated.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
-
parentIntentSignature
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> parentIntentSignature()
- Returns:
- A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the Alexa Skills Kit.
-
rejectionStatement
public com.pulumi.core.Output<java.util.Optional<IntentRejectionStatement>> rejectionStatement()
- Returns:
- When the user answers "no" to the question defined in `confirmation_prompt`, Amazon Lex responds with this statement to acknowledge that the intent was canceled. You must provide both the `rejection_statement` and the `confirmation_prompt`, or neither. Attributes are documented under statement.
-
sampleUtterances
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> sampleUtterances()
- Returns:
- An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
-
slots
public com.pulumi.core.Output<java.util.Optional<java.util.List<IntentSlot>>> slots()
- Returns:
- An list of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. Attributes are documented under slot.
-
version
public com.pulumi.core.Output<java.lang.String> version()
- Returns:
- The version of the bot.
-
get
public static Intent get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable IntentState 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.
-
-