@bdzscaler/pulumi-zia
Version:
A Pulumi package for creating and managing zia cloud resources.
114 lines • 5.57 kB
JavaScript
// *** 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.UserManagement = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* * [Official documentation](https://help.zscaler.com/zia/about-url-filtering)
* * [API documentation](https://help.zscaler.com/zia/url-filtering-policy#/urlFilteringRules-post)
*
* The **zia_user_management** resource allows the creation and management of local user account in the Zscaler Internet Access cloud. The user account resource can then be associated with several different types of resource within the ZIA tenant.
*
* ## Example Usage
*
* ## Optional
*
* The following attributes are supported:
*
* * `comments` - (Optional) Additional information about this user.
* * `tempAuthEmail` - (Optional) Temporary Authentication Email. If you enabled one-time tokens or links, enter the email address to which the Zscaler service sends the tokens or links. If this is empty, the service will send the email to the User email.
* * `authMethods` - (Optional) Type of authentication method to be enabled. Supported values is: ``BASIC``
*
* ## Import
*
* Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language.
*
* Visit
*
* **zia_user_management** can be imported by using `<USER_ID>` or `<USERNAME>` as the import ID.
*
* For example:
*
* ```sh
* $ pulumi import zia:index/userManagement:UserManagement example <user_id>
* ```
*
* or
*
* ```sh
* $ pulumi import zia:index/userManagement:UserManagement example <name>
* ```
*
* ⚠️ **NOTE :**: This provider do not import the password attribute value during the importing process.
*/
class UserManagement extends pulumi.CustomResource {
/**
* Get an existing UserManagement 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 UserManagement(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of UserManagement. 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'] === UserManagement.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authMethods"] = state ? state.authMethods : undefined;
resourceInputs["comments"] = state ? state.comments : undefined;
resourceInputs["department"] = state ? state.department : undefined;
resourceInputs["email"] = state ? state.email : undefined;
resourceInputs["groups"] = state ? state.groups : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["tempAuthEmail"] = state ? state.tempAuthEmail : undefined;
resourceInputs["userId"] = state ? state.userId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.department === undefined) && !opts.urn) {
throw new Error("Missing required property 'department'");
}
if ((!args || args.email === undefined) && !opts.urn) {
throw new Error("Missing required property 'email'");
}
if ((!args || args.password === undefined) && !opts.urn) {
throw new Error("Missing required property 'password'");
}
resourceInputs["authMethods"] = args ? args.authMethods : undefined;
resourceInputs["comments"] = args ? args.comments : undefined;
resourceInputs["department"] = args ? args.department : undefined;
resourceInputs["email"] = args ? args.email : undefined;
resourceInputs["groups"] = args ? args.groups : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
resourceInputs["tempAuthEmail"] = args ? args.tempAuthEmail : undefined;
resourceInputs["userId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(UserManagement.__pulumiType, name, resourceInputs, opts);
}
}
exports.UserManagement = UserManagement;
/** @internal */
UserManagement.__pulumiType = 'zia:index/userManagement:UserManagement';
//# sourceMappingURL=userManagement.js.map
;