UNPKG

@bdzscaler/pulumi-zpa

Version:

A Pulumi package for creating and managing Zscaler Private Access (ZPA) cloud resources.

156 lines 8.22 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.PolicyAccessIsolationRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * * [Official documentation](https://help.zscaler.com/zpa/about-isolation-policy) * * [API documentation](https://help.zscaler.com/zpa/configuring-isolation-policies-using-api) * * The **zpa_policy_isolation_rule** resource creates a policy isolation access rule in the Zscaler Private Access cloud. * * ⚠️ **WARNING:**: The attribute ``ruleOrder`` is now deprecated in favor of the new resource ``policyAccessRuleReorder`` * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as zpa from "@bdzscaler/pulumi-zpa"; * * const isolationProfile = zpa.getIsolationProfile({ * name: "zpa_isolation_profile", * }); * //Create Client Isolation Access Rule * const _this = new zpa.PolicyAccessIsolationRule("this", { * description: "Example_Isolation_Policy", * action: "ISOLATE", * operator: "AND", * zpnIsolationProfileId: isolationProfile.then(isolationProfile => isolationProfile.id), * conditions: [{ * operator: "OR", * operands: [{ * objectType: "CLIENT_TYPE", * lhs: "id", * rhs: "zpn_client_type_exporter", * }], * }], * }); * ``` * * ## LHS and RHS Values * * LHS and RHS values differ based on object types. Refer to the following table: * * | Object Type | LHS| RHS * |----------|-----------|---------- * | APP | ``"id"`` | ``applicationSegmentId`` | * | APP_GROUP | ``"id"`` | ``segmentGroupId``| * | CLIENT_TYPE | ``"id"`` | ``zpnClientTypeExporter`` | * | PLATFORM | ``mac``, ``ios``, ``windows``, ``android``, ``linux`` | ``"true"`` / ``"false"`` | * | EDGE_CONNECTOR_GROUP | ``"id"`` | ``edgeConnectorId`` | * | IDP | ``"id"`` | ``identityProviderId`` | * | SAML | ``samlAttributeId`` | <Attribute_value_to_match> | * | SCIM | ``scimAttributeId`` | <Attribute_value_to_match> | * | SCIM_GROUP | ``scimGroupAttributeId`` | <Attribute_value_to_match> | * | MACHINE_GRP | ``"id"`` | ``machineGroupId`` | * | POSTURE | ``postureUdid`` | ``"true"`` / ``"false"`` | * | TRUSTED_NETWORK | ``networkId`` | ``"true"`` | * * ## Import * * Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. * * Visit * * Policy Access Isolation Rule can be imported by using `<POLICY ISOLATION RULE ID>` as the import ID. * * For example: * * ```sh * $ pulumi import zpa:index/policyAccessIsolationRule:PolicyAccessIsolationRule example <policy_isolation_rule_id> * ``` */ class PolicyAccessIsolationRule extends pulumi.CustomResource { /** * Get an existing PolicyAccessIsolationRule 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 PolicyAccessIsolationRule(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PolicyAccessIsolationRule. 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'] === PolicyAccessIsolationRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state ? state.action : undefined; resourceInputs["actionId"] = state ? state.actionId : undefined; resourceInputs["bypassDefaultRule"] = state ? state.bypassDefaultRule : undefined; resourceInputs["conditions"] = state ? state.conditions : undefined; resourceInputs["customMsg"] = state ? state.customMsg : undefined; resourceInputs["defaultRule"] = state ? state.defaultRule : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["lssDefaultRule"] = state ? state.lssDefaultRule : undefined; resourceInputs["microtenantId"] = state ? state.microtenantId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["operator"] = state ? state.operator : undefined; resourceInputs["policySetId"] = state ? state.policySetId : undefined; resourceInputs["policyType"] = state ? state.policyType : undefined; resourceInputs["priority"] = state ? state.priority : undefined; resourceInputs["reauthDefaultRule"] = state ? state.reauthDefaultRule : undefined; resourceInputs["reauthIdleTimeout"] = state ? state.reauthIdleTimeout : undefined; resourceInputs["reauthTimeout"] = state ? state.reauthTimeout : undefined; resourceInputs["ruleOrder"] = state ? state.ruleOrder : undefined; resourceInputs["zpnCbiProfileId"] = state ? state.zpnCbiProfileId : undefined; resourceInputs["zpnInspectionProfileId"] = state ? state.zpnInspectionProfileId : undefined; resourceInputs["zpnIsolationProfileId"] = state ? state.zpnIsolationProfileId : undefined; } else { const args = argsOrState; resourceInputs["action"] = args ? args.action : undefined; resourceInputs["actionId"] = args ? args.actionId : undefined; resourceInputs["bypassDefaultRule"] = args ? args.bypassDefaultRule : undefined; resourceInputs["conditions"] = args ? args.conditions : undefined; resourceInputs["customMsg"] = args ? args.customMsg : undefined; resourceInputs["defaultRule"] = args ? args.defaultRule : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["lssDefaultRule"] = args ? args.lssDefaultRule : undefined; resourceInputs["microtenantId"] = args ? args.microtenantId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["operator"] = args ? args.operator : undefined; resourceInputs["policySetId"] = args ? args.policySetId : undefined; resourceInputs["policyType"] = args ? args.policyType : undefined; resourceInputs["priority"] = args ? args.priority : undefined; resourceInputs["reauthDefaultRule"] = args ? args.reauthDefaultRule : undefined; resourceInputs["reauthIdleTimeout"] = args ? args.reauthIdleTimeout : undefined; resourceInputs["reauthTimeout"] = args ? args.reauthTimeout : undefined; resourceInputs["ruleOrder"] = args ? args.ruleOrder : undefined; resourceInputs["zpnCbiProfileId"] = args ? args.zpnCbiProfileId : undefined; resourceInputs["zpnInspectionProfileId"] = args ? args.zpnInspectionProfileId : undefined; resourceInputs["zpnIsolationProfileId"] = args ? args.zpnIsolationProfileId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PolicyAccessIsolationRule.__pulumiType, name, resourceInputs, opts); } } exports.PolicyAccessIsolationRule = PolicyAccessIsolationRule; /** @internal */ PolicyAccessIsolationRule.__pulumiType = 'zpa:index/policyAccessIsolationRule:PolicyAccessIsolationRule'; //# sourceMappingURL=policyAccessIsolationRule.js.map