@osmit-gmbh/pulumi-authentik
Version:
A Pulumi package for creating and managing authentik cloud resources.
95 lines • 5.11 kB
JavaScript
;
// *** 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.PolicyPassword = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as authentik from "@osmit-gmbh/pulumi-authentik";
*
* // Create a password policy to require 8 chars
* const name = new authentik.PolicyPassword("name", {
* name: "password",
* lengthMin: 8,
* errorMessage: "foo",
* });
* ```
*/
class PolicyPassword extends pulumi.CustomResource {
/**
* Get an existing PolicyPassword 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 PolicyPassword(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PolicyPassword. 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'] === PolicyPassword.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["amountDigits"] = state ? state.amountDigits : undefined;
resourceInputs["amountLowercase"] = state ? state.amountLowercase : undefined;
resourceInputs["amountSymbols"] = state ? state.amountSymbols : undefined;
resourceInputs["amountUppercase"] = state ? state.amountUppercase : undefined;
resourceInputs["checkHaveIBeenPwned"] = state ? state.checkHaveIBeenPwned : undefined;
resourceInputs["checkStaticRules"] = state ? state.checkStaticRules : undefined;
resourceInputs["checkZxcvbn"] = state ? state.checkZxcvbn : undefined;
resourceInputs["errorMessage"] = state ? state.errorMessage : undefined;
resourceInputs["executionLogging"] = state ? state.executionLogging : undefined;
resourceInputs["hibpAllowedCount"] = state ? state.hibpAllowedCount : undefined;
resourceInputs["lengthMin"] = state ? state.lengthMin : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["passwordField"] = state ? state.passwordField : undefined;
resourceInputs["symbolCharset"] = state ? state.symbolCharset : undefined;
resourceInputs["zxcvbnScoreThreshold"] = state ? state.zxcvbnScoreThreshold : undefined;
}
else {
const args = argsOrState;
if ((!args || args.errorMessage === undefined) && !opts.urn) {
throw new Error("Missing required property 'errorMessage'");
}
resourceInputs["amountDigits"] = args ? args.amountDigits : undefined;
resourceInputs["amountLowercase"] = args ? args.amountLowercase : undefined;
resourceInputs["amountSymbols"] = args ? args.amountSymbols : undefined;
resourceInputs["amountUppercase"] = args ? args.amountUppercase : undefined;
resourceInputs["checkHaveIBeenPwned"] = args ? args.checkHaveIBeenPwned : undefined;
resourceInputs["checkStaticRules"] = args ? args.checkStaticRules : undefined;
resourceInputs["checkZxcvbn"] = args ? args.checkZxcvbn : undefined;
resourceInputs["errorMessage"] = args ? args.errorMessage : undefined;
resourceInputs["executionLogging"] = args ? args.executionLogging : undefined;
resourceInputs["hibpAllowedCount"] = args ? args.hibpAllowedCount : undefined;
resourceInputs["lengthMin"] = args ? args.lengthMin : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["passwordField"] = args ? args.passwordField : undefined;
resourceInputs["symbolCharset"] = args ? args.symbolCharset : undefined;
resourceInputs["zxcvbnScoreThreshold"] = args ? args.zxcvbnScoreThreshold : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PolicyPassword.__pulumiType, name, resourceInputs, opts);
}
}
exports.PolicyPassword = PolicyPassword;
/** @internal */
PolicyPassword.__pulumiType = 'authentik:index/policyPassword:PolicyPassword';
//# sourceMappingURL=policyPassword.js.map