// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace zscaler.PulumiPackage.Zpa.PolicyType
{
    public static class GetPolicyType
    {
        /// <summary>
        /// Use the **zpa_policy_type** data source to get information about an a ``policy_set_id`` and ``policy_type``. This data source is required when creating:
        /// 
        /// 1. Access policy Rules
        /// 2. Access policy timeout rules
        /// 3. Access policy forwarding rules
        /// 4. Access policy inspection rules
        /// 
        /// &gt; **NOTE** The parameters ``policy_set_id`` is required in all circumstances and is exported when checking for the policy_type parameter. The policy_type value is used for differentiating the policy types, in the request endpoint. The supported values are:
        /// 
        /// * ``ACCESS_POLICY/GLOBAL_POLICY``
        /// * ``TIMEOUT_POLICY/REAUTH_POLICY``
        /// * ``BYPASS_POLICY/CLIENT_FORWARDING_POLICY``
        /// * ``INSPECTION_POLICY``
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var accessPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "ACCESS_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeAccessPolicy"] = accessPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var globalPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "GLOBAL_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeAccessPolicy"] = globalPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var timeoutPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "TIMEOUT_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeTimeoutPolicy"] = timeoutPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var reauthPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "REAUTH_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeReauthPolicy"] = reauthPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var clientForwardingPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "CLIENT_FORWARDING_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeClientForwardingPolicy"] = clientForwardingPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var inspectionPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "INSPECTION_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeInspectionPolicy"] = inspectionPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetPolicyTypeResult> InvokeAsync(GetPolicyTypeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetPolicyTypeResult>("zpa:PolicyType/getPolicyType:getPolicyType", args ?? new GetPolicyTypeArgs(), options.WithDefaults());

        /// <summary>
        /// Use the **zpa_policy_type** data source to get information about an a ``policy_set_id`` and ``policy_type``. This data source is required when creating:
        /// 
        /// 1. Access policy Rules
        /// 2. Access policy timeout rules
        /// 3. Access policy forwarding rules
        /// 4. Access policy inspection rules
        /// 
        /// &gt; **NOTE** The parameters ``policy_set_id`` is required in all circumstances and is exported when checking for the policy_type parameter. The policy_type value is used for differentiating the policy types, in the request endpoint. The supported values are:
        /// 
        /// * ``ACCESS_POLICY/GLOBAL_POLICY``
        /// * ``TIMEOUT_POLICY/REAUTH_POLICY``
        /// * ``BYPASS_POLICY/CLIENT_FORWARDING_POLICY``
        /// * ``INSPECTION_POLICY``
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var accessPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "ACCESS_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeAccessPolicy"] = accessPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var globalPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "GLOBAL_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeAccessPolicy"] = globalPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var timeoutPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "TIMEOUT_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeTimeoutPolicy"] = timeoutPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var reauthPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "REAUTH_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeReauthPolicy"] = reauthPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var clientForwardingPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "CLIENT_FORWARDING_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeClientForwardingPolicy"] = clientForwardingPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var inspectionPolicy = Zpa.PolicyType.GetPolicyType.Invoke(new()
        ///     {
        ///         PolicyType = "INSPECTION_POLICY",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaPolicyTypeInspectionPolicy"] = inspectionPolicy.Apply(getPolicyTypeResult =&gt; getPolicyTypeResult.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetPolicyTypeResult> Invoke(GetPolicyTypeInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetPolicyTypeResult>("zpa:PolicyType/getPolicyType:getPolicyType", args ?? new GetPolicyTypeInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetPolicyTypeArgs : global::Pulumi.InvokeArgs
    {
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The value for differentiating the policy types.
        /// </summary>
        [Input("policyType")]
        public string? PolicyType { get; set; }

        public GetPolicyTypeArgs()
        {
        }
        public static new GetPolicyTypeArgs Empty => new GetPolicyTypeArgs();
    }

    public sealed class GetPolicyTypeInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The value for differentiating the policy types.
        /// </summary>
        [Input("policyType")]
        public Input<string>? PolicyType { get; set; }

        public GetPolicyTypeInvokeArgs()
        {
        }
        public static new GetPolicyTypeInvokeArgs Empty => new GetPolicyTypeInvokeArgs();
    }


    [OutputType]
    public sealed class GetPolicyTypeResult
    {
        public readonly string CreationTime;
        public readonly string Description;
        public readonly bool Enabled;
        public readonly string? Id;
        public readonly string ModifiedBy;
        public readonly string ModifiedTime;
        public readonly string Name;
        public readonly string PolicyType;
        public readonly ImmutableArray<Outputs.GetPolicyTypeRuleResult> Rules;
        public readonly bool Sorted;

        [OutputConstructor]
        private GetPolicyTypeResult(
            string creationTime,

            string description,

            bool enabled,

            string? id,

            string modifiedBy,

            string modifiedTime,

            string name,

            string policyType,

            ImmutableArray<Outputs.GetPolicyTypeRuleResult> rules,

            bool sorted)
        {
            CreationTime = creationTime;
            Description = description;
            Enabled = enabled;
            Id = id;
            ModifiedBy = modifiedBy;
            ModifiedTime = modifiedTime;
            Name = name;
            PolicyType = policyType;
            Rules = rules;
            Sorted = sorted;
        }
    }
}
