@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
130 lines • 5.46 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.V2modelsBot = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Lex V2 Models Bot.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const exampleRole = new aws.iam.Role("example", {
* name: "example",
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Action: "sts:AssumeRole",
* Effect: "Allow",
* Sid: "",
* Principal: {
* Service: "lexv2.amazonaws.com",
* },
* }],
* }),
* tags: {
* created_by: "aws",
* },
* });
* const example = new aws.lex.V2modelsBot("example", {
* name: "example",
* description: "Example description",
* dataPrivacies: [{
* childDirected: false,
* }],
* idleSessionTtlInSeconds: 60,
* roleArn: exampleRole.arn,
* type: "Bot",
* tags: {
* foo: "bar",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Lex V2 Models Bot using the `id`. For example:
*
* ```sh
* $ pulumi import aws:lex/v2modelsBot:V2modelsBot example bot-id-12345678
* ```
*/
class V2modelsBot extends pulumi.CustomResource {
/**
* Get an existing V2modelsBot 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 V2modelsBot(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of V2modelsBot. 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'] === V2modelsBot.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["dataPrivacies"] = state ? state.dataPrivacies : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["idleSessionTtlInSeconds"] = state ? state.idleSessionTtlInSeconds : undefined;
resourceInputs["members"] = state ? state.members : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["roleArn"] = state ? state.roleArn : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["testBotAliasTags"] = state ? state.testBotAliasTags : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
if ((!args || args.idleSessionTtlInSeconds === undefined) && !opts.urn) {
throw new Error("Missing required property 'idleSessionTtlInSeconds'");
}
if ((!args || args.roleArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'roleArn'");
}
resourceInputs["dataPrivacies"] = args ? args.dataPrivacies : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["idleSessionTtlInSeconds"] = args ? args.idleSessionTtlInSeconds : undefined;
resourceInputs["members"] = args ? args.members : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["roleArn"] = args ? args.roleArn : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["testBotAliasTags"] = args ? args.testBotAliasTags : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(V2modelsBot.__pulumiType, name, resourceInputs, opts);
}
}
exports.V2modelsBot = V2modelsBot;
/** @internal */
V2modelsBot.__pulumiType = 'aws:lex/v2modelsBot:V2modelsBot';
//# sourceMappingURL=v2modelsBot.js.map