UNPKG

@pulumi/aws

Version:

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

130 lines 4.96 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.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, { ...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?.arn; resourceInputs["dataPrivacies"] = state?.dataPrivacies; resourceInputs["description"] = state?.description; resourceInputs["idleSessionTtlInSeconds"] = state?.idleSessionTtlInSeconds; resourceInputs["members"] = state?.members; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["testBotAliasTags"] = state?.testBotAliasTags; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.idleSessionTtlInSeconds === undefined && !opts.urn) { throw new Error("Missing required property 'idleSessionTtlInSeconds'"); } if (args?.roleArn === undefined && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["dataPrivacies"] = args?.dataPrivacies; resourceInputs["description"] = args?.description; resourceInputs["idleSessionTtlInSeconds"] = args?.idleSessionTtlInSeconds; resourceInputs["members"] = args?.members; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["roleArn"] = args?.roleArn; resourceInputs["tags"] = args?.tags; resourceInputs["testBotAliasTags"] = args?.testBotAliasTags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["type"] = args?.type; 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