@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
122 lines • 4.81 kB
JavaScript
;
// *** 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.V2modelsBotLocale = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Lex V2 Models Bot Locale.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.lex.V2modelsBotLocale("example", {
* botId: exampleAwsLexv2modelsBot.id,
* botVersion: "DRAFT",
* localeId: "en_US",
* nLuIntentConfidenceThreshold: 0.7,
* });
* ```
*
* ### Voice Settings
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.lex.V2modelsBotLocale("example", {
* botId: exampleAwsLexv2modelsBot.id,
* botVersion: "DRAFT",
* localeId: "en_US",
* nLuIntentConfidenceThreshold: 0.7,
* voiceSettings: {
* voiceId: "Kendra",
* engine: "standard",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Lex V2 Models Bot Locale using the `id`. For example:
*
* ```sh
* $ pulumi import aws:lex/v2modelsBotLocale:V2modelsBotLocale example en_US,abcd-12345678,1
* ```
*/
class V2modelsBotLocale extends pulumi.CustomResource {
/**
* Get an existing V2modelsBotLocale 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 V2modelsBotLocale(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of V2modelsBotLocale. 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'] === V2modelsBotLocale.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["botId"] = state?.botId;
resourceInputs["botVersion"] = state?.botVersion;
resourceInputs["description"] = state?.description;
resourceInputs["localeId"] = state?.localeId;
resourceInputs["nLuIntentConfidenceThreshold"] = state?.nLuIntentConfidenceThreshold;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["voiceSettings"] = state?.voiceSettings;
}
else {
const args = argsOrState;
if (args?.botId === undefined && !opts.urn) {
throw new Error("Missing required property 'botId'");
}
if (args?.botVersion === undefined && !opts.urn) {
throw new Error("Missing required property 'botVersion'");
}
if (args?.localeId === undefined && !opts.urn) {
throw new Error("Missing required property 'localeId'");
}
if (args?.nLuIntentConfidenceThreshold === undefined && !opts.urn) {
throw new Error("Missing required property 'nLuIntentConfidenceThreshold'");
}
resourceInputs["botId"] = args?.botId;
resourceInputs["botVersion"] = args?.botVersion;
resourceInputs["description"] = args?.description;
resourceInputs["localeId"] = args?.localeId;
resourceInputs["nLuIntentConfidenceThreshold"] = args?.nLuIntentConfidenceThreshold;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["voiceSettings"] = args?.voiceSettings;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(V2modelsBotLocale.__pulumiType, name, resourceInputs, opts);
}
}
exports.V2modelsBotLocale = V2modelsBotLocale;
/** @internal */
V2modelsBotLocale.__pulumiType = 'aws:lex/v2modelsBotLocale:V2modelsBotLocale';
//# sourceMappingURL=v2modelsBotLocale.js.map