UNPKG

@pierskarsenbarg/sdm

Version:

A Pulumi package for creating and managing StrongDM cloud resources.

91 lines 3.23 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.Account = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Accounts are users that have access to strongDM. The types of accounts are: * 1. **Users:** humans who are authenticated through username and password or SSO. * 2. **Service Accounts:** machines that are authenticated using a service token. * 3. **Tokens** are access keys with permissions that can be used for authentication. * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sdm from "@pierskarsenbarg/sdm"; * * const test_user = new sdm.Account("test-user", {user: { * email: "albob@strongdm.com", * firstName: "al", * lastName: "bob", * managerId: "a-1234abc", * permissionLevel: "database-admin", * tags: { * env: "dev", * region: "us-west", * }, * }}); * const test_service = new sdm.Account("test-service", {service: { * name: "test-service", * tags: { * env: "dev", * region: "us-west", * }, * }}); * ``` * This resource can be imported using the import command. * * ## Import * * A Account can be imported using the id, e.g., * * ```sh * $ pulumi import sdm:index/account:Account example a-12345678 * ``` */ class Account extends pulumi.CustomResource { /** * Get an existing Account 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 Account(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Account. 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'] === Account.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["service"] = state?.service; resourceInputs["user"] = state?.user; } else { const args = argsOrState; resourceInputs["service"] = args?.service; resourceInputs["user"] = args?.user; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Account.__pulumiType, name, resourceInputs, opts); } } exports.Account = Account; /** @internal */ Account.__pulumiType = 'sdm:index/account:Account'; //# sourceMappingURL=account.js.map