# coding=utf-8
# *** 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! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['PolicyAccessRuleArgs', 'PolicyAccessRule']

@pulumi.input_type
class PolicyAccessRuleArgs:
    def __init__(__self__, *,
                 action: Optional[pulumi.Input[str]] = None,
                 action_id: Optional[pulumi.Input[str]] = None,
                 app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]] = None,
                 app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]] = None,
                 bypass_default_rule: Optional[pulumi.Input[bool]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]] = None,
                 custom_msg: Optional[pulumi.Input[str]] = None,
                 default_rule: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 lss_default_rule: Optional[pulumi.Input[bool]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 operator: Optional[pulumi.Input[str]] = None,
                 policy_set_id: Optional[pulumi.Input[str]] = None,
                 policy_type: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[str]] = None,
                 reauth_default_rule: Optional[pulumi.Input[bool]] = None,
                 reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
                 reauth_timeout: Optional[pulumi.Input[str]] = None,
                 rule_order: Optional[pulumi.Input[str]] = None,
                 zpn_cbi_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_isolation_profile_id: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a PolicyAccessRule resource.
        :param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        :param pulumi.Input[str] action_id: This field defines the description of the server.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]] app_connector_groups: List of app-connector IDs.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]] app_server_groups: List of the server group IDs.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]] conditions: (Optional)
        :param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
        :param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
        :param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
        :param pulumi.Input[str] microtenant_id: (Optional) The ID of the microtenant the resource is to be associated with.
        :param pulumi.Input[str] name: (Optional)
        :param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
        :param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        :param pulumi.Input[str] rule_order: (Deprecated)
        """
        if action is not None:
            pulumi.set(__self__, "action", action)
        if action_id is not None:
            pulumi.set(__self__, "action_id", action_id)
        if app_connector_groups is not None:
            pulumi.set(__self__, "app_connector_groups", app_connector_groups)
        if app_server_groups is not None:
            pulumi.set(__self__, "app_server_groups", app_server_groups)
        if bypass_default_rule is not None:
            pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if custom_msg is not None:
            pulumi.set(__self__, "custom_msg", custom_msg)
        if default_rule is not None:
            pulumi.set(__self__, "default_rule", default_rule)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if lss_default_rule is not None:
            pulumi.set(__self__, "lss_default_rule", lss_default_rule)
        if microtenant_id is not None:
            pulumi.set(__self__, "microtenant_id", microtenant_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if operator is not None:
            pulumi.set(__self__, "operator", operator)
        if policy_set_id is not None:
            pulumi.set(__self__, "policy_set_id", policy_set_id)
        if policy_type is not None:
            pulumi.set(__self__, "policy_type", policy_type)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if reauth_default_rule is not None:
            pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
        if reauth_idle_timeout is not None:
            pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
        if reauth_timeout is not None:
            pulumi.set(__self__, "reauth_timeout", reauth_timeout)
        if rule_order is not None:
            warnings.warn("""The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""", DeprecationWarning)
            pulumi.log.warn("""rule_order is deprecated: The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""")
        if rule_order is not None:
            pulumi.set(__self__, "rule_order", rule_order)
        if zpn_cbi_profile_id is not None:
            pulumi.set(__self__, "zpn_cbi_profile_id", zpn_cbi_profile_id)
        if zpn_inspection_profile_id is not None:
            pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
        if zpn_isolation_profile_id is not None:
            pulumi.set(__self__, "zpn_isolation_profile_id", zpn_isolation_profile_id)

    @property
    @pulumi.getter
    def action(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        """
        return pulumi.get(self, "action")

    @action.setter
    def action(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "action", value)

    @property
    @pulumi.getter(name="actionId")
    def action_id(self) -> Optional[pulumi.Input[str]]:
        """
        This field defines the description of the server.
        """
        return pulumi.get(self, "action_id")

    @action_id.setter
    def action_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "action_id", value)

    @property
    @pulumi.getter(name="appConnectorGroups")
    def app_connector_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]:
        """
        List of app-connector IDs.
        """
        return pulumi.get(self, "app_connector_groups")

    @app_connector_groups.setter
    def app_connector_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]):
        pulumi.set(self, "app_connector_groups", value)

    @property
    @pulumi.getter(name="appServerGroups")
    def app_server_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]:
        """
        List of the server group IDs.
        """
        return pulumi.get(self, "app_server_groups")

    @app_server_groups.setter
    def app_server_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]):
        pulumi.set(self, "app_server_groups", value)

    @property
    @pulumi.getter(name="bypassDefaultRule")
    def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "bypass_default_rule")

    @bypass_default_rule.setter
    def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "bypass_default_rule", value)

    @property
    @pulumi.getter
    def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]:
        """
        (Optional)
        """
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="customMsg")
    def custom_msg(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is for providing a customer message for the user.
        """
        return pulumi.get(self, "custom_msg")

    @custom_msg.setter
    def custom_msg(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "custom_msg", value)

    @property
    @pulumi.getter(name="defaultRule")
    def default_rule(self) -> Optional[pulumi.Input[bool]]:
        """
        This is for providing a customer message for the user.
        """
        return pulumi.get(self, "default_rule")

    @default_rule.setter
    def default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "default_rule", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is the description of the access policy rule.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="lssDefaultRule")
    def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "lss_default_rule")

    @lss_default_rule.setter
    def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "lss_default_rule", value)

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) The ID of the microtenant the resource is to be associated with.
        """
        return pulumi.get(self, "microtenant_id")

    @microtenant_id.setter
    def microtenant_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "microtenant_id", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional)
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def operator(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) Supported values: ``AND``, and ``OR``
        """
        return pulumi.get(self, "operator")

    @operator.setter
    def operator(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "operator", value)

    @property
    @pulumi.getter(name="policySetId")
    def policy_set_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "policy_set_id")

    @policy_set_id.setter
    def policy_set_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "policy_set_id", value)

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        """
        return pulumi.get(self, "policy_type")

    @policy_type.setter
    def policy_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "policy_type", value)

    @property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="reauthDefaultRule")
    def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "reauth_default_rule")

    @reauth_default_rule.setter
    def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "reauth_default_rule", value)

    @property
    @pulumi.getter(name="reauthIdleTimeout")
    def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "reauth_idle_timeout")

    @reauth_idle_timeout.setter
    def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reauth_idle_timeout", value)

    @property
    @pulumi.getter(name="reauthTimeout")
    def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "reauth_timeout")

    @reauth_timeout.setter
    def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reauth_timeout", value)

    @property
    @pulumi.getter(name="ruleOrder")
    def rule_order(self) -> Optional[pulumi.Input[str]]:
        """
        (Deprecated)
        """
        warnings.warn("""The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""", DeprecationWarning)
        pulumi.log.warn("""rule_order is deprecated: The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""")

        return pulumi.get(self, "rule_order")

    @rule_order.setter
    def rule_order(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "rule_order", value)

    @property
    @pulumi.getter(name="zpnCbiProfileId")
    def zpn_cbi_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_cbi_profile_id")

    @zpn_cbi_profile_id.setter
    def zpn_cbi_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_cbi_profile_id", value)

    @property
    @pulumi.getter(name="zpnInspectionProfileId")
    def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_inspection_profile_id")

    @zpn_inspection_profile_id.setter
    def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_inspection_profile_id", value)

    @property
    @pulumi.getter(name="zpnIsolationProfileId")
    def zpn_isolation_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_isolation_profile_id")

    @zpn_isolation_profile_id.setter
    def zpn_isolation_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_isolation_profile_id", value)


