// *** 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.Zia.Firewall
{
    public static class GetFirewallFilteringRule
    {
        /// <summary>
        /// Use the **zia_firewall_filtering_rule** data source to get information about a cloud firewall rule available in the Zscaler Internet Access cloud firewall.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zia = Pulumi.Zia;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zia.Firewall.GetFirewallFilteringRule.Invoke(new()
        ///     {
        ///         Name = "Office 365 One Click Rule",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetFirewallFilteringRuleResult> InvokeAsync(GetFirewallFilteringRuleArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetFirewallFilteringRuleResult>("zia:Firewall/getFirewallFilteringRule:getFirewallFilteringRule", args ?? new GetFirewallFilteringRuleArgs(), options.WithDefaults());

        /// <summary>
        /// Use the **zia_firewall_filtering_rule** data source to get information about a cloud firewall rule available in the Zscaler Internet Access cloud firewall.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zia = Pulumi.Zia;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zia.Firewall.GetFirewallFilteringRule.Invoke(new()
        ///     {
        ///         Name = "Office 365 One Click Rule",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetFirewallFilteringRuleResult> Invoke(GetFirewallFilteringRuleInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetFirewallFilteringRuleResult>("zia:Firewall/getFirewallFilteringRule:getFirewallFilteringRule", args ?? new GetFirewallFilteringRuleInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetFirewallFilteringRuleArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// (Optional) Choose the action of the service when packets match the rule. The following actions are accepted: `ALLOW`, `BLOCK_DROP`, `BLOCK_RESET`, `BLOCK_ICMP`, `EVAL_NWAPP`
        /// </summary>
        [Input("action")]
        public string? Action { get; set; }

        /// <summary>
        /// (Optional) Enter additional notes or information. The description cannot exceed 10,240 characters.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// Unique identifier for the Firewall Filtering policy rule
        /// </summary>
        [Input("id")]
        public int? Id { get; set; }

        /// <summary>
        /// (Number)
        /// </summary>
        [Input("lastModifiedTime")]
        public int? LastModifiedTime { get; set; }

        /// <summary>
        /// Name of the Firewall Filtering policy rule
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// (Optional) An enabled rule is actively enforced. A disabled rule is not actively enforced but does not lose its place in the Rule Order. The service skips it and moves to the next rule.
        /// </summary>
        [Input("state")]
        public string? State { get; set; }

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

    public sealed class GetFirewallFilteringRuleInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// (Optional) Choose the action of the service when packets match the rule. The following actions are accepted: `ALLOW`, `BLOCK_DROP`, `BLOCK_RESET`, `BLOCK_ICMP`, `EVAL_NWAPP`
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// (Optional) Enter additional notes or information. The description cannot exceed 10,240 characters.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Unique identifier for the Firewall Filtering policy rule
        /// </summary>
        [Input("id")]
        public Input<int>? Id { get; set; }

        /// <summary>
        /// (Number)
        /// </summary>
        [Input("lastModifiedTime")]
        public Input<int>? LastModifiedTime { get; set; }

        /// <summary>
        /// Name of the Firewall Filtering policy rule
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// (Optional) An enabled rule is actively enforced. A disabled rule is not actively enforced but does not lose its place in the Rule Order. The service skips it and moves to the next rule.
        /// </summary>
        [Input("state")]
        public Input<string>? State { get; set; }

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


    [OutputType]
    public sealed class GetFirewallFilteringRuleResult
    {
        /// <summary>
        /// (String)
        /// </summary>
        public readonly string AccessControl;
        /// <summary>
        /// (Optional) Choose the action of the service when packets match the rule. The following actions are accepted: `ALLOW`, `BLOCK_DROP`, `BLOCK_RESET`, `BLOCK_ICMP`, `EVAL_NWAPP`
        /// </summary>
        public readonly string? Action;
        /// <summary>
        /// Application service groups on which this rule is applied
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleAppServiceGroupResult> AppServiceGroups;
        /// <summary>
        /// Application services on which this rule is applied
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleAppServiceResult> AppServices;
        /// <summary>
        /// (Boolean)
        /// </summary>
        public readonly bool DefaultRule;
        /// <summary>
        /// (Optional) Apply to any number of departments When not used it implies `Any` to apply the rule to all departments.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleDepartmentResult> Departments;
        /// <summary>
        /// (Optional) Enter additional notes or information. The description cannot exceed 10,240 characters.
        /// </summary>
        public readonly string? Description;
        /// <summary>
        /// ** - (Optional) -  IP addresses and fully qualified domain names (FQDNs), if the domain has multiple destination IP addresses or if its IP addresses may change. For IP addresses, you can enter individual IP addresses, subnets, or address ranges. If adding multiple items, hit Enter after each entry.
        /// </summary>
        public readonly ImmutableArray<string> DestAddresses;
        /// <summary>
        /// ** - (Optional) Identify destinations based on the location of a server, select Any to apply the rule to all countries or select the countries to which you want to control traffic.
        /// </summary>
        public readonly ImmutableArray<string> DestCountries;
        /// <summary>
        /// ** - (Optional) identify destinations based on the URL category of the domain, select Any to apply the rule to all categories or select the specific categories you want to control.
        /// </summary>
        public readonly ImmutableArray<string> DestIpCategories;
        /// <summary>
        /// ** - (Optional) Any number of destination IP address groups that you want to control with this rule.
        /// </summary>
        public readonly ImmutableArray<string> DestIpGroups;
        /// <summary>
        /// (Boolean)
        /// </summary>
        public readonly bool EnableFullLogging;
        /// <summary>
        /// (Optional) You can manually select up to `8` groups. When not used it implies `Any` to apply the rule to all groups.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleGroupResult> Groups;
        /// <summary>
        /// (Number) The ID of this resource.
        /// </summary>
        public readonly int Id;
        /// <summary>
        /// Labels that are applicable to the rule.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleLabelResult> Labels;
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleLastModifiedByResult> LastModifiedBies;
        /// <summary>
        /// (Number)
        /// </summary>
        public readonly int? LastModifiedTime;
        /// <summary>
        /// (Optional) You can manually select up to `32` location groups. When not used it implies `Any` to apply the rule to all location groups.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleLocationGroupResult> LocationGroups;
        /// <summary>
        /// (Optional) You can manually select up to `8` locations. When not used it implies `Any` to apply the rule to all groups.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleLocationResult> Locations;
        /// <summary>
        /// (String) The configured name of the entity
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// (Optional) Any number of application groups that you want to control with this rule. The service provides predefined applications that you can group, but not modify
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleNwApplicationGroupResult> NwApplicationGroups;
        /// <summary>
        /// (Optional) When not used it applies the rule to all applications. The service provides predefined applications, which you can group, but not modify.
        /// </summary>
        public readonly ImmutableArray<string> NwApplications;
        /// <summary>
        /// (Optional) Any number of predefined or custom network service groups to which the rule applies.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleNwServiceGroupResult> NwServiceGroups;
        /// <summary>
        /// (Optional) When not used it applies the rule to all network services or you can select specific network services. The Zscaler firewall has predefined services and you can configure up to `1,024` additional custom services.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleNwServiceResult> NwServices;
        /// <summary>
        /// (Required) Policy rules are evaluated in ascending numerical order (Rule 1 before Rule 2, and so on), and the Rule Order reflects this rule's place in the order.
        /// </summary>
        public readonly int Order;
        /// <summary>
        /// (Boolean)
        /// </summary>
        public readonly bool Predefined;
        /// <summary>
        /// (Optional) By default, the admin ranking is disabled. To use this feature, you must enable admin rank. The default value is `7`.
        /// </summary>
        public readonly int Rank;
        /// <summary>
        /// (Optional) Any number of source IP address groups that you want to control with this rule.
        /// </summary>
        public readonly ImmutableArray<string> SrcIpGroups;
        /// <summary>
        /// (Optional) You can enter individual IP addresses, subnets, or address ranges.
        /// </summary>
        public readonly ImmutableArray<string> SrcIps;
        /// <summary>
        /// (Optional) An enabled rule is actively enforced. A disabled rule is not actively enforced but does not lose its place in the Rule Order. The service skips it and moves to the next rule.
        /// </summary>
        public readonly string? State;
        /// <summary>
        /// (Optional) You can manually select up to `2` time intervals. When not used it implies `always` to apply the rule to all time intervals.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleTimeWindowResult> TimeWindows;
        /// <summary>
        /// (Optional) You can manually select up to `4` general and/or special users. When not used it implies `Any` to apply the rule to all users.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetFirewallFilteringRuleUserResult> Users;

        [OutputConstructor]
        private GetFirewallFilteringRuleResult(
            string accessControl,

            string? action,

            ImmutableArray<Outputs.GetFirewallFilteringRuleAppServiceGroupResult> appServiceGroups,

            ImmutableArray<Outputs.GetFirewallFilteringRuleAppServiceResult> appServices,

            bool defaultRule,

            ImmutableArray<Outputs.GetFirewallFilteringRuleDepartmentResult> departments,

            string? description,

            ImmutableArray<string> destAddresses,

            ImmutableArray<string> destCountries,

            ImmutableArray<string> destIpCategories,

            ImmutableArray<string> destIpGroups,

            bool enableFullLogging,

            ImmutableArray<Outputs.GetFirewallFilteringRuleGroupResult> groups,

            int id,

            ImmutableArray<Outputs.GetFirewallFilteringRuleLabelResult> labels,

            ImmutableArray<Outputs.GetFirewallFilteringRuleLastModifiedByResult> lastModifiedBies,

            int? lastModifiedTime,

            ImmutableArray<Outputs.GetFirewallFilteringRuleLocationGroupResult> locationGroups,

            ImmutableArray<Outputs.GetFirewallFilteringRuleLocationResult> locations,

            string name,

            ImmutableArray<Outputs.GetFirewallFilteringRuleNwApplicationGroupResult> nwApplicationGroups,

            ImmutableArray<string> nwApplications,

            ImmutableArray<Outputs.GetFirewallFilteringRuleNwServiceGroupResult> nwServiceGroups,

            ImmutableArray<Outputs.GetFirewallFilteringRuleNwServiceResult> nwServices,

            int order,

            bool predefined,

            int rank,

            ImmutableArray<string> srcIpGroups,

            ImmutableArray<string> srcIps,

            string? state,

            ImmutableArray<Outputs.GetFirewallFilteringRuleTimeWindowResult> timeWindows,

            ImmutableArray<Outputs.GetFirewallFilteringRuleUserResult> users)
        {
            AccessControl = accessControl;
            Action = action;
            AppServiceGroups = appServiceGroups;
            AppServices = appServices;
            DefaultRule = defaultRule;
            Departments = departments;
            Description = description;
            DestAddresses = destAddresses;
            DestCountries = destCountries;
            DestIpCategories = destIpCategories;
            DestIpGroups = destIpGroups;
            EnableFullLogging = enableFullLogging;
            Groups = groups;
            Id = id;
            Labels = labels;
            LastModifiedBies = lastModifiedBies;
            LastModifiedTime = lastModifiedTime;
            LocationGroups = locationGroups;
            Locations = locations;
            Name = name;
            NwApplicationGroups = nwApplicationGroups;
            NwApplications = nwApplications;
            NwServiceGroups = nwServiceGroups;
            NwServices = nwServices;
            Order = order;
            Predefined = predefined;
            Rank = rank;
            SrcIpGroups = srcIpGroups;
            SrcIps = srcIps;
            State = state;
            TimeWindows = timeWindows;
            Users = users;
        }
    }
}
