UNPKG

@twingate/pulumi-twingate

Version:

A Pulumi package for creating and managing Twingate cloud resources.

87 lines 3.46 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.TwingateUser = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Users provides different levels of write capabilities across the Twingate Admin Console. For more information, see Twingate's [documentation](https://www.twingate.com/docs/users). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as twingate from "@twingate/pulumi-twingate"; * * const user = new twingate.TwingateUser("user", { * email: "sample@company.com", * firstName: "Twin", * lastName: "Gate", * role: "DEVOPS", * }); * ``` * * ## Import * * ```sh * $ pulumi import twingate:index/twingateUser:TwingateUser user VXNlcjo1ODk3MTM= * ``` */ class TwingateUser extends pulumi.CustomResource { /** * Get an existing TwingateUser 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 TwingateUser(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of TwingateUser. 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'] === TwingateUser.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["email"] = state?.email; resourceInputs["firstName"] = state?.firstName; resourceInputs["isActive"] = state?.isActive; resourceInputs["lastName"] = state?.lastName; resourceInputs["role"] = state?.role; resourceInputs["sendInvite"] = state?.sendInvite; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.email === undefined && !opts.urn) { throw new Error("Missing required property 'email'"); } resourceInputs["email"] = args?.email; resourceInputs["firstName"] = args?.firstName; resourceInputs["isActive"] = args?.isActive; resourceInputs["lastName"] = args?.lastName; resourceInputs["role"] = args?.role; resourceInputs["sendInvite"] = args?.sendInvite; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TwingateUser.__pulumiType, name, resourceInputs, opts); } } exports.TwingateUser = TwingateUser; /** @internal */ TwingateUser.__pulumiType = 'twingate:index/twingateUser:TwingateUser'; //# sourceMappingURL=twingateUser.js.map