@pulumi.input_type
class _PolicyAccessRuleState:
    def __init__(__self__, *,
                 action: Optional[pulumi.Input[str]] = None,
                 action_id: Optional[pulumi.Input[str]] = None,
                 app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]] = None,
                 app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]] = None,
                 bypass_default_rule: Optional[pulumi.Input[bool]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]] = None,
                 custom_msg: Optional[pulumi.Input[str]] = None,
                 default_rule: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 lss_default_rule: Optional[pulumi.Input[bool]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 operator: Optional[pulumi.Input[str]] = None,
                 policy_set_id: Optional[pulumi.Input[str]] = None,
                 policy_type: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[str]] = None,
                 reauth_default_rule: Optional[pulumi.Input[bool]] = None,
                 reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
                 reauth_timeout: Optional[pulumi.Input[str]] = None,
                 rule_order: Optional[pulumi.Input[str]] = None,
                 zpn_cbi_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_isolation_profile_id: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering PolicyAccessRule resources.
        :param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        :param pulumi.Input[str] action_id: This field defines the description of the server.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]] app_connector_groups: List of app-connector IDs.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]] app_server_groups: List of the server group IDs.
        :param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]] conditions: (Optional)
        :param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
        :param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
        :param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
        :param pulumi.Input[str] microtenant_id: (Optional) The ID of the microtenant the resource is to be associated with.
        :param pulumi.Input[str] name: (Optional)
        :param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
        :param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        :param pulumi.Input[str] rule_order: (Deprecated)
        """
        if action is not None:
            pulumi.set(__self__, "action", action)
        if action_id is not None:
            pulumi.set(__self__, "action_id", action_id)
        if app_connector_groups is not None:
            pulumi.set(__self__, "app_connector_groups", app_connector_groups)
        if app_server_groups is not None:
            pulumi.set(__self__, "app_server_groups", app_server_groups)
        if bypass_default_rule is not None:
            pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if custom_msg is not None:
            pulumi.set(__self__, "custom_msg", custom_msg)
        if default_rule is not None:
            pulumi.set(__self__, "default_rule", default_rule)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if lss_default_rule is not None:
            pulumi.set(__self__, "lss_default_rule", lss_default_rule)
        if microtenant_id is not None:
            pulumi.set(__self__, "microtenant_id", microtenant_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if operator is not None:
            pulumi.set(__self__, "operator", operator)
        if policy_set_id is not None:
            pulumi.set(__self__, "policy_set_id", policy_set_id)
        if policy_type is not None:
            pulumi.set(__self__, "policy_type", policy_type)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if reauth_default_rule is not None:
            pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
        if reauth_idle_timeout is not None:
            pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
        if reauth_timeout is not None:
            pulumi.set(__self__, "reauth_timeout", reauth_timeout)
        if rule_order is not None:
            warnings.warn("""The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""", DeprecationWarning)
            pulumi.log.warn("""rule_order is deprecated: The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""")
        if rule_order is not None:
            pulumi.set(__self__, "rule_order", rule_order)
        if zpn_cbi_profile_id is not None:
            pulumi.set(__self__, "zpn_cbi_profile_id", zpn_cbi_profile_id)
        if zpn_inspection_profile_id is not None:
            pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
        if zpn_isolation_profile_id is not None:
            pulumi.set(__self__, "zpn_isolation_profile_id", zpn_isolation_profile_id)

    @property
    @pulumi.getter
    def action(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        """
        return pulumi.get(self, "action")

    @action.setter
    def action(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "action", value)

    @property
    @pulumi.getter(name="actionId")
    def action_id(self) -> Optional[pulumi.Input[str]]:
        """
        This field defines the description of the server.
        """
        return pulumi.get(self, "action_id")

    @action_id.setter
    def action_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "action_id", value)

    @property
    @pulumi.getter(name="appConnectorGroups")
    def app_connector_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]:
        """
        List of app-connector IDs.
        """
        return pulumi.get(self, "app_connector_groups")

    @app_connector_groups.setter
    def app_connector_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]):
        pulumi.set(self, "app_connector_groups", value)

    @property
    @pulumi.getter(name="appServerGroups")
    def app_server_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]:
        """
        List of the server group IDs.
        """
        return pulumi.get(self, "app_server_groups")

    @app_server_groups.setter
    def app_server_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]):
        pulumi.set(self, "app_server_groups", value)

    @property
    @pulumi.getter(name="bypassDefaultRule")
    def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "bypass_default_rule")

    @bypass_default_rule.setter
    def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "bypass_default_rule", value)

    @property
    @pulumi.getter
    def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]:
        """
        (Optional)
        """
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="customMsg")
    def custom_msg(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is for providing a customer message for the user.
        """
        return pulumi.get(self, "custom_msg")

    @custom_msg.setter
    def custom_msg(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "custom_msg", value)

    @property
    @pulumi.getter(name="defaultRule")
    def default_rule(self) -> Optional[pulumi.Input[bool]]:
        """
        This is for providing a customer message for the user.
        """
        return pulumi.get(self, "default_rule")

    @default_rule.setter
    def default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "default_rule", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) This is the description of the access policy rule.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="lssDefaultRule")
    def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "lss_default_rule")

    @lss_default_rule.setter
    def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "lss_default_rule", value)

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) The ID of the microtenant the resource is to be associated with.
        """
        return pulumi.get(self, "microtenant_id")

    @microtenant_id.setter
    def microtenant_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "microtenant_id", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional)
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def operator(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) Supported values: ``AND``, and ``OR``
        """
        return pulumi.get(self, "operator")

    @operator.setter
    def operator(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "operator", value)

    @property
    @pulumi.getter(name="policySetId")
    def policy_set_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "policy_set_id")

    @policy_set_id.setter
    def policy_set_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "policy_set_id", value)

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> Optional[pulumi.Input[str]]:
        """
        (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        """
        return pulumi.get(self, "policy_type")

    @policy_type.setter
    def policy_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "policy_type", value)

    @property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="reauthDefaultRule")
    def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "reauth_default_rule")

    @reauth_default_rule.setter
    def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "reauth_default_rule", value)

    @property
    @pulumi.getter(name="reauthIdleTimeout")
    def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "reauth_idle_timeout")

    @reauth_idle_timeout.setter
    def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reauth_idle_timeout", value)

    @property
    @pulumi.getter(name="reauthTimeout")
    def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "reauth_timeout")

    @reauth_timeout.setter
    def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reauth_timeout", value)

    @property
    @pulumi.getter(name="ruleOrder")
    def rule_order(self) -> Optional[pulumi.Input[str]]:
        """
        (Deprecated)
        """
        warnings.warn("""The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""", DeprecationWarning)
        pulumi.log.warn("""rule_order is deprecated: The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""")

        return pulumi.get(self, "rule_order")

    @rule_order.setter
    def rule_order(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "rule_order", value)

    @property
    @pulumi.getter(name="zpnCbiProfileId")
    def zpn_cbi_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_cbi_profile_id")

    @zpn_cbi_profile_id.setter
    def zpn_cbi_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_cbi_profile_id", value)

    @property
    @pulumi.getter(name="zpnInspectionProfileId")
    def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_inspection_profile_id")

    @zpn_inspection_profile_id.setter
    def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_inspection_profile_id", value)

    @property
    @pulumi.getter(name="zpnIsolationProfileId")
    def zpn_isolation_profile_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "zpn_isolation_profile_id")

    @zpn_isolation_profile_id.setter
    def zpn_isolation_profile_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zpn_isolation_profile_id", value)


class PolicyAccessRule(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 action: Optional[pulumi.Input[str]] = None,
                 action_id: Optional[pulumi.Input[str]] = None,
                 app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
                 app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
                 bypass_default_rule: Optional[pulumi.Input[bool]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
                 custom_msg: Optional[pulumi.Input[str]] = None,
                 default_rule: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 lss_default_rule: Optional[pulumi.Input[bool]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 operator: Optional[pulumi.Input[str]] = None,
                 policy_set_id: Optional[pulumi.Input[str]] = None,
                 policy_type: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[str]] = None,
                 reauth_default_rule: Optional[pulumi.Input[bool]] = None,
                 reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
                 reauth_timeout: Optional[pulumi.Input[str]] = None,
                 rule_order: Optional[pulumi.Input[str]] = None,
                 zpn_cbi_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_isolation_profile_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        The **zpa_policy_access_rule** resource creates and manages policy access rule in the Zscaler Private Access cloud.

          ⚠️ **WARNING:**: The attribute ``rule_order`` is now deprecated in favor of the new resource  ``policy_access_rule_reorder``

        ## Example Usage

        ```python
        import pulumi
        import pulumi_zpa as zpa

        access_policy = zpa.get_policy_type(policy_type="ACCESS_POLICY")
        idp_name = zpa.get_id_p_controller(name="IdP_Name")
        engineering = zpa.get_scim_groups(name="Engineering",
            idp_name="IdP_Name")
        #Create Policy Access Rule
        this = zpa.PolicyAccessRule("this",
            description="Example",
            action="ALLOW",
            operator="AND",
            policy_set_id=access_policy.id,
            conditions=[
                zpa.PolicyAccessRuleConditionArgs(
                    negated=False,
                    operator="OR",
                    operands=[zpa.PolicyAccessRuleConditionOperandArgs(
                        object_type="APP",
                        lhs="id",
                        rhs=zpa_application_segment["this"]["id"],
                    )],
                ),
                zpa.PolicyAccessRuleConditionArgs(
                    negated=False,
                    operator="OR",
                    operands=[zpa.PolicyAccessRuleConditionOperandArgs(
                        object_type="SCIM_GROUP",
                        lhs=idp_name.id,
                        rhs=engineering.id,
                    )],
                ),
            ])
        ```
        ### Required

        * `name` - (Required) This is the name of the policy rule.
        * `policy_set_id` - (Required) Use get_policy_type data source to retrieve the necessary policy Set ID ``policy_set_id``
        ## LHS and RHS Values

        | Object Type | LHS| RHS
        |----------|-----------|----------
        | APP | ``"id"`` | ``application_segment_id`` |
        | APP_GROUP | ``"id"`` | ``segment_group_id``|
        | CLIENT_TYPE | ``"id"`` | ``zpn_client_type_zappl``, ``zpn_client_type_exporter``, ``zpn_client_type_browser_isolation``, ``zpn_client_type_ip_anchoring``, ``zpn_client_type_edge_connector``, ``zpn_client_type_branch_connector``,  ``zpn_client_type_zapp_partner``, ``zpn_client_type_zapp``  |
        | EDGE_CONNECTOR_GROUP | ``"id"`` | ``<edge_connector_id>`` |
        | IDP | ``"id"`` | ``identity_provider_id`` |
        | SAML | ``saml_attribute_id``  | ``attribute_value_to_match`` |
        | SCIM | ``scim_attribute_id``  | ``attribute_value_to_match``  |
        | SCIM_GROUP | ``scim_group_attribute_id``  | ``attribute_value_to_match``  |
        | PLATFORM | ``mac``, ``ios``, ``windows``, ``android``, ``linux`` | ``"true"`` / ``"false"`` |
        | MACHINE_GRP | ``"id"`` | ``machine_group_id`` |
        | POSTURE | ``posture_udid``  | ``"true"`` / ``"false"`` |
        | TRUSTED_NETWORK | ``network_id``  | ``"true"`` |
        | COUNTRY_CODE | [2 Letter ISO3166 Alpha2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)  | ``"true"`` / ``"false"`` |

        ## 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 rule can be imported by using `<POLICY ACCESS RULE ID>` as the import ID. For example

        ```sh
         $ pulumi import zpa:index/policyAccessRule:PolicyAccessRule example <policy_access_rule_id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        :param pulumi.Input[str] action_id: This field defines the description of the server.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]] app_connector_groups: List of app-connector IDs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]] app_server_groups: List of the server group IDs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]] conditions: (Optional)
        :param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
        :param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
        :param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
        :param pulumi.Input[str] microtenant_id: (Optional) The ID of the microtenant the resource is to be associated with.
        :param pulumi.Input[str] name: (Optional)
        :param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
        :param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        :param pulumi.Input[str] rule_order: (Deprecated)
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[PolicyAccessRuleArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The **zpa_policy_access_rule** resource creates and manages policy access rule in the Zscaler Private Access cloud.

          ⚠️ **WARNING:**: The attribute ``rule_order`` is now deprecated in favor of the new resource  ``policy_access_rule_reorder``

        ## Example Usage

        ```python
        import pulumi
        import pulumi_zpa as zpa

        access_policy = zpa.get_policy_type(policy_type="ACCESS_POLICY")
        idp_name = zpa.get_id_p_controller(name="IdP_Name")
        engineering = zpa.get_scim_groups(name="Engineering",
            idp_name="IdP_Name")
        #Create Policy Access Rule
        this = zpa.PolicyAccessRule("this",
            description="Example",
            action="ALLOW",
            operator="AND",
            policy_set_id=access_policy.id,
            conditions=[
                zpa.PolicyAccessRuleConditionArgs(
                    negated=False,
                    operator="OR",
                    operands=[zpa.PolicyAccessRuleConditionOperandArgs(
                        object_type="APP",
                        lhs="id",
                        rhs=zpa_application_segment["this"]["id"],
                    )],
                ),
                zpa.PolicyAccessRuleConditionArgs(
                    negated=False,
                    operator="OR",
                    operands=[zpa.PolicyAccessRuleConditionOperandArgs(
                        object_type="SCIM_GROUP",
                        lhs=idp_name.id,
                        rhs=engineering.id,
                    )],
                ),
            ])
        ```
        ### Required

        * `name` - (Required) This is the name of the policy rule.
        * `policy_set_id` - (Required) Use get_policy_type data source to retrieve the necessary policy Set ID ``policy_set_id``
        ## LHS and RHS Values

        | Object Type | LHS| RHS
        |----------|-----------|----------
        | APP | ``"id"`` | ``application_segment_id`` |
        | APP_GROUP | ``"id"`` | ``segment_group_id``|
        | CLIENT_TYPE | ``"id"`` | ``zpn_client_type_zappl``, ``zpn_client_type_exporter``, ``zpn_client_type_browser_isolation``, ``zpn_client_type_ip_anchoring``, ``zpn_client_type_edge_connector``, ``zpn_client_type_branch_connector``,  ``zpn_client_type_zapp_partner``, ``zpn_client_type_zapp``  |
        | EDGE_CONNECTOR_GROUP | ``"id"`` | ``<edge_connector_id>`` |
        | IDP | ``"id"`` | ``identity_provider_id`` |
        | SAML | ``saml_attribute_id``  | ``attribute_value_to_match`` |
        | SCIM | ``scim_attribute_id``  | ``attribute_value_to_match``  |
        | SCIM_GROUP | ``scim_group_attribute_id``  | ``attribute_value_to_match``  |
        | PLATFORM | ``mac``, ``ios``, ``windows``, ``android``, ``linux`` | ``"true"`` / ``"false"`` |
        | MACHINE_GRP | ``"id"`` | ``machine_group_id`` |
        | POSTURE | ``posture_udid``  | ``"true"`` / ``"false"`` |
        | TRUSTED_NETWORK | ``network_id``  | ``"true"`` |
        | COUNTRY_CODE | [2 Letter ISO3166 Alpha2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)  | ``"true"`` / ``"false"`` |

        ## 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 rule can be imported by using `<POLICY ACCESS RULE ID>` as the import ID. For example

        ```sh
         $ pulumi import zpa:index/policyAccessRule:PolicyAccessRule example <policy_access_rule_id>
        ```

        :param str resource_name: The name of the resource.
        :param PolicyAccessRuleArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(PolicyAccessRuleArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 action: Optional[pulumi.Input[str]] = None,
                 action_id: Optional[pulumi.Input[str]] = None,
                 app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
                 app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
                 bypass_default_rule: Optional[pulumi.Input[bool]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
                 custom_msg: Optional[pulumi.Input[str]] = None,
                 default_rule: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 lss_default_rule: Optional[pulumi.Input[bool]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 operator: Optional[pulumi.Input[str]] = None,
                 policy_set_id: Optional[pulumi.Input[str]] = None,
                 policy_type: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[str]] = None,
                 reauth_default_rule: Optional[pulumi.Input[bool]] = None,
                 reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
                 reauth_timeout: Optional[pulumi.Input[str]] = None,
                 rule_order: Optional[pulumi.Input[str]] = None,
                 zpn_cbi_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
                 zpn_isolation_profile_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = PolicyAccessRuleArgs.__new__(PolicyAccessRuleArgs)

            __props__.__dict__["action"] = action
            __props__.__dict__["action_id"] = action_id
            __props__.__dict__["app_connector_groups"] = app_connector_groups
            __props__.__dict__["app_server_groups"] = app_server_groups
            __props__.__dict__["bypass_default_rule"] = bypass_default_rule
            __props__.__dict__["conditions"] = conditions
            __props__.__dict__["custom_msg"] = custom_msg
            __props__.__dict__["default_rule"] = default_rule
            __props__.__dict__["description"] = description
            __props__.__dict__["lss_default_rule"] = lss_default_rule
            __props__.__dict__["microtenant_id"] = microtenant_id
            __props__.__dict__["name"] = name
            __props__.__dict__["operator"] = operator
            __props__.__dict__["policy_set_id"] = policy_set_id
            __props__.__dict__["policy_type"] = policy_type
            __props__.__dict__["priority"] = priority
            __props__.__dict__["reauth_default_rule"] = reauth_default_rule
            __props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
            __props__.__dict__["reauth_timeout"] = reauth_timeout
            __props__.__dict__["rule_order"] = rule_order
            __props__.__dict__["zpn_cbi_profile_id"] = zpn_cbi_profile_id
            __props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
            __props__.__dict__["zpn_isolation_profile_id"] = zpn_isolation_profile_id
        super(PolicyAccessRule, __self__).__init__(
            'zpa:index/policyAccessRule:PolicyAccessRule',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            action: Optional[pulumi.Input[str]] = None,
            action_id: Optional[pulumi.Input[str]] = None,
            app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
            app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
            bypass_default_rule: Optional[pulumi.Input[bool]] = None,
            conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
            custom_msg: Optional[pulumi.Input[str]] = None,
            default_rule: Optional[pulumi.Input[bool]] = None,
            description: Optional[pulumi.Input[str]] = None,
            lss_default_rule: Optional[pulumi.Input[bool]] = None,
            microtenant_id: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            operator: Optional[pulumi.Input[str]] = None,
            policy_set_id: Optional[pulumi.Input[str]] = None,
            policy_type: Optional[pulumi.Input[str]] = None,
            priority: Optional[pulumi.Input[str]] = None,
            reauth_default_rule: Optional[pulumi.Input[bool]] = None,
            reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
            reauth_timeout: Optional[pulumi.Input[str]] = None,
            rule_order: Optional[pulumi.Input[str]] = None,
            zpn_cbi_profile_id: Optional[pulumi.Input[str]] = None,
            zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
            zpn_isolation_profile_id: Optional[pulumi.Input[str]] = None) -> 'PolicyAccessRule':
        """
        Get an existing PolicyAccessRule resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        :param pulumi.Input[str] action_id: This field defines the description of the server.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]] app_connector_groups: List of app-connector IDs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]] app_server_groups: List of the server group IDs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]] conditions: (Optional)
        :param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
        :param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
        :param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
        :param pulumi.Input[str] microtenant_id: (Optional) The ID of the microtenant the resource is to be associated with.
        :param pulumi.Input[str] name: (Optional)
        :param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
        :param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        :param pulumi.Input[str] rule_order: (Deprecated)
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PolicyAccessRuleState.__new__(_PolicyAccessRuleState)

        __props__.__dict__["action"] = action
        __props__.__dict__["action_id"] = action_id
        __props__.__dict__["app_connector_groups"] = app_connector_groups
        __props__.__dict__["app_server_groups"] = app_server_groups
        __props__.__dict__["bypass_default_rule"] = bypass_default_rule
        __props__.__dict__["conditions"] = conditions
        __props__.__dict__["custom_msg"] = custom_msg
        __props__.__dict__["default_rule"] = default_rule
        __props__.__dict__["description"] = description
        __props__.__dict__["lss_default_rule"] = lss_default_rule
        __props__.__dict__["microtenant_id"] = microtenant_id
        __props__.__dict__["name"] = name
        __props__.__dict__["operator"] = operator
        __props__.__dict__["policy_set_id"] = policy_set_id
        __props__.__dict__["policy_type"] = policy_type
        __props__.__dict__["priority"] = priority
        __props__.__dict__["reauth_default_rule"] = reauth_default_rule
        __props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
        __props__.__dict__["reauth_timeout"] = reauth_timeout
        __props__.__dict__["rule_order"] = rule_order
        __props__.__dict__["zpn_cbi_profile_id"] = zpn_cbi_profile_id
        __props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
        __props__.__dict__["zpn_isolation_profile_id"] = zpn_isolation_profile_id
        return PolicyAccessRule(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def action(self) -> pulumi.Output[Optional[str]]:
        """
        (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``, and ``REQUIRE_APPROVAL``
        """
        return pulumi.get(self, "action")

    @property
    @pulumi.getter(name="actionId")
    def action_id(self) -> pulumi.Output[Optional[str]]:
        """
        This field defines the description of the server.
        """
        return pulumi.get(self, "action_id")

    @property
    @pulumi.getter(name="appConnectorGroups")
    def app_connector_groups(self) -> pulumi.Output[Sequence['outputs.PolicyAccessRuleAppConnectorGroup']]:
        """
        List of app-connector IDs.
        """
        return pulumi.get(self, "app_connector_groups")

    @property
    @pulumi.getter(name="appServerGroups")
    def app_server_groups(self) -> pulumi.Output[Sequence['outputs.PolicyAccessRuleAppServerGroup']]:
        """
        List of the server group IDs.
        """
        return pulumi.get(self, "app_server_groups")

    @property
    @pulumi.getter(name="bypassDefaultRule")
    def bypass_default_rule(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "bypass_default_rule")

    @property
    @pulumi.getter
    def conditions(self) -> pulumi.Output[Optional[Sequence['outputs.PolicyAccessRuleCondition']]]:
        """
        (Optional)
        """
        return pulumi.get(self, "conditions")

    @property
    @pulumi.getter(name="customMsg")
    def custom_msg(self) -> pulumi.Output[Optional[str]]:
        """
        (Optional) This is for providing a customer message for the user.
        """
        return pulumi.get(self, "custom_msg")

    @property
    @pulumi.getter(name="defaultRule")
    def default_rule(self) -> pulumi.Output[Optional[bool]]:
        """
        This is for providing a customer message for the user.
        """
        return pulumi.get(self, "default_rule")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        (Optional) This is the description of the access policy rule.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="lssDefaultRule")
    def lss_default_rule(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "lss_default_rule")

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> pulumi.Output[str]:
        """
        (Optional) The ID of the microtenant the resource is to be associated with.
        """
        return pulumi.get(self, "microtenant_id")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        (Optional)
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def operator(self) -> pulumi.Output[str]:
        """
        (Optional) Supported values: ``AND``, and ``OR``
        """
        return pulumi.get(self, "operator")

    @property
    @pulumi.getter(name="policySetId")
    def policy_set_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "policy_set_id")

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> pulumi.Output[str]:
        """
        (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
        """
        return pulumi.get(self, "policy_type")

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Output[str]:
        return pulumi.get(self, "priority")

    @property
    @pulumi.getter(name="reauthDefaultRule")
    def reauth_default_rule(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "reauth_default_rule")

    @property
    @pulumi.getter(name="reauthIdleTimeout")
    def reauth_idle_timeout(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "reauth_idle_timeout")

    @property
    @pulumi.getter(name="reauthTimeout")
    def reauth_timeout(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "reauth_timeout")

    @property
    @pulumi.getter(name="ruleOrder")
    def rule_order(self) -> pulumi.Output[str]:
        """
        (Deprecated)
        """
        warnings.warn("""The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""", DeprecationWarning)
        pulumi.log.warn("""rule_order is deprecated: The `rule_order` field is now deprecated for all zpa access policy resources in favor of the resource `zpa_policy_access_rule_reorder`""")

        return pulumi.get(self, "rule_order")

    @property
    @pulumi.getter(name="zpnCbiProfileId")
    def zpn_cbi_profile_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "zpn_cbi_profile_id")

    @property
    @pulumi.getter(name="zpnInspectionProfileId")
    def zpn_inspection_profile_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "zpn_inspection_profile_id")

    @property
    @pulumi.getter(name="zpnIsolationProfileId")
    def zpn_isolation_profile_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "zpn_isolation_profile_id")

