<gh_stars>0// *** 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 Pulumiverse.Fortios
{
    /// <summary>
    /// Configure DNS domain filter profiles.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname = new Fortios.DnsfilterProfile("trname", new()
    ///     {
    ///         BlockAction = "redirect",
    ///         BlockBotnet = "disable",
    ///         DomainFilter = new Fortios.Inputs.DnsfilterProfileDomainFilterArgs
    ///         {
    ///             DomainFilterTable = 0,
    ///         },
    ///         FtgdDns = new Fortios.Inputs.DnsfilterProfileFtgdDnsArgs
    ///         {
    ///             Filters = new[]
    ///             {
    ///                 new Fortios.Inputs.DnsfilterProfileFtgdDnsFilterArgs
    ///                 {
    ///                     Action = "block",
    ///                     Category = 26,
    ///                     Id = 1,
    ///                     Log = "enable",
    ///                 },
    ///                 new Fortios.Inputs.DnsfilterProfileFtgdDnsFilterArgs
    ///                 {
    ///                     Action = "block",
    ///                     Category = 61,
    ///                     Id = 2,
    ///                     Log = "enable",
    ///                 },
    ///                 new Fortios.Inputs.DnsfilterProfileFtgdDnsFilterArgs
    ///                 {
    ///                     Action = "block",
    ///                     Category = 86,
    ///                     Id = 3,
    ///                     Log = "enable",
    ///                 },
    ///                 new Fortios.Inputs.DnsfilterProfileFtgdDnsFilterArgs
    ///                 {
    ///                     Action = "block",
    ///                     Category = 88,
    ///                     Id = 4,
    ///                     Log = "enable",
    ///                 },
    ///             },
    ///         },
    ///         LogAllDomain = "disable",
    ///         RedirectPortal = "0.0.0.0",
    ///         SafeSearch = "disable",
    ///         SdnsDomainLog = "enable",
    ///         SdnsFtgdErrLog = "enable",
    ///         YoutubeRestrict = "strict",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Dnsfilter Profile can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/dnsfilterProfile:DnsfilterProfile labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/dnsfilterProfile:DnsfilterProfile labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/dnsfilterProfile:DnsfilterProfile")]
    public partial class DnsfilterProfile : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Action to take for blocked domains.
        /// </summary>
        [Output("blockAction")]
        public Output<string> BlockAction { get; private set; } = null!;

        /// <summary>
        /// Enable/disable blocking botnet C&amp;C DNS lookups. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("blockBotnet")]
        public Output<string> BlockBotnet { get; private set; } = null!;

        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        /// <summary>
        /// DNS translation settings. The structure of `dns_translation` block is documented below.
        /// </summary>
        [Output("dnsTranslations")]
        public Output<ImmutableArray<Outputs.DnsfilterProfileDnsTranslation>> DnsTranslations { get; private set; } = null!;

        /// <summary>
        /// Domain filter settings. The structure of `domain_filter` block is documented below.
        /// </summary>
        [Output("domainFilter")]
        public Output<Outputs.DnsfilterProfileDomainFilter> DomainFilter { get; private set; } = null!;

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Output("dynamicSortSubtable")]
        public Output<string?> DynamicSortSubtable { get; private set; } = null!;

        /// <summary>
        /// One or more external IP block lists. The structure of `external_ip_blocklist` block is documented below.
        /// </summary>
        [Output("externalIpBlocklists")]
        public Output<ImmutableArray<Outputs.DnsfilterProfileExternalIpBlocklist>> ExternalIpBlocklists { get; private set; } = null!;

        /// <summary>
        /// FortiGuard DNS Filter settings. The structure of `ftgd_dns` block is documented below.
        /// </summary>
        [Output("ftgdDns")]
        public Output<Outputs.DnsfilterProfileFtgdDns> FtgdDns { get; private set; } = null!;

        /// <summary>
        /// Enable/disable logging of all domains visited (detailed DNS logging). Valid values: `enable`, `disable`.
        /// </summary>
        [Output("logAllDomain")]
        public Output<string> LogAllDomain { get; private set; } = null!;

        /// <summary>
        /// Profile name.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// IP address of the SDNS redirect portal.
        /// </summary>
        [Output("redirectPortal")]
        public Output<string> RedirectPortal { get; private set; } = null!;

        /// <summary>
        /// IPv6 address of the SDNS redirect portal.
        /// </summary>
        [Output("redirectPortal6")]
        public Output<string> RedirectPortal6 { get; private set; } = null!;

        /// <summary>
        /// Enable/disable Google, Bing, and YouTube safe search. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("safeSearch")]
        public Output<string> SafeSearch { get; private set; } = null!;

        /// <summary>
        /// Enable/disable domain filtering and botnet domain logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("sdnsDomainLog")]
        public Output<string> SdnsDomainLog { get; private set; } = null!;

        /// <summary>
        /// Enable/disable FortiGuard SDNS rating error logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("sdnsFtgdErrLog")]
        public Output<string> SdnsFtgdErrLog { get; private set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;

        /// <summary>
        /// Set safe search for YouTube restriction level. Valid values: `strict`, `moderate`.
        /// </summary>
        [Output("youtubeRestrict")]
        public Output<string> YoutubeRestrict { get; private set; } = null!;


        /// <summary>
        /// Create a DnsfilterProfile resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public DnsfilterProfile(string name, DnsfilterProfileArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/dnsfilterProfile:DnsfilterProfile", name, args ?? new DnsfilterProfileArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DnsfilterProfile(string name, Input<string> id, DnsfilterProfileState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/dnsfilterProfile:DnsfilterProfile", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse/pulumi-fortios",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing DnsfilterProfile resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static DnsfilterProfile Get(string name, Input<string> id, DnsfilterProfileState? state = null, CustomResourceOptions? options = null)
        {
            return new DnsfilterProfile(name, id, state, options);
        }
    }

    public sealed class DnsfilterProfileArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Action to take for blocked domains.
        /// </summary>
        [Input("blockAction")]
        public Input<string>? BlockAction { get; set; }

        /// <summary>
        /// Enable/disable blocking botnet C&amp;C DNS lookups. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("blockBotnet")]
        public Input<string>? BlockBotnet { get; set; }

        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("dnsTranslations")]
        private InputList<Inputs.DnsfilterProfileDnsTranslationArgs>? _dnsTranslations;

        /// <summary>
        /// DNS translation settings. The structure of `dns_translation` block is documented below.
        /// </summary>
        public InputList<Inputs.DnsfilterProfileDnsTranslationArgs> DnsTranslations
        {
            get => _dnsTranslations ?? (_dnsTranslations = new InputList<Inputs.DnsfilterProfileDnsTranslationArgs>());
            set => _dnsTranslations = value;
        }

        /// <summary>
        /// Domain filter settings. The structure of `domain_filter` block is documented below.
        /// </summary>
        [Input("domainFilter")]
        public Input<Inputs.DnsfilterProfileDomainFilterArgs>? DomainFilter { get; set; }

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        [Input("externalIpBlocklists")]
        private InputList<Inputs.DnsfilterProfileExternalIpBlocklistArgs>? _externalIpBlocklists;

        /// <summary>
        /// One or more external IP block lists. The structure of `external_ip_blocklist` block is documented below.
        /// </summary>
        public InputList<Inputs.DnsfilterProfileExternalIpBlocklistArgs> ExternalIpBlocklists
        {
            get => _externalIpBlocklists ?? (_externalIpBlocklists = new InputList<Inputs.DnsfilterProfileExternalIpBlocklistArgs>());
            set => _externalIpBlocklists = value;
        }

        /// <summary>
        /// FortiGuard DNS Filter settings. The structure of `ftgd_dns` block is documented below.
        /// </summary>
        [Input("ftgdDns")]
        public Input<Inputs.DnsfilterProfileFtgdDnsArgs>? FtgdDns { get; set; }

        /// <summary>
        /// Enable/disable logging of all domains visited (detailed DNS logging). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("logAllDomain")]
        public Input<string>? LogAllDomain { get; set; }

        /// <summary>
        /// Profile name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// IP address of the SDNS redirect portal.
        /// </summary>
        [Input("redirectPortal")]
        public Input<string>? RedirectPortal { get; set; }

        /// <summary>
        /// IPv6 address of the SDNS redirect portal.
        /// </summary>
        [Input("redirectPortal6")]
        public Input<string>? RedirectPortal6 { get; set; }

        /// <summary>
        /// Enable/disable Google, Bing, and YouTube safe search. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("safeSearch")]
        public Input<string>? SafeSearch { get; set; }

        /// <summary>
        /// Enable/disable domain filtering and botnet domain logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("sdnsDomainLog")]
        public Input<string>? SdnsDomainLog { get; set; }

        /// <summary>
        /// Enable/disable FortiGuard SDNS rating error logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("sdnsFtgdErrLog")]
        public Input<string>? SdnsFtgdErrLog { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        /// <summary>
        /// Set safe search for YouTube restriction level. Valid values: `strict`, `moderate`.
        /// </summary>
        [Input("youtubeRestrict")]
        public Input<string>? YoutubeRestrict { get; set; }

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

    public sealed class DnsfilterProfileState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Action to take for blocked domains.
        /// </summary>
        [Input("blockAction")]
        public Input<string>? BlockAction { get; set; }

        /// <summary>
        /// Enable/disable blocking botnet C&amp;C DNS lookups. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("blockBotnet")]
        public Input<string>? BlockBotnet { get; set; }

        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("dnsTranslations")]
        private InputList<Inputs.DnsfilterProfileDnsTranslationGetArgs>? _dnsTranslations;

        /// <summary>
        /// DNS translation settings. The structure of `dns_translation` block is documented below.
        /// </summary>
        public InputList<Inputs.DnsfilterProfileDnsTranslationGetArgs> DnsTranslations
        {
            get => _dnsTranslations ?? (_dnsTranslations = new InputList<Inputs.DnsfilterProfileDnsTranslationGetArgs>());
            set => _dnsTranslations = value;
        }

        /// <summary>
        /// Domain filter settings. The structure of `domain_filter` block is documented below.
        /// </summary>
        [Input("domainFilter")]
        public Input<Inputs.DnsfilterProfileDomainFilterGetArgs>? DomainFilter { get; set; }

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        [Input("externalIpBlocklists")]
        private InputList<Inputs.DnsfilterProfileExternalIpBlocklistGetArgs>? _externalIpBlocklists;

        /// <summary>
        /// One or more external IP block lists. The structure of `external_ip_blocklist` block is documented below.
        /// </summary>
        public InputList<Inputs.DnsfilterProfileExternalIpBlocklistGetArgs> ExternalIpBlocklists
        {
            get => _externalIpBlocklists ?? (_externalIpBlocklists = new InputList<Inputs.DnsfilterProfileExternalIpBlocklistGetArgs>());
            set => _externalIpBlocklists = value;
        }

        /// <summary>
        /// FortiGuard DNS Filter settings. The structure of `ftgd_dns` block is documented below.
        /// </summary>
        [Input("ftgdDns")]
        public Input<Inputs.DnsfilterProfileFtgdDnsGetArgs>? FtgdDns { get; set; }

        /// <summary>
        /// Enable/disable logging of all domains visited (detailed DNS logging). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("logAllDomain")]
        public Input<string>? LogAllDomain { get; set; }

        /// <summary>
        /// Profile name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// IP address of the SDNS redirect portal.
        /// </summary>
        [Input("redirectPortal")]
        public Input<string>? RedirectPortal { get; set; }

        /// <summary>
        /// IPv6 address of the SDNS redirect portal.
        /// </summary>
        [Input("redirectPortal6")]
        public Input<string>? RedirectPortal6 { get; set; }

        /// <summary>
        /// Enable/disable Google, Bing, and YouTube safe search. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("safeSearch")]
        public Input<string>? SafeSearch { get; set; }

        /// <summary>
        /// Enable/disable domain filtering and botnet domain logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("sdnsDomainLog")]
        public Input<string>? SdnsDomainLog { get; set; }

        /// <summary>
        /// Enable/disable FortiGuard SDNS rating error logging. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("sdnsFtgdErrLog")]
        public Input<string>? SdnsFtgdErrLog { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        /// <summary>
        /// Set safe search for YouTube restriction level. Valid values: `strict`, `moderate`.
        /// </summary>
        [Input("youtubeRestrict")]
        public Input<string>? YoutubeRestrict { get; set; }

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