UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

147 lines 6.49 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Bot = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const orderFlowersBot = new aws.lex.Bot("order_flowers_bot", { * abortStatement: { * messages: [{ * content: "Sorry, I am not able to assist at this time", * contentType: "PlainText", * }], * }, * childDirected: false, * clarificationPrompt: { * maxAttempts: 2, * messages: [{ * content: "I didn't understand you, what would you like to do?", * contentType: "PlainText", * }], * }, * createVersion: false, * description: "Bot to order flowers on the behalf of a user", * idleSessionTtlInSeconds: 600, * intents: [{ * intentName: "OrderFlowers", * intentVersion: "1", * }], * locale: "en-US", * name: "OrderFlowers", * processBehavior: "BUILD", * voiceId: "Salli", * }); * ``` * * ## Import * * Using `pulumi import`, import bots using their name. For example: * * ```sh * $ pulumi import aws:lex/bot:Bot order_flowers_bot OrderFlowers * ``` */ class Bot extends pulumi.CustomResource { /** * Get an existing Bot 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, id, state, opts) { return new Bot(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Bot. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Bot.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["abortStatement"] = state?.abortStatement; resourceInputs["arn"] = state?.arn; resourceInputs["checksum"] = state?.checksum; resourceInputs["childDirected"] = state?.childDirected; resourceInputs["clarificationPrompt"] = state?.clarificationPrompt; resourceInputs["createVersion"] = state?.createVersion; resourceInputs["createdDate"] = state?.createdDate; resourceInputs["description"] = state?.description; resourceInputs["detectSentiment"] = state?.detectSentiment; resourceInputs["enableModelImprovements"] = state?.enableModelImprovements; resourceInputs["failureReason"] = state?.failureReason; resourceInputs["idleSessionTtlInSeconds"] = state?.idleSessionTtlInSeconds; resourceInputs["intents"] = state?.intents; resourceInputs["lastUpdatedDate"] = state?.lastUpdatedDate; resourceInputs["locale"] = state?.locale; resourceInputs["name"] = state?.name; resourceInputs["nluIntentConfidenceThreshold"] = state?.nluIntentConfidenceThreshold; resourceInputs["processBehavior"] = state?.processBehavior; resourceInputs["region"] = state?.region; resourceInputs["status"] = state?.status; resourceInputs["version"] = state?.version; resourceInputs["voiceId"] = state?.voiceId; } else { const args = argsOrState; if (args?.abortStatement === undefined && !opts.urn) { throw new Error("Missing required property 'abortStatement'"); } if (args?.childDirected === undefined && !opts.urn) { throw new Error("Missing required property 'childDirected'"); } if (args?.intents === undefined && !opts.urn) { throw new Error("Missing required property 'intents'"); } resourceInputs["abortStatement"] = args?.abortStatement; resourceInputs["childDirected"] = args?.childDirected; resourceInputs["clarificationPrompt"] = args?.clarificationPrompt; resourceInputs["createVersion"] = args?.createVersion; resourceInputs["description"] = args?.description; resourceInputs["detectSentiment"] = args?.detectSentiment; resourceInputs["enableModelImprovements"] = args?.enableModelImprovements; resourceInputs["idleSessionTtlInSeconds"] = args?.idleSessionTtlInSeconds; resourceInputs["intents"] = args?.intents; resourceInputs["locale"] = args?.locale; resourceInputs["name"] = args?.name; resourceInputs["nluIntentConfidenceThreshold"] = args?.nluIntentConfidenceThreshold; resourceInputs["processBehavior"] = args?.processBehavior; resourceInputs["region"] = args?.region; resourceInputs["voiceId"] = args?.voiceId; resourceInputs["arn"] = undefined /*out*/; resourceInputs["checksum"] = undefined /*out*/; resourceInputs["createdDate"] = undefined /*out*/; resourceInputs["failureReason"] = undefined /*out*/; resourceInputs["lastUpdatedDate"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Bot.__pulumiType, name, resourceInputs, opts); } } exports.Bot = Bot; /** @internal */ Bot.__pulumiType = 'aws:lex/bot:Bot'; //# sourceMappingURL=bot.js.map