@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
398 lines (397 loc) • 19.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const orderFlowersIntent = new aws.lex.Intent("order_flowers_intent", {
* confirmationPrompt: {
* maxAttempts: 2,
* messages: [{
* content: "Okay, your {FlowerType} will be ready for pickup by {PickupTime} on {PickupDate}. Does this sound okay?",
* contentType: "PlainText",
* }],
* },
* createVersion: false,
* name: "OrderFlowers",
* description: "Intent to order a bouquet of flowers for pick up",
* fulfillmentActivity: {
* type: "ReturnIntent",
* },
* rejectionStatement: {
* messages: [{
* content: "Okay, I will not place your order.",
* contentType: "PlainText",
* }],
* },
* sampleUtterances: [
* "I would like to order some flowers",
* "I would like to pick up flowers",
* ],
* slots: [
* {
* 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: {
* maxAttempts: 2,
* messages: [{
* content: "What type of flowers would you like to order?",
* contentType: "PlainText",
* }],
* },
* },
* {
* 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: {
* maxAttempts: 2,
* messages: [{
* content: "What day do you want the {FlowerType} to be picked up?",
* contentType: "PlainText",
* }],
* },
* },
* {
* 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: {
* maxAttempts: 2,
* messages: [{
* content: "Pick up the {FlowerType} at what time on {PickupDate}?",
* contentType: "PlainText",
* }],
* },
* },
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import intents using their name. For example:
*
* ```sh
* $ pulumi import aws:lex/intent:Intent order_flowers_intent OrderFlowers
* ```
*/
export declare class Intent extends pulumi.CustomResource {
/**
* Get an existing Intent resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IntentState, opts?: pulumi.CustomResourceOptions): Intent;
/**
* Returns true if the given object is an instance of Intent. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Intent;
/**
* The ARN of the Lex intent.
*/
readonly arn: pulumi.Output<string>;
/**
* 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.
*/
readonly checksum: pulumi.Output<string>;
/**
* 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 `fulfillmentActivity`. If you return the intent to the client
* application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
* mutually exclusive. You can specify only one. Attributes are documented under statement.
*/
readonly conclusionStatement: pulumi.Output<outputs.lex.IntentConclusionStatement | undefined>;
/**
* Prompts the user to confirm the intent. This question should
* have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
* or neither. Attributes are documented under prompt.
*/
readonly confirmationPrompt: pulumi.Output<outputs.lex.IntentConfirmationPrompt | undefined>;
/**
* Determines if a new slot type version is created when the initial
* resource is created and on each update. Defaults to `false`.
*/
readonly createVersion: pulumi.Output<boolean | undefined>;
/**
* The date when the intent version was created.
*/
readonly createdDate: pulumi.Output<string>;
/**
* A description of the intent. Must be less than or equal to 200 characters in length.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* 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.
*/
readonly dialogCodeHook: pulumi.Output<outputs.lex.IntentDialogCodeHook | undefined>;
/**
* 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 `followUpPrompt` field and the `conclusionStatement` field are mutually
* exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
*/
readonly followUpPrompt: pulumi.Output<outputs.lex.IntentFollowUpPrompt | undefined>;
/**
* Describes how the intent is fulfilled. For example, after a
* user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
* places an order with a local pizza store. Attributes are documented under fulfillment_activity.
*/
readonly fulfillmentActivity: pulumi.Output<outputs.lex.IntentFulfillmentActivity>;
/**
* The date when the $LATEST version of this intent was updated.
*/
readonly lastUpdatedDate: pulumi.Output<string>;
/**
* The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
*/
readonly name: pulumi.Output<string>;
/**
* 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.
*/
readonly parentIntentSignature: pulumi.Output<string | undefined>;
/**
* 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.
*/
readonly region: pulumi.Output<string>;
/**
* When the user answers "no" to the question defined in
* `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
* canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
* Attributes are documented under statement.
*/
readonly rejectionStatement: pulumi.Output<outputs.lex.IntentRejectionStatement | undefined>;
/**
* 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.
*/
readonly sampleUtterances: pulumi.Output<string[] | undefined>;
/**
* 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.
*/
readonly slots: pulumi.Output<outputs.lex.IntentSlot[] | undefined>;
/**
* The version of the bot.
*/
readonly version: pulumi.Output<string>;
/**
* Create a Intent resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: IntentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Intent resources.
*/
export interface IntentState {
/**
* The ARN of the Lex intent.
*/
arn?: pulumi.Input<string>;
/**
* 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.
*/
checksum?: pulumi.Input<string>;
/**
* 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 `fulfillmentActivity`. If you return the intent to the client
* application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
* mutually exclusive. You can specify only one. Attributes are documented under statement.
*/
conclusionStatement?: pulumi.Input<inputs.lex.IntentConclusionStatement>;
/**
* Prompts the user to confirm the intent. This question should
* have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
* or neither. Attributes are documented under prompt.
*/
confirmationPrompt?: pulumi.Input<inputs.lex.IntentConfirmationPrompt>;
/**
* Determines if a new slot type version is created when the initial
* resource is created and on each update. Defaults to `false`.
*/
createVersion?: pulumi.Input<boolean>;
/**
* The date when the intent version was created.
*/
createdDate?: pulumi.Input<string>;
/**
* A description of the intent. Must be less than or equal to 200 characters in length.
*/
description?: pulumi.Input<string>;
/**
* 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.
*/
dialogCodeHook?: pulumi.Input<inputs.lex.IntentDialogCodeHook>;
/**
* 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 `followUpPrompt` field and the `conclusionStatement` field are mutually
* exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
*/
followUpPrompt?: pulumi.Input<inputs.lex.IntentFollowUpPrompt>;
/**
* Describes how the intent is fulfilled. For example, after a
* user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
* places an order with a local pizza store. Attributes are documented under fulfillment_activity.
*/
fulfillmentActivity?: pulumi.Input<inputs.lex.IntentFulfillmentActivity>;
/**
* The date when the $LATEST version of this intent was updated.
*/
lastUpdatedDate?: pulumi.Input<string>;
/**
* The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
*/
name?: pulumi.Input<string>;
/**
* 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.
*/
parentIntentSignature?: pulumi.Input<string>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* When the user answers "no" to the question defined in
* `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
* canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
* Attributes are documented under statement.
*/
rejectionStatement?: pulumi.Input<inputs.lex.IntentRejectionStatement>;
/**
* 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.
*/
sampleUtterances?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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.
*/
slots?: pulumi.Input<pulumi.Input<inputs.lex.IntentSlot>[]>;
/**
* The version of the bot.
*/
version?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Intent resource.
*/
export interface IntentArgs {
/**
* 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 `fulfillmentActivity`. If you return the intent to the client
* application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
* mutually exclusive. You can specify only one. Attributes are documented under statement.
*/
conclusionStatement?: pulumi.Input<inputs.lex.IntentConclusionStatement>;
/**
* Prompts the user to confirm the intent. This question should
* have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
* or neither. Attributes are documented under prompt.
*/
confirmationPrompt?: pulumi.Input<inputs.lex.IntentConfirmationPrompt>;
/**
* Determines if a new slot type version is created when the initial
* resource is created and on each update. Defaults to `false`.
*/
createVersion?: pulumi.Input<boolean>;
/**
* A description of the intent. Must be less than or equal to 200 characters in length.
*/
description?: pulumi.Input<string>;
/**
* 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.
*/
dialogCodeHook?: pulumi.Input<inputs.lex.IntentDialogCodeHook>;
/**
* 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 `followUpPrompt` field and the `conclusionStatement` field are mutually
* exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
*/
followUpPrompt?: pulumi.Input<inputs.lex.IntentFollowUpPrompt>;
/**
* Describes how the intent is fulfilled. For example, after a
* user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
* places an order with a local pizza store. Attributes are documented under fulfillment_activity.
*/
fulfillmentActivity: pulumi.Input<inputs.lex.IntentFulfillmentActivity>;
/**
* The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
*/
name?: pulumi.Input<string>;
/**
* 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.
*/
parentIntentSignature?: pulumi.Input<string>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* When the user answers "no" to the question defined in
* `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
* canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
* Attributes are documented under statement.
*/
rejectionStatement?: pulumi.Input<inputs.lex.IntentRejectionStatement>;
/**
* 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.
*/
sampleUtterances?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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.
*/
slots?: pulumi.Input<pulumi.Input<inputs.lex.IntentSlot>[]>;
}