<reponame>pulumiverse/pulumi-fortios// *** 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 databases.
    /// 
    /// ## 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.SystemDnsdatabase("trname", new()
    ///     {
    ///         Authoritative = "enable",
    ///         Contact = "hostmaster",
    ///         DnsEntries = new[]
    ///         {
    ///             new Fortios.Inputs.SystemDnsdatabaseDnsEntryArgs
    ///             {
    ///                 Hostname = "sghsgh.com",
    ///                 Ttl = 3,
    ///                 Type = "MX",
    ///             },
    ///         },
    ///         Domain = "s.com",
    ///         Forwarder = "\"9.9.9.9\" \"3.3.3.3\" ",
    ///         IpMaster = "0.0.0.0",
    ///         PrimaryName = "dns",
    ///         SourceIp = "0.0.0.0",
    ///         Status = "enable",
    ///         Ttl = 86400,
    ///         Type = "master",
    ///         View = "shadow",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// System DnsDatabase can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemDnsdatabase:SystemDnsdatabase labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemDnsdatabase:SystemDnsdatabase labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/systemDnsdatabase:SystemDnsdatabase")]
    public partial class SystemDnsdatabase : global::Pulumi.CustomResource
    {
        /// <summary>
        /// DNS zone transfer IP address list.
        /// </summary>
        [Output("allowTransfer")]
        public Output<string> AllowTransfer { get; private set; } = null!;

        /// <summary>
        /// Enable/disable authoritative zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("authoritative")]
        public Output<string> Authoritative { get; private set; } = null!;

        /// <summary>
        /// Email address of the administrator for this zone.
        /// You can specify only the username (e.g. admin) or full email address (e.g. anpch@example.com)
        /// When using a simple username, the domain of the email will be this zone.
        /// </summary>
        [Output("contact")]
        public Output<string> Contact { get; private set; } = null!;

        /// <summary>
        /// DNS entry. The structure of `dns_entry` block is documented below.
        /// </summary>
        [Output("dnsEntries")]
        public Output<ImmutableArray<Outputs.SystemDnsdatabaseDnsEntry>> DnsEntries { get; private set; } = null!;

        /// <summary>
        /// Domain name.
        /// </summary>
        [Output("domain")]
        public Output<string> Domain { 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>
        /// DNS zone forwarder IP address list.
        /// </summary>
        [Output("forwarder")]
        public Output<string> Forwarder { get; private set; } = null!;

        /// <summary>
        /// IP address of master DNS server. Entries in this master DNS server and imported into the DNS zone.
        /// </summary>
        [Output("ipMaster")]
        public Output<string> IpMaster { get; private set; } = null!;

        /// <summary>
        /// IP address of primary DNS server. Entries in this primary DNS server and imported into the DNS zone.
        /// </summary>
        [Output("ipPrimary")]
        public Output<string> IpPrimary { get; private set; } = null!;

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

        /// <summary>
        /// Domain name of the default DNS server for this zone.
        /// </summary>
        [Output("primaryName")]
        public Output<string> PrimaryName { get; private set; } = null!;

        /// <summary>
        /// Maximum number of resource records (10 - 65536, 0 means infinite).
        /// </summary>
        [Output("rrMax")]
        public Output<int> RrMax { get; private set; } = null!;

        /// <summary>
        /// Source IP for forwarding to DNS server.
        /// </summary>
        [Output("sourceIp")]
        public Output<string> SourceIp { get; private set; } = null!;

        /// <summary>
        /// Enable/disable this DNS zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Default time-to-live value for the entries of this DNS zone (0 - 2147483647 sec, default = 86400).
        /// </summary>
        [Output("ttl")]
        public Output<int> Ttl { get; private set; } = null!;

        /// <summary>
        /// Zone type (master to manage entries directly, slave to import entries from other zones).
        /// </summary>
        [Output("type")]
        public Output<string> Type { 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>
        /// Zone view (public to serve public clients, shadow to serve internal clients).
        /// </summary>
        [Output("view")]
        public Output<string> View { get; private set; } = null!;


        /// <summary>
        /// Create a SystemDnsdatabase 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 SystemDnsdatabase(string name, SystemDnsdatabaseArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/systemDnsdatabase:SystemDnsdatabase", name, args ?? new SystemDnsdatabaseArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SystemDnsdatabase(string name, Input<string> id, SystemDnsdatabaseState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/systemDnsdatabase:SystemDnsdatabase", 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 SystemDnsdatabase 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 SystemDnsdatabase Get(string name, Input<string> id, SystemDnsdatabaseState? state = null, CustomResourceOptions? options = null)
        {
            return new SystemDnsdatabase(name, id, state, options);
        }
    }

    public sealed class SystemDnsdatabaseArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// DNS zone transfer IP address list.
        /// </summary>
        [Input("allowTransfer")]
        public Input<string>? AllowTransfer { get; set; }

        /// <summary>
        /// Enable/disable authoritative zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("authoritative", required: true)]
        public Input<string> Authoritative { get; set; } = null!;

        /// <summary>
        /// Email address of the administrator for this zone.
        /// You can specify only the username (e.g. admin) or full email address (e.g. anpch@example.com)
        /// When using a simple username, the domain of the email will be this zone.
        /// </summary>
        [Input("contact")]
        public Input<string>? Contact { get; set; }

        [Input("dnsEntries")]
        private InputList<Inputs.SystemDnsdatabaseDnsEntryArgs>? _dnsEntries;

        /// <summary>
        /// DNS entry. The structure of `dns_entry` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDnsdatabaseDnsEntryArgs> DnsEntries
        {
            get => _dnsEntries ?? (_dnsEntries = new InputList<Inputs.SystemDnsdatabaseDnsEntryArgs>());
            set => _dnsEntries = value;
        }

        /// <summary>
        /// Domain name.
        /// </summary>
        [Input("domain", required: true)]
        public Input<string> Domain { get; 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>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        /// <summary>
        /// DNS zone forwarder IP address list.
        /// </summary>
        [Input("forwarder")]
        public Input<string>? Forwarder { get; set; }

        /// <summary>
        /// IP address of master DNS server. Entries in this master DNS server and imported into the DNS zone.
        /// </summary>
        [Input("ipMaster")]
        public Input<string>? IpMaster { get; set; }

        /// <summary>
        /// IP address of primary DNS server. Entries in this primary DNS server and imported into the DNS zone.
        /// </summary>
        [Input("ipPrimary")]
        public Input<string>? IpPrimary { get; set; }

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

        /// <summary>
        /// Domain name of the default DNS server for this zone.
        /// </summary>
        [Input("primaryName")]
        public Input<string>? PrimaryName { get; set; }

        /// <summary>
        /// Maximum number of resource records (10 - 65536, 0 means infinite).
        /// </summary>
        [Input("rrMax")]
        public Input<int>? RrMax { get; set; }

        /// <summary>
        /// Source IP for forwarding to DNS server.
        /// </summary>
        [Input("sourceIp")]
        public Input<string>? SourceIp { get; set; }

        /// <summary>
        /// Enable/disable this DNS zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Default time-to-live value for the entries of this DNS zone (0 - 2147483647 sec, default = 86400).
        /// </summary>
        [Input("ttl", required: true)]
        public Input<int> Ttl { get; set; } = null!;

        /// <summary>
        /// Zone type (master to manage entries directly, slave to import entries from other zones).
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; 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>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        /// <summary>
        /// Zone view (public to serve public clients, shadow to serve internal clients).
        /// </summary>
        [Input("view", required: true)]
        public Input<string> View { get; set; } = null!;

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

    public sealed class SystemDnsdatabaseState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// DNS zone transfer IP address list.
        /// </summary>
        [Input("allowTransfer")]
        public Input<string>? AllowTransfer { get; set; }

        /// <summary>
        /// Enable/disable authoritative zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("authoritative")]
        public Input<string>? Authoritative { get; set; }

        /// <summary>
        /// Email address of the administrator for this zone.
        /// You can specify only the username (e.g. admin) or full email address (e.g. anpch@example.com)
        /// When using a simple username, the domain of the email will be this zone.
        /// </summary>
        [Input("contact")]
        public Input<string>? Contact { get; set; }

        [Input("dnsEntries")]
        private InputList<Inputs.SystemDnsdatabaseDnsEntryGetArgs>? _dnsEntries;

        /// <summary>
        /// DNS entry. The structure of `dns_entry` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDnsdatabaseDnsEntryGetArgs> DnsEntries
        {
            get => _dnsEntries ?? (_dnsEntries = new InputList<Inputs.SystemDnsdatabaseDnsEntryGetArgs>());
            set => _dnsEntries = value;
        }

        /// <summary>
        /// Domain name.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { 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; }

        /// <summary>
        /// DNS zone forwarder IP address list.
        /// </summary>
        [Input("forwarder")]
        public Input<string>? Forwarder { get; set; }

        /// <summary>
        /// IP address of master DNS server. Entries in this master DNS server and imported into the DNS zone.
        /// </summary>
        [Input("ipMaster")]
        public Input<string>? IpMaster { get; set; }

        /// <summary>
        /// IP address of primary DNS server. Entries in this primary DNS server and imported into the DNS zone.
        /// </summary>
        [Input("ipPrimary")]
        public Input<string>? IpPrimary { get; set; }

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

        /// <summary>
        /// Domain name of the default DNS server for this zone.
        /// </summary>
        [Input("primaryName")]
        public Input<string>? PrimaryName { get; set; }

        /// <summary>
        /// Maximum number of resource records (10 - 65536, 0 means infinite).
        /// </summary>
        [Input("rrMax")]
        public Input<int>? RrMax { get; set; }

        /// <summary>
        /// Source IP for forwarding to DNS server.
        /// </summary>
        [Input("sourceIp")]
        public Input<string>? SourceIp { get; set; }

        /// <summary>
        /// Enable/disable this DNS zone. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Default time-to-live value for the entries of this DNS zone (0 - 2147483647 sec, default = 86400).
        /// </summary>
        [Input("ttl")]
        public Input<int>? Ttl { get; set; }

        /// <summary>
        /// Zone type (master to manage entries directly, slave to import entries from other zones).
        /// </summary>
        [Input("type")]
        public Input<string>? Type { 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>
        /// Zone view (public to serve public clients, shadow to serve internal clients).
        /// </summary>
        [Input("view")]
        public Input<string>? View { get; set; }

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