<filename>sdk/dotnet/Ip/Dns.cs// *** 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;

namespace Pulumi.Routeros.Ip
{
    /// <summary>
    /// ## # routeros.Ip.Dns (Resource)
    /// 
    /// ***
    /// 
    /// #### This is an alias for backwards compatibility between plugin versions.
    /// Please see documentation for routeros.Ip.IpDns
    /// </summary>
    [RouterosResourceType("routeros:Ip/dns:Dns")]
    public partial class Dns : global::Pulumi.CustomResource
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___id_")]
        public Output<int?> ___id_ { get; private set; } = null!;

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___path_")]
        public Output<string?> ___path_ { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to allow network requests.
        /// </summary>
        [Output("allowRemoteRequests")]
        public Output<bool?> AllowRemoteRequests { get; private set; } = null!;

        /// <summary>
        /// Maximum time-to-live for cache records. In other words, cache records will expire unconditionally after cache-max-ttl
        /// time. Shorter TTL received from DNS servers are respected. *Default: 1w*
        /// </summary>
        [Output("cacheMaxTtl")]
        public Output<string> CacheMaxTtl { get; private set; } = null!;

        /// <summary>
        /// Specifies the size of DNS cache in KiB (64..4294967295). *Default: 2048*
        /// </summary>
        [Output("cacheSize")]
        public Output<int> CacheSize { get; private set; } = null!;

        /// <summary>
        /// Shows the currently used cache size in KiB.
        /// </summary>
        [Output("cacheUsed")]
        public Output<int> CacheUsed { get; private set; } = null!;

        /// <summary>
        /// Specifies how many DoH concurrent queries are allowed.
        /// </summary>
        [Output("dohMaxConcurrentQueries")]
        public Output<int> DohMaxConcurrentQueries { get; private set; } = null!;

        /// <summary>
        /// Specifies how many concurrent connections to the DoH server are allowed.
        /// </summary>
        [Output("dohMaxServerConnections")]
        public Output<int> DohMaxServerConnections { get; private set; } = null!;

        /// <summary>
        /// Specifies how long to wait for query response from the DoH server.
        /// </summary>
        [Output("dohTimeout")]
        public Output<string> DohTimeout { get; private set; } = null!;

        /// <summary>
        /// List of dynamically added DNS server from different services, for example, DHCP.
        /// </summary>
        [Output("dynamicServers")]
        public Output<string> DynamicServers { get; private set; } = null!;

        /// <summary>
        /// Specifies how much concurrent queries are allowed. *Default: 100*
        /// </summary>
        [Output("maxConcurrentQueries")]
        public Output<int> MaxConcurrentQueries { get; private set; } = null!;

        /// <summary>
        /// Specifies how much concurrent TCP sessions are allowed. *Default: 20*
        /// </summary>
        [Output("maxConcurrentTcpSessions")]
        public Output<int> MaxConcurrentTcpSessions { get; private set; } = null!;

        /// <summary>
        /// Maximum size of allowed UDP packet. *Default: 4096*
        /// </summary>
        [Output("maxUdpPacketSize")]
        public Output<int> MaxUdpPacketSize { get; private set; } = null!;

        /// <summary>
        /// Specifies how long to wait for query response from one server. Time can be specified in milliseconds. *Default: 2s*
        /// </summary>
        [Output("queryServerTimeout")]
        public Output<string> QueryServerTimeout { get; private set; } = null!;

        /// <summary>
        /// Specifies how long to wait for query response in total. Note that this setting must be configured taking into account
        /// query_server_timeout and number of used DNS server. Time can be specified in milliseconds. *Default: 10s*
        /// </summary>
        [Output("queryTotalTimeout")]
        public Output<string> QueryTotalTimeout { get; private set; } = null!;

        /// <summary>
        /// List of DNS server IPv4/IPv6 addresses.
        /// </summary>
        [Output("servers")]
        public Output<string?> Servers { get; private set; } = null!;

        /// <summary>
        /// DNS over HTTPS (DoH) server URL. &gt; Mikrotik strongly suggest not use third-party download links for certificate
        /// fetching. Use the Certificate Authority's own website. &gt; RouterOS prioritize DoH over DNS server if both are configured
        /// on the device.
        /// </summary>
        [Output("useDohServer")]
        public Output<string?> UseDohServer { get; private set; } = null!;

        /// <summary>
        /// DoH certificate verification. [See docs](https://wiki.mikrotik.com/wiki/Manual:IP/DNS#DNS_over_HTTPS).
        /// </summary>
        [Output("verifyDohCert")]
        public Output<bool?> VerifyDohCert { get; private set; } = null!;


        /// <summary>
        /// Create a Dns 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 Dns(string name, DnsArgs? args = null, CustomResourceOptions? options = null)
            : base("routeros:Ip/dns:Dns", name, args ?? new DnsArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Dns(string name, Input<string> id, DnsState? state = null, CustomResourceOptions? options = null)
            : base("routeros:Ip/dns:Dns", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 Dns 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 Dns Get(string name, Input<string> id, DnsState? state = null, CustomResourceOptions? options = null)
        {
            return new Dns(name, id, state, options);
        }
    }

    public sealed class DnsArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        /// <summary>
        /// Specifies whether to allow network requests.
        /// </summary>
        [Input("allowRemoteRequests")]
        public Input<bool>? AllowRemoteRequests { get; set; }

        /// <summary>
        /// Maximum time-to-live for cache records. In other words, cache records will expire unconditionally after cache-max-ttl
        /// time. Shorter TTL received from DNS servers are respected. *Default: 1w*
        /// </summary>
        [Input("cacheMaxTtl")]
        public Input<string>? CacheMaxTtl { get; set; }

        /// <summary>
        /// Specifies the size of DNS cache in KiB (64..4294967295). *Default: 2048*
        /// </summary>
        [Input("cacheSize")]
        public Input<int>? CacheSize { get; set; }

        /// <summary>
        /// Specifies how many DoH concurrent queries are allowed.
        /// </summary>
        [Input("dohMaxConcurrentQueries")]
        public Input<int>? DohMaxConcurrentQueries { get; set; }

        /// <summary>
        /// Specifies how many concurrent connections to the DoH server are allowed.
        /// </summary>
        [Input("dohMaxServerConnections")]
        public Input<int>? DohMaxServerConnections { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response from the DoH server.
        /// </summary>
        [Input("dohTimeout")]
        public Input<string>? DohTimeout { get; set; }

        /// <summary>
        /// Specifies how much concurrent queries are allowed. *Default: 100*
        /// </summary>
        [Input("maxConcurrentQueries")]
        public Input<int>? MaxConcurrentQueries { get; set; }

        /// <summary>
        /// Specifies how much concurrent TCP sessions are allowed. *Default: 20*
        /// </summary>
        [Input("maxConcurrentTcpSessions")]
        public Input<int>? MaxConcurrentTcpSessions { get; set; }

        /// <summary>
        /// Maximum size of allowed UDP packet. *Default: 4096*
        /// </summary>
        [Input("maxUdpPacketSize")]
        public Input<int>? MaxUdpPacketSize { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response from one server. Time can be specified in milliseconds. *Default: 2s*
        /// </summary>
        [Input("queryServerTimeout")]
        public Input<string>? QueryServerTimeout { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response in total. Note that this setting must be configured taking into account
        /// query_server_timeout and number of used DNS server. Time can be specified in milliseconds. *Default: 10s*
        /// </summary>
        [Input("queryTotalTimeout")]
        public Input<string>? QueryTotalTimeout { get; set; }

        /// <summary>
        /// List of DNS server IPv4/IPv6 addresses.
        /// </summary>
        [Input("servers")]
        public Input<string>? Servers { get; set; }

        /// <summary>
        /// DNS over HTTPS (DoH) server URL. &gt; Mikrotik strongly suggest not use third-party download links for certificate
        /// fetching. Use the Certificate Authority's own website. &gt; RouterOS prioritize DoH over DNS server if both are configured
        /// on the device.
        /// </summary>
        [Input("useDohServer")]
        public Input<string>? UseDohServer { get; set; }

        /// <summary>
        /// DoH certificate verification. [See docs](https://wiki.mikrotik.com/wiki/Manual:IP/DNS#DNS_over_HTTPS).
        /// </summary>
        [Input("verifyDohCert")]
        public Input<bool>? VerifyDohCert { get; set; }

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

    public sealed class DnsState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        /// <summary>
        /// Specifies whether to allow network requests.
        /// </summary>
        [Input("allowRemoteRequests")]
        public Input<bool>? AllowRemoteRequests { get; set; }

        /// <summary>
        /// Maximum time-to-live for cache records. In other words, cache records will expire unconditionally after cache-max-ttl
        /// time. Shorter TTL received from DNS servers are respected. *Default: 1w*
        /// </summary>
        [Input("cacheMaxTtl")]
        public Input<string>? CacheMaxTtl { get; set; }

        /// <summary>
        /// Specifies the size of DNS cache in KiB (64..4294967295). *Default: 2048*
        /// </summary>
        [Input("cacheSize")]
        public Input<int>? CacheSize { get; set; }

        /// <summary>
        /// Shows the currently used cache size in KiB.
        /// </summary>
        [Input("cacheUsed")]
        public Input<int>? CacheUsed { get; set; }

        /// <summary>
        /// Specifies how many DoH concurrent queries are allowed.
        /// </summary>
        [Input("dohMaxConcurrentQueries")]
        public Input<int>? DohMaxConcurrentQueries { get; set; }

        /// <summary>
        /// Specifies how many concurrent connections to the DoH server are allowed.
        /// </summary>
        [Input("dohMaxServerConnections")]
        public Input<int>? DohMaxServerConnections { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response from the DoH server.
        /// </summary>
        [Input("dohTimeout")]
        public Input<string>? DohTimeout { get; set; }

        /// <summary>
        /// List of dynamically added DNS server from different services, for example, DHCP.
        /// </summary>
        [Input("dynamicServers")]
        public Input<string>? DynamicServers { get; set; }

        /// <summary>
        /// Specifies how much concurrent queries are allowed. *Default: 100*
        /// </summary>
        [Input("maxConcurrentQueries")]
        public Input<int>? MaxConcurrentQueries { get; set; }

        /// <summary>
        /// Specifies how much concurrent TCP sessions are allowed. *Default: 20*
        /// </summary>
        [Input("maxConcurrentTcpSessions")]
        public Input<int>? MaxConcurrentTcpSessions { get; set; }

        /// <summary>
        /// Maximum size of allowed UDP packet. *Default: 4096*
        /// </summary>
        [Input("maxUdpPacketSize")]
        public Input<int>? MaxUdpPacketSize { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response from one server. Time can be specified in milliseconds. *Default: 2s*
        /// </summary>
        [Input("queryServerTimeout")]
        public Input<string>? QueryServerTimeout { get; set; }

        /// <summary>
        /// Specifies how long to wait for query response in total. Note that this setting must be configured taking into account
        /// query_server_timeout and number of used DNS server. Time can be specified in milliseconds. *Default: 10s*
        /// </summary>
        [Input("queryTotalTimeout")]
        public Input<string>? QueryTotalTimeout { get; set; }

        /// <summary>
        /// List of DNS server IPv4/IPv6 addresses.
        /// </summary>
        [Input("servers")]
        public Input<string>? Servers { get; set; }

        /// <summary>
        /// DNS over HTTPS (DoH) server URL. &gt; Mikrotik strongly suggest not use third-party download links for certificate
        /// fetching. Use the Certificate Authority's own website. &gt; RouterOS prioritize DoH over DNS server if both are configured
        /// on the device.
        /// </summary>
        [Input("useDohServer")]
        public Input<string>? UseDohServer { get; set; }

        /// <summary>
        /// DoH certificate verification. [See docs](https://wiki.mikrotik.com/wiki/Manual:IP/DNS#DNS_over_HTTPS).
        /// </summary>
        [Input("verifyDohCert")]
        public Input<bool>? VerifyDohCert { get; set; }

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