UNPKG

@pulumi/vault

Version:

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

102 lines 4.32 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.MfaTotp = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for configuring the totp MFA method. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const example = new vault.identity.MfaTotp("example", {issuer: "issuer1"}); * ``` * * ## Import * * Resource can be imported using its `uuid` field, e.g. * * ```sh * $ pulumi import vault:identity/mfaTotp:MfaTotp example 0d89c36a-4ff5-4d70-8749-bb6a5598aeec * ``` */ class MfaTotp extends pulumi.CustomResource { /** * Get an existing MfaTotp 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 MfaTotp(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of MfaTotp. 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'] === MfaTotp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["algorithm"] = state?.algorithm; resourceInputs["digits"] = state?.digits; resourceInputs["issuer"] = state?.issuer; resourceInputs["keySize"] = state?.keySize; resourceInputs["maxValidationAttempts"] = state?.maxValidationAttempts; resourceInputs["methodId"] = state?.methodId; resourceInputs["mountAccessor"] = state?.mountAccessor; resourceInputs["name"] = state?.name; resourceInputs["namespace"] = state?.namespace; resourceInputs["namespaceId"] = state?.namespaceId; resourceInputs["namespacePath"] = state?.namespacePath; resourceInputs["period"] = state?.period; resourceInputs["qrSize"] = state?.qrSize; resourceInputs["skew"] = state?.skew; resourceInputs["type"] = state?.type; resourceInputs["uuid"] = state?.uuid; } else { const args = argsOrState; if (args?.issuer === undefined && !opts.urn) { throw new Error("Missing required property 'issuer'"); } resourceInputs["algorithm"] = args?.algorithm; resourceInputs["digits"] = args?.digits; resourceInputs["issuer"] = args?.issuer; resourceInputs["keySize"] = args?.keySize; resourceInputs["maxValidationAttempts"] = args?.maxValidationAttempts; resourceInputs["namespace"] = args?.namespace; resourceInputs["period"] = args?.period; resourceInputs["qrSize"] = args?.qrSize; resourceInputs["skew"] = args?.skew; resourceInputs["methodId"] = undefined /*out*/; resourceInputs["mountAccessor"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["namespaceId"] = undefined /*out*/; resourceInputs["namespacePath"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MfaTotp.__pulumiType, name, resourceInputs, opts); } } exports.MfaTotp = MfaTotp; /** @internal */ MfaTotp.__pulumiType = 'vault:identity/mfaTotp:MfaTotp'; //# sourceMappingURL=mfaTotp.js.map