import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an AWS Lex V2 Models Intent. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getPartition({}); * const test = new aws.iam.Role("test", { * name: "botens_namn", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Sid: "", * Principal: { * Service: "lexv2.amazonaws.com", * }, * }], * }), * }); * const testRolePolicyAttachment = new aws.iam.RolePolicyAttachment("test", { * role: test.name, * policyArn: current.then(current => `arn:${current.partition}:iam::aws:policy/AmazonLexFullAccess`), * }); * const testV2modelsBot = new aws.lex.V2modelsBot("test", { * dataPrivacies: [{ * childDirected: true, * }], * name: "botens_namn", * idleSessionTtlInSeconds: 60, * roleArn: test.arn, * }); * const testV2modelsBotLocale = new aws.lex.V2modelsBotLocale("test", { * localeId: "en_US", * botId: testV2modelsBot.id, * botVersion: "DRAFT", * nLuIntentConfidenceThreshold: 0.7, * }); * const testV2modelsBotVersion = new aws.lex.V2modelsBotVersion("test", { * botId: testV2modelsBot.id, * localeSpecification: testV2modelsBotLocale.localeId.apply(localeId => { * [localeId]: { * sourceBotVersion: "DRAFT", * }, * }), * }); * const example = new aws.lex.V2modelsIntent("example", { * botId: testV2modelsBot.id, * botVersion: testV2modelsBotLocale.botVersion, * name: "botens_namn", * localeId: testV2modelsBotLocale.localeId, * }); * ``` * * ### `confirmationSetting` Example * * When using `confirmationSetting`, if you do not provide a `promptAttemptsSpecification`, AWS Lex will provide default `promptAttemptsSpecification`s. As a result, Terraform will report a difference in the configuration. To avoid this behavior, include the default `promptAttemptsSpecification` configuration shown below. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.lex.V2modelsIntent("example", { * confirmationSetting: { * promptSpecification: { * promptAttemptsSpecifications: [ * { * allowedInputTypes: { * allowAudioInput: true, * allowDtmfInput: true, * }, * audioAndDtmfInputSpecification: { * audioSpecification: { * endTimeoutMs: 640, * maxLengthMs: 15000, * }, * dtmfSpecification: { * deletionCharacter: "*", * endCharacter: "#", * endTimeoutMs: 5000, * maxLength: 513, * }, * startTimeoutMs: 4000, * }, * textInputSpecification: { * startTimeoutMs: 30000, * }, * allowInterrupt: true, * mapBlockKey: "Initial", * }, * { * allowedInputTypes: { * allowAudioInput: true, * allowDtmfInput: true, * }, * audioAndDtmfInputSpecification: { * audioSpecification: { * endTimeoutMs: 640, * maxLengthMs: 15000, * }, * dtmfSpecification: { * deletionCharacter: "*", * endCharacter: "#", * endTimeoutMs: 5000, * maxLength: 513, * }, * startTimeoutMs: 4000, * }, * textInputSpecification: { * startTimeoutMs: 30000, * }, * allowInterrupt: true, * mapBlockKey: "Retry1", * }, * ], * allowInterrupt: true, * maxRetries: 1, * messageSelectionStrategy: "Ordered", * }, * active: true, * }, * botId: test.id, * botVersion: testAwsLexv2modelsBotLocale.botVersion, * name: "botens_namn", * localeId: testAwsLexv2modelsBotLocale.localeId, * }); * ``` * * ### QnA Intent Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const qnaExample = new aws.lex.V2modelsIntent("qna_example", { * qnaIntentConfiguration: { * dataSourceConfiguration: { * kendraConfiguration: { * kendraIndex: example.arn, * exactResponse: true, * queryFilterStringEnabled: false, * }, * }, * }, * sampleUtterances: [{ * utterance: "What is the answer?", * }], * botId: test.id, * botVersion: testAwsLexv2modelsBotLocale.botVersion, * name: "qna_intent", * localeId: testAwsLexv2modelsBotLocale.localeId, * parentIntentSignature: "AMAZON.QnAIntent", * }); * ``` * * ## Import * * Using `pulumi import`, import Lex V2 Models Intent using the `intent_id:bot_id:bot_version:locale_id`. For example: * * ```sh * $ pulumi import aws:lex/v2modelsIntent:V2modelsIntent example intent-42874:bot-11376:DRAFT:en_US * ``` */ export declare class V2modelsIntent extends pulumi.CustomResource { /** * Get an existing V2modelsIntent 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, state?: V2modelsIntentState, opts?: pulumi.CustomResourceOptions): V2modelsIntent; /** * Returns true if the given object is an instance of V2modelsIntent. 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 V2modelsIntent; /** * Identifier of the bot associated with this intent. */ readonly botId: pulumi.Output; /** * Version of the bot associated with this intent. */ readonly botVersion: pulumi.Output; /** * Configuration block for the response that Amazon Lex sends to the user when the intent is closed. See `closingSetting`. */ readonly closingSetting: pulumi.Output; /** * Configuration block for prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent. If you configure this block without `prompt_specification.*.prompt_attempts_specification`, AWS will provide default configurations for `Initial` and `Retry1` `promptAttemptsSpecification`s. This will cause Terraform to report differences. Use the `confirmationSetting` configuration above in the Basic Usage example to avoid differences resulting from AWS default configuration. See `confirmationSetting`. */ readonly confirmationSetting: pulumi.Output; /** * Timestamp of the date and time that the intent was created. */ readonly creationDateTime: pulumi.Output; /** * Description of the intent. Use the description to help identify the intent in lists. */ readonly description: pulumi.Output; /** * Configuration block for invoking the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction. See `dialogCodeHook`. */ readonly dialogCodeHook: pulumi.Output; /** * Configuration block for invoking the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user. See `fulfillmentCodeHook`. */ readonly fulfillmentCodeHook: pulumi.Output; /** * Configuration block for the response that is sent to the user at the beginning of a conversation, before eliciting slot values. See `initialResponseSetting`. */ readonly initialResponseSetting: pulumi.Output; /** * Configuration blocks for contexts that must be active for this intent to be considered by Amazon Lex. When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent. A context can be automatically activated using the outputContexts property or it can be set at runtime. See `inputContext`. */ readonly inputContexts: pulumi.Output; /** * Unique identifier for the intent. */ readonly intentId: pulumi.Output; /** * Configuration block for information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke. Cannot be used with `qnaIntentConfiguration`. See `kendraConfiguration`. */ readonly kendraConfiguration: pulumi.Output; /** * Timestamp of the last time that the intent was modified. */ readonly lastUpdatedDateTime: pulumi.Output; /** * Identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. */ readonly localeId: pulumi.Output; /** * Name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent. * * The following arguments are optional: */ readonly name: pulumi.Output; /** * Configuration blocks for contexts that the intent activates when it is fulfilled. You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer. When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active. See `outputContext`. */ readonly outputContexts: pulumi.Output; /** * Identifier for the built-in intent to base this intent on. */ readonly parentIntentSignature: pulumi.Output; /** * Configuration block for QnA intent settings. This is used when `parentIntentSignature` is set to `AMAZON.QnAIntent`. Cannot be used with `kendraConfiguration`. See `qnaIntentConfiguration`. */ readonly qnaIntentConfiguration: pulumi.Output; /** * 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; /** * Configuration block for strings that a user might say to signal the intent. See `sampleUtterance`. */ readonly sampleUtterances: pulumi.Output; /** * Configuration block for a new list of slots and their priorities that are contained by the intent. This is ignored on create and only valid for updates. See `slotPriority`. */ readonly slotPriorities: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a V2modelsIntent 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: V2modelsIntentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering V2modelsIntent resources. */ export interface V2modelsIntentState { /** * Identifier of the bot associated with this intent. */ botId?: pulumi.Input; /** * Version of the bot associated with this intent. */ botVersion?: pulumi.Input; /** * Configuration block for the response that Amazon Lex sends to the user when the intent is closed. See `closingSetting`. */ closingSetting?: pulumi.Input; /** * Configuration block for prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent. If you configure this block without `prompt_specification.*.prompt_attempts_specification`, AWS will provide default configurations for `Initial` and `Retry1` `promptAttemptsSpecification`s. This will cause Terraform to report differences. Use the `confirmationSetting` configuration above in the Basic Usage example to avoid differences resulting from AWS default configuration. See `confirmationSetting`. */ confirmationSetting?: pulumi.Input; /** * Timestamp of the date and time that the intent was created. */ creationDateTime?: pulumi.Input; /** * Description of the intent. Use the description to help identify the intent in lists. */ description?: pulumi.Input; /** * Configuration block for invoking the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction. See `dialogCodeHook`. */ dialogCodeHook?: pulumi.Input; /** * Configuration block for invoking the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user. See `fulfillmentCodeHook`. */ fulfillmentCodeHook?: pulumi.Input; /** * Configuration block for the response that is sent to the user at the beginning of a conversation, before eliciting slot values. See `initialResponseSetting`. */ initialResponseSetting?: pulumi.Input; /** * Configuration blocks for contexts that must be active for this intent to be considered by Amazon Lex. When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent. A context can be automatically activated using the outputContexts property or it can be set at runtime. See `inputContext`. */ inputContexts?: pulumi.Input[] | undefined>; /** * Unique identifier for the intent. */ intentId?: pulumi.Input; /** * Configuration block for information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke. Cannot be used with `qnaIntentConfiguration`. See `kendraConfiguration`. */ kendraConfiguration?: pulumi.Input; /** * Timestamp of the last time that the intent was modified. */ lastUpdatedDateTime?: pulumi.Input; /** * Identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. */ localeId?: pulumi.Input; /** * Name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent. * * The following arguments are optional: */ name?: pulumi.Input; /** * Configuration blocks for contexts that the intent activates when it is fulfilled. You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer. When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active. See `outputContext`. */ outputContexts?: pulumi.Input[] | undefined>; /** * Identifier for the built-in intent to base this intent on. */ parentIntentSignature?: pulumi.Input; /** * Configuration block for QnA intent settings. This is used when `parentIntentSignature` is set to `AMAZON.QnAIntent`. Cannot be used with `kendraConfiguration`. See `qnaIntentConfiguration`. */ qnaIntentConfiguration?: pulumi.Input; /** * 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; /** * Configuration block for strings that a user might say to signal the intent. See `sampleUtterance`. */ sampleUtterances?: pulumi.Input[] | undefined>; /** * Configuration block for a new list of slots and their priorities that are contained by the intent. This is ignored on create and only valid for updates. See `slotPriority`. */ slotPriorities?: pulumi.Input[] | undefined>; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a V2modelsIntent resource. */ export interface V2modelsIntentArgs { /** * Identifier of the bot associated with this intent. */ botId: pulumi.Input; /** * Version of the bot associated with this intent. */ botVersion: pulumi.Input; /** * Configuration block for the response that Amazon Lex sends to the user when the intent is closed. See `closingSetting`. */ closingSetting?: pulumi.Input; /** * Configuration block for prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent. If you configure this block without `prompt_specification.*.prompt_attempts_specification`, AWS will provide default configurations for `Initial` and `Retry1` `promptAttemptsSpecification`s. This will cause Terraform to report differences. Use the `confirmationSetting` configuration above in the Basic Usage example to avoid differences resulting from AWS default configuration. See `confirmationSetting`. */ confirmationSetting?: pulumi.Input; /** * Description of the intent. Use the description to help identify the intent in lists. */ description?: pulumi.Input; /** * Configuration block for invoking the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction. See `dialogCodeHook`. */ dialogCodeHook?: pulumi.Input; /** * Configuration block for invoking the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user. See `fulfillmentCodeHook`. */ fulfillmentCodeHook?: pulumi.Input; /** * Configuration block for the response that is sent to the user at the beginning of a conversation, before eliciting slot values. See `initialResponseSetting`. */ initialResponseSetting?: pulumi.Input; /** * Configuration blocks for contexts that must be active for this intent to be considered by Amazon Lex. When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent. A context can be automatically activated using the outputContexts property or it can be set at runtime. See `inputContext`. */ inputContexts?: pulumi.Input[] | undefined>; /** * Configuration block for information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke. Cannot be used with `qnaIntentConfiguration`. See `kendraConfiguration`. */ kendraConfiguration?: pulumi.Input; /** * Identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. */ localeId: pulumi.Input; /** * Name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent. * * The following arguments are optional: */ name?: pulumi.Input; /** * Configuration blocks for contexts that the intent activates when it is fulfilled. You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer. When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active. See `outputContext`. */ outputContexts?: pulumi.Input[] | undefined>; /** * Identifier for the built-in intent to base this intent on. */ parentIntentSignature?: pulumi.Input; /** * Configuration block for QnA intent settings. This is used when `parentIntentSignature` is set to `AMAZON.QnAIntent`. Cannot be used with `kendraConfiguration`. See `qnaIntentConfiguration`. */ qnaIntentConfiguration?: pulumi.Input; /** * 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; /** * Configuration block for strings that a user might say to signal the intent. See `sampleUtterance`. */ sampleUtterances?: pulumi.Input[] | undefined>; /** * Configuration block for a new list of slots and their priorities that are contained by the intent. This is ignored on create and only valid for updates. See `slotPriority`. */ slotPriorities?: pulumi.Input[] | undefined>; timeouts?: pulumi.Input; } //# sourceMappingURL=v2modelsIntent.d.ts.map