<filename>sdk/dotnet/SystemDdns.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;
using Pulumi;

namespace Pulumiverse.Fortios
{
    /// <summary>
    /// Configure DDNS.
    /// 
    /// ## 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.SystemDdns("trname", new()
    ///     {
    ///         BoundIp = "0.0.0.0",
    ///         ClearText = "disable",
    ///         DdnsAuth = "disable",
    ///         DdnsDomain = "www.s.com",
    ///         DdnsPassword = "ewewcd",
    ///         DdnsServer = "tzo.com",
    ///         DdnsServerIp = "0.0.0.0",
    ///         DdnsTtl = 300,
    ///         DdnsUsername = "sie2ae",
    ///         Ddnsid = 1,
    ///         MonitorInterfaces = new[]
    ///         {
    ///             new Fortios.Inputs.SystemDdnsMonitorInterfaceArgs
    ///             {
    ///                 InterfaceName = "port2",
    ///             },
    ///         },
    ///         SslCertificate = "Fortinet_Factory",
    ///         UpdateInterval = 300,
    ///         UsePublicIp = "disable",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// System Ddns can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemDdns:SystemDdns labelname {{ddnsid}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemDdns:SystemDdns labelname {{ddnsid}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/systemDdns:SystemDdns")]
    public partial class SystemDdns : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Address type of interface address in DDNS update. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Output("addrType")]
        public Output<string> AddrType { get; private set; } = null!;

        /// <summary>
        /// Bound IP address.
        /// </summary>
        [Output("boundIp")]
        public Output<string> BoundIp { get; private set; } = null!;

        /// <summary>
        /// Enable/disable use of clear text connections. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("clearText")]
        public Output<string> ClearText { get; private set; } = null!;

        /// <summary>
        /// Enable/disable TSIG authentication for your DDNS server. Valid values: `disable`, `tsig`.
        /// </summary>
        [Output("ddnsAuth")]
        public Output<string> DdnsAuth { get; private set; } = null!;

        /// <summary>
        /// Your fully qualified domain name (for example, yourname.DDNS.com).
        /// </summary>
        [Output("ddnsDomain")]
        public Output<string> DdnsDomain { get; private set; } = null!;

        /// <summary>
        /// DDNS update key (base 64 encoding).
        /// </summary>
        [Output("ddnsKey")]
        public Output<string> DdnsKey { get; private set; } = null!;

        /// <summary>
        /// DDNS update key name.
        /// </summary>
        [Output("ddnsKeyname")]
        public Output<string> DdnsKeyname { get; private set; } = null!;

        /// <summary>
        /// DDNS password.
        /// </summary>
        [Output("ddnsPassword")]
        public Output<string?> DdnsPassword { get; private set; } = null!;

        /// <summary>
        /// Select a DDNS service provider. Valid values: `dyndns.org`, `dyns.net`, `tzo.com`, `vavic.com`, `dipdns.net`, `now.net.cn`, `dhs.org`, `easydns.com`, `genericDDNS`, `FortiGuardDDNS`, `noip.com`.
        /// </summary>
        [Output("ddnsServer")]
        public Output<string> DdnsServer { get; private set; } = null!;

        /// <summary>
        /// Generic DDNS server IP/FQDN list. The structure of `ddns_server_addr` block is documented below.
        /// </summary>
        [Output("ddnsServerAddrs")]
        public Output<ImmutableArray<Outputs.SystemDdnsDdnsServerAddr>> DdnsServerAddrs { get; private set; } = null!;

        /// <summary>
        /// Generic DDNS server IP.
        /// </summary>
        [Output("ddnsServerIp")]
        public Output<string> DdnsServerIp { get; private set; } = null!;

        /// <summary>
        /// DDNS Serial Number.
        /// </summary>
        [Output("ddnsSn")]
        public Output<string> DdnsSn { get; private set; } = null!;

        /// <summary>
        /// Time-to-live for DDNS packets.
        /// </summary>
        [Output("ddnsTtl")]
        public Output<int> DdnsTtl { get; private set; } = null!;

        /// <summary>
        /// DDNS user name.
        /// </summary>
        [Output("ddnsUsername")]
        public Output<string> DdnsUsername { get; private set; } = null!;

        /// <summary>
        /// Zone of your domain name (for example, DDNS.com).
        /// </summary>
        [Output("ddnsZone")]
        public Output<string> DdnsZone { get; private set; } = null!;

        /// <summary>
        /// DDNS ID.
        /// </summary>
        [Output("ddnsid")]
        public Output<int> Ddnsid { 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>
        /// Monitored interface. The structure of `monitor_interface` block is documented below.
        /// </summary>
        [Output("monitorInterfaces")]
        public Output<ImmutableArray<Outputs.SystemDdnsMonitorInterface>> MonitorInterfaces { get; private set; } = null!;

        /// <summary>
        /// Address type of the DDNS server. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Output("serverType")]
        public Output<string> ServerType { get; private set; } = null!;

        /// <summary>
        /// Name of local certificate for SSL connections.
        /// </summary>
        [Output("sslCertificate")]
        public Output<string> SslCertificate { get; private set; } = null!;

        /// <summary>
        /// DDNS update interval (60 - 2592000 sec, default = 300).
        /// </summary>
        [Output("updateInterval")]
        public Output<int> UpdateInterval { get; private set; } = null!;

        /// <summary>
        /// Enable/disable use of public IP address. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("usePublicIp")]
        public Output<string> UsePublicIp { 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>
        /// Create a SystemDdns 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 SystemDdns(string name, SystemDdnsArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/systemDdns:SystemDdns", name, args ?? new SystemDdnsArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SystemDdns(string name, Input<string> id, SystemDdnsState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/systemDdns:SystemDdns", 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",
                AdditionalSecretOutputs =
                {
                    "ddnsKey",
                    "ddnsPassword",
                },
            };
            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 SystemDdns 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 SystemDdns Get(string name, Input<string> id, SystemDdnsState? state = null, CustomResourceOptions? options = null)
        {
            return new SystemDdns(name, id, state, options);
        }
    }

    public sealed class SystemDdnsArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Address type of interface address in DDNS update. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

        /// <summary>
        /// Bound IP address.
        /// </summary>
        [Input("boundIp")]
        public Input<string>? BoundIp { get; set; }

        /// <summary>
        /// Enable/disable use of clear text connections. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("clearText")]
        public Input<string>? ClearText { get; set; }

        /// <summary>
        /// Enable/disable TSIG authentication for your DDNS server. Valid values: `disable`, `tsig`.
        /// </summary>
        [Input("ddnsAuth")]
        public Input<string>? DdnsAuth { get; set; }

        /// <summary>
        /// Your fully qualified domain name (for example, yourname.DDNS.com).
        /// </summary>
        [Input("ddnsDomain")]
        public Input<string>? DdnsDomain { get; set; }

        [Input("ddnsKey")]
        private Input<string>? _ddnsKey;

        /// <summary>
        /// DDNS update key (base 64 encoding).
        /// </summary>
        public Input<string>? DdnsKey
        {
            get => _ddnsKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ddnsKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// DDNS update key name.
        /// </summary>
        [Input("ddnsKeyname")]
        public Input<string>? DdnsKeyname { get; set; }

        [Input("ddnsPassword")]
        private Input<string>? _ddnsPassword;

        /// <summary>
        /// DDNS password.
        /// </summary>
        public Input<string>? DdnsPassword
        {
            get => _ddnsPassword;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ddnsPassword = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Select a DDNS service provider. Valid values: `dyndns.org`, `dyns.net`, `tzo.com`, `vavic.com`, `dipdns.net`, `now.net.cn`, `dhs.org`, `easydns.com`, `genericDDNS`, `FortiGuardDDNS`, `noip.com`.
        /// </summary>
        [Input("ddnsServer", required: true)]
        public Input<string> DdnsServer { get; set; } = null!;

        [Input("ddnsServerAddrs")]
        private InputList<Inputs.SystemDdnsDdnsServerAddrArgs>? _ddnsServerAddrs;

        /// <summary>
        /// Generic DDNS server IP/FQDN list. The structure of `ddns_server_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDdnsDdnsServerAddrArgs> DdnsServerAddrs
        {
            get => _ddnsServerAddrs ?? (_ddnsServerAddrs = new InputList<Inputs.SystemDdnsDdnsServerAddrArgs>());
            set => _ddnsServerAddrs = value;
        }

        /// <summary>
        /// Generic DDNS server IP.
        /// </summary>
        [Input("ddnsServerIp")]
        public Input<string>? DdnsServerIp { get; set; }

        /// <summary>
        /// DDNS Serial Number.
        /// </summary>
        [Input("ddnsSn")]
        public Input<string>? DdnsSn { get; set; }

        /// <summary>
        /// Time-to-live for DDNS packets.
        /// </summary>
        [Input("ddnsTtl")]
        public Input<int>? DdnsTtl { get; set; }

        /// <summary>
        /// DDNS user name.
        /// </summary>
        [Input("ddnsUsername")]
        public Input<string>? DdnsUsername { get; set; }

        /// <summary>
        /// Zone of your domain name (for example, DDNS.com).
        /// </summary>
        [Input("ddnsZone")]
        public Input<string>? DdnsZone { get; set; }

        /// <summary>
        /// DDNS ID.
        /// </summary>
        [Input("ddnsid")]
        public Input<int>? Ddnsid { 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("monitorInterfaces", required: true)]
        private InputList<Inputs.SystemDdnsMonitorInterfaceArgs>? _monitorInterfaces;

        /// <summary>
        /// Monitored interface. The structure of `monitor_interface` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDdnsMonitorInterfaceArgs> MonitorInterfaces
        {
            get => _monitorInterfaces ?? (_monitorInterfaces = new InputList<Inputs.SystemDdnsMonitorInterfaceArgs>());
            set => _monitorInterfaces = value;
        }

        /// <summary>
        /// Address type of the DDNS server. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("serverType")]
        public Input<string>? ServerType { get; set; }

        /// <summary>
        /// Name of local certificate for SSL connections.
        /// </summary>
        [Input("sslCertificate")]
        public Input<string>? SslCertificate { get; set; }

        /// <summary>
        /// DDNS update interval (60 - 2592000 sec, default = 300).
        /// </summary>
        [Input("updateInterval")]
        public Input<int>? UpdateInterval { get; set; }

        /// <summary>
        /// Enable/disable use of public IP address. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("usePublicIp")]
        public Input<string>? UsePublicIp { 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; }

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

    public sealed class SystemDdnsState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Address type of interface address in DDNS update. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

        /// <summary>
        /// Bound IP address.
        /// </summary>
        [Input("boundIp")]
        public Input<string>? BoundIp { get; set; }

        /// <summary>
        /// Enable/disable use of clear text connections. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("clearText")]
        public Input<string>? ClearText { get; set; }

        /// <summary>
        /// Enable/disable TSIG authentication for your DDNS server. Valid values: `disable`, `tsig`.
        /// </summary>
        [Input("ddnsAuth")]
        public Input<string>? DdnsAuth { get; set; }

        /// <summary>
        /// Your fully qualified domain name (for example, yourname.DDNS.com).
        /// </summary>
        [Input("ddnsDomain")]
        public Input<string>? DdnsDomain { get; set; }

        [Input("ddnsKey")]
        private Input<string>? _ddnsKey;

        /// <summary>
        /// DDNS update key (base 64 encoding).
        /// </summary>
        public Input<string>? DdnsKey
        {
            get => _ddnsKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ddnsKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// DDNS update key name.
        /// </summary>
        [Input("ddnsKeyname")]
        public Input<string>? DdnsKeyname { get; set; }

        [Input("ddnsPassword")]
        private Input<string>? _ddnsPassword;

        /// <summary>
        /// DDNS password.
        /// </summary>
        public Input<string>? DdnsPassword
        {
            get => _ddnsPassword;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ddnsPassword = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Select a DDNS service provider. Valid values: `dyndns.org`, `dyns.net`, `tzo.com`, `vavic.com`, `dipdns.net`, `now.net.cn`, `dhs.org`, `easydns.com`, `genericDDNS`, `FortiGuardDDNS`, `noip.com`.
        /// </summary>
        [Input("ddnsServer")]
        public Input<string>? DdnsServer { get; set; }

        [Input("ddnsServerAddrs")]
        private InputList<Inputs.SystemDdnsDdnsServerAddrGetArgs>? _ddnsServerAddrs;

        /// <summary>
        /// Generic DDNS server IP/FQDN list. The structure of `ddns_server_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDdnsDdnsServerAddrGetArgs> DdnsServerAddrs
        {
            get => _ddnsServerAddrs ?? (_ddnsServerAddrs = new InputList<Inputs.SystemDdnsDdnsServerAddrGetArgs>());
            set => _ddnsServerAddrs = value;
        }

        /// <summary>
        /// Generic DDNS server IP.
        /// </summary>
        [Input("ddnsServerIp")]
        public Input<string>? DdnsServerIp { get; set; }

        /// <summary>
        /// DDNS Serial Number.
        /// </summary>
        [Input("ddnsSn")]
        public Input<string>? DdnsSn { get; set; }

        /// <summary>
        /// Time-to-live for DDNS packets.
        /// </summary>
        [Input("ddnsTtl")]
        public Input<int>? DdnsTtl { get; set; }

        /// <summary>
        /// DDNS user name.
        /// </summary>
        [Input("ddnsUsername")]
        public Input<string>? DdnsUsername { get; set; }

        /// <summary>
        /// Zone of your domain name (for example, DDNS.com).
        /// </summary>
        [Input("ddnsZone")]
        public Input<string>? DdnsZone { get; set; }

        /// <summary>
        /// DDNS ID.
        /// </summary>
        [Input("ddnsid")]
        public Input<int>? Ddnsid { 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("monitorInterfaces")]
        private InputList<Inputs.SystemDdnsMonitorInterfaceGetArgs>? _monitorInterfaces;

        /// <summary>
        /// Monitored interface. The structure of `monitor_interface` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemDdnsMonitorInterfaceGetArgs> MonitorInterfaces
        {
            get => _monitorInterfaces ?? (_monitorInterfaces = new InputList<Inputs.SystemDdnsMonitorInterfaceGetArgs>());
            set => _monitorInterfaces = value;
        }

        /// <summary>
        /// Address type of the DDNS server. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("serverType")]
        public Input<string>? ServerType { get; set; }

        /// <summary>
        /// Name of local certificate for SSL connections.
        /// </summary>
        [Input("sslCertificate")]
        public Input<string>? SslCertificate { get; set; }

        /// <summary>
        /// DDNS update interval (60 - 2592000 sec, default = 300).
        /// </summary>
        [Input("updateInterval")]
        public Input<int>? UpdateInterval { get; set; }

        /// <summary>
        /// Enable/disable use of public IP address. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("usePublicIp")]
        public Input<string>? UsePublicIp { 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; }

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