@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
99 lines • 4.13 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.BotAlias = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon Lex Bot Alias 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 orderFlowersProd = new aws.lex.BotAlias("order_flowers_prod", {
* botName: "OrderFlowers",
* botVersion: "1",
* description: "Production Version of the OrderFlowers Bot.",
* name: "OrderFlowersProd",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import bot aliases using an ID with the format `bot_name:bot_alias_name`. For example:
*
* ```sh
* $ pulumi import aws:lex/botAlias:BotAlias order_flowers_prod OrderFlowers:OrderFlowersProd
* ```
*/
class BotAlias extends pulumi.CustomResource {
/**
* Get an existing BotAlias 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 BotAlias(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of BotAlias. 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'] === BotAlias.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["botName"] = state?.botName;
resourceInputs["botVersion"] = state?.botVersion;
resourceInputs["checksum"] = state?.checksum;
resourceInputs["conversationLogs"] = state?.conversationLogs;
resourceInputs["createdDate"] = state?.createdDate;
resourceInputs["description"] = state?.description;
resourceInputs["lastUpdatedDate"] = state?.lastUpdatedDate;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.botName === undefined && !opts.urn) {
throw new Error("Missing required property 'botName'");
}
if (args?.botVersion === undefined && !opts.urn) {
throw new Error("Missing required property 'botVersion'");
}
resourceInputs["botName"] = args?.botName;
resourceInputs["botVersion"] = args?.botVersion;
resourceInputs["conversationLogs"] = args?.conversationLogs;
resourceInputs["description"] = args?.description;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["checksum"] = undefined /*out*/;
resourceInputs["createdDate"] = undefined /*out*/;
resourceInputs["lastUpdatedDate"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BotAlias.__pulumiType, name, resourceInputs, opts);
}
}
exports.BotAlias = BotAlias;
/** @internal */
BotAlias.__pulumiType = 'aws:lex/botAlias:BotAlias';
//# sourceMappingURL=botAlias.js.map
;