UNPKG

@pulumi/aws

Version:

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

117 lines 4.3 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.UserHierarchyStructure = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Amazon Connect User Hierarchy Structure resource. For more information see * [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.connect.UserHierarchyStructure("example", { * instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111", * hierarchyStructure: { * levelOne: { * name: "levelone", * }, * }, * }); * ``` * * ### With Five Levels * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.connect.UserHierarchyStructure("example", { * instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111", * hierarchyStructure: { * levelOne: { * name: "levelone", * }, * levelTwo: { * name: "leveltwo", * }, * levelThree: { * name: "levelthree", * }, * levelFour: { * name: "levelfour", * }, * levelFive: { * name: "levelfive", * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Amazon Connect User Hierarchy Structures using the `instance_id`. For example: * * ```sh * $ pulumi import aws:connect/userHierarchyStructure:UserHierarchyStructure example f1288a1f-6193-445a-b47e-af739b2 * ``` */ class UserHierarchyStructure extends pulumi.CustomResource { /** * Get an existing UserHierarchyStructure 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 UserHierarchyStructure(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of UserHierarchyStructure. 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'] === UserHierarchyStructure.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["hierarchyStructure"] = state?.hierarchyStructure; resourceInputs["instanceId"] = state?.instanceId; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.hierarchyStructure === undefined && !opts.urn) { throw new Error("Missing required property 'hierarchyStructure'"); } if (args?.instanceId === undefined && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["hierarchyStructure"] = args?.hierarchyStructure; resourceInputs["instanceId"] = args?.instanceId; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(UserHierarchyStructure.__pulumiType, name, resourceInputs, opts); } } exports.UserHierarchyStructure = UserHierarchyStructure; /** @internal */ UserHierarchyStructure.__pulumiType = 'aws:connect/userHierarchyStructure:UserHierarchyStructure'; //# sourceMappingURL=userHierarchyStructure.js.map