UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

101 lines 5.5 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PasswordPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Sets the [Sumologic Password Policy](https://help.sumologic.com/Manage/Security/Set-the-Password-Policy). Since there is only a single password policy for an organization, * please ensure that only a single instance of such resource is defined. * The behavior for defining more than one password policy resources is undefined. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const examplePasswordPolicy = new sumologic.PasswordPolicy("examplePasswordPolicy", { * minLength: 8, * maxLength: 128, * mustContainLowercase: true, * mustContainUppercase: true, * mustContainDigits: true, * mustContainSpecialChars: true, * maxPasswordAgeInDays: 365, * minUniquePasswords: 10, * accountLockoutThreshold: 6, * failedLoginResetDurationInMins: 10, * accountLockoutDurationInMins: 30, * requireMfa: false, * rememberMfa: true, * }); * ``` */ class PasswordPolicy extends pulumi.CustomResource { /** * Get an existing PasswordPolicy 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 PasswordPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PasswordPolicy. 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'] === PasswordPolicy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountLockoutDurationInMins"] = state ? state.accountLockoutDurationInMins : undefined; resourceInputs["accountLockoutThreshold"] = state ? state.accountLockoutThreshold : undefined; resourceInputs["failedLoginResetDurationInMins"] = state ? state.failedLoginResetDurationInMins : undefined; resourceInputs["maxLength"] = state ? state.maxLength : undefined; resourceInputs["maxPasswordAgeInDays"] = state ? state.maxPasswordAgeInDays : undefined; resourceInputs["minLength"] = state ? state.minLength : undefined; resourceInputs["minUniquePasswords"] = state ? state.minUniquePasswords : undefined; resourceInputs["mustContainDigits"] = state ? state.mustContainDigits : undefined; resourceInputs["mustContainLowercase"] = state ? state.mustContainLowercase : undefined; resourceInputs["mustContainSpecialChars"] = state ? state.mustContainSpecialChars : undefined; resourceInputs["mustContainUppercase"] = state ? state.mustContainUppercase : undefined; resourceInputs["rememberMfa"] = state ? state.rememberMfa : undefined; resourceInputs["requireMfa"] = state ? state.requireMfa : undefined; } else { const args = argsOrState; resourceInputs["accountLockoutDurationInMins"] = args ? args.accountLockoutDurationInMins : undefined; resourceInputs["accountLockoutThreshold"] = args ? args.accountLockoutThreshold : undefined; resourceInputs["failedLoginResetDurationInMins"] = args ? args.failedLoginResetDurationInMins : undefined; resourceInputs["maxLength"] = args ? args.maxLength : undefined; resourceInputs["maxPasswordAgeInDays"] = args ? args.maxPasswordAgeInDays : undefined; resourceInputs["minLength"] = args ? args.minLength : undefined; resourceInputs["minUniquePasswords"] = args ? args.minUniquePasswords : undefined; resourceInputs["mustContainDigits"] = args ? args.mustContainDigits : undefined; resourceInputs["mustContainLowercase"] = args ? args.mustContainLowercase : undefined; resourceInputs["mustContainSpecialChars"] = args ? args.mustContainSpecialChars : undefined; resourceInputs["mustContainUppercase"] = args ? args.mustContainUppercase : undefined; resourceInputs["rememberMfa"] = args ? args.rememberMfa : undefined; resourceInputs["requireMfa"] = args ? args.requireMfa : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PasswordPolicy.__pulumiType, name, resourceInputs, opts); } } exports.PasswordPolicy = PasswordPolicy; /** @internal */ PasswordPolicy.__pulumiType = 'sumologic:index/passwordPolicy:PasswordPolicy'; //# sourceMappingURL=passwordPolicy.js.map