UNPKG

@bdzscaler/pulumi-zia

Version:

A Pulumi package for creating and managing zia cloud resources.

128 lines 6.76 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.SandboxRules = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * * [Official documentation](https://help.zscaler.com/zia/about-sandbox) * * [API documentation](https://help.zscaler.com/zia/sandbox-policy-settings#/sandboxRules-get) * * The **zia_sandbox_rules** resource allows the creation and management of SAndbox rules in the Zscaler Internet Access. * * ## Example Usage * * ## 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_sandbox_rules** can be imported by using `<RULE ID>` or `<RULE NAME>` as the import ID. * * For example: * * ```sh * $ pulumi import zia:index/sandboxRules:SandboxRules example <rule_id> * ``` * * or * * ```sh * $ pulumi import zia:index/sandboxRules:SandboxRules example <rule_name> * ``` */ class SandboxRules extends pulumi.CustomResource { /** * Get an existing SandboxRules 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 SandboxRules(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SandboxRules. 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'] === SandboxRules.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["baPolicyCategories"] = state ? state.baPolicyCategories : undefined; resourceInputs["baRuleAction"] = state ? state.baRuleAction : undefined; resourceInputs["byThreatScore"] = state ? state.byThreatScore : undefined; resourceInputs["departments"] = state ? state.departments : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["fileTypes"] = state ? state.fileTypes : undefined; resourceInputs["firstTimeEnable"] = state ? state.firstTimeEnable : undefined; resourceInputs["firstTimeOperation"] = state ? state.firstTimeOperation : undefined; resourceInputs["groups"] = state ? state.groups : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["locationGroups"] = state ? state.locationGroups : undefined; resourceInputs["locations"] = state ? state.locations : undefined; resourceInputs["mlActionEnabled"] = state ? state.mlActionEnabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["order"] = state ? state.order : undefined; resourceInputs["protocols"] = state ? state.protocols : undefined; resourceInputs["rank"] = state ? state.rank : undefined; resourceInputs["ruleId"] = state ? state.ruleId : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["urlCategories"] = state ? state.urlCategories : undefined; resourceInputs["users"] = state ? state.users : undefined; resourceInputs["zpaAppSegments"] = state ? state.zpaAppSegments : undefined; } else { const args = argsOrState; if ((!args || args.fileTypes === undefined) && !opts.urn) { throw new Error("Missing required property 'fileTypes'"); } if ((!args || args.order === undefined) && !opts.urn) { throw new Error("Missing required property 'order'"); } if ((!args || args.protocols === undefined) && !opts.urn) { throw new Error("Missing required property 'protocols'"); } resourceInputs["baPolicyCategories"] = args ? args.baPolicyCategories : undefined; resourceInputs["baRuleAction"] = args ? args.baRuleAction : undefined; resourceInputs["byThreatScore"] = args ? args.byThreatScore : undefined; resourceInputs["departments"] = args ? args.departments : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["fileTypes"] = args ? args.fileTypes : undefined; resourceInputs["firstTimeEnable"] = args ? args.firstTimeEnable : undefined; resourceInputs["firstTimeOperation"] = args ? args.firstTimeOperation : undefined; resourceInputs["groups"] = args ? args.groups : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["locationGroups"] = args ? args.locationGroups : undefined; resourceInputs["locations"] = args ? args.locations : undefined; resourceInputs["mlActionEnabled"] = args ? args.mlActionEnabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["order"] = args ? args.order : undefined; resourceInputs["protocols"] = args ? args.protocols : undefined; resourceInputs["rank"] = args ? args.rank : undefined; resourceInputs["state"] = args ? args.state : undefined; resourceInputs["urlCategories"] = args ? args.urlCategories : undefined; resourceInputs["users"] = args ? args.users : undefined; resourceInputs["zpaAppSegments"] = args ? args.zpaAppSegments : undefined; resourceInputs["ruleId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SandboxRules.__pulumiType, name, resourceInputs, opts); } } exports.SandboxRules = SandboxRules; /** @internal */ SandboxRules.__pulumiType = 'zia:index/sandboxRules:SandboxRules'; //# sourceMappingURL=sandboxRules.js.map