<filename>sdk/dotnet/WebproxyForwardserver.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 forward-server addresses.
    /// 
    /// ## 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.WebproxyForwardserver("trname", new()
    ///     {
    ///         AddrType = "fqdn",
    ///         Healthcheck = "disable",
    ///         Ip = "0.0.0.0",
    ///         Monitor = "http://www.google.com",
    ///         Port = 3128,
    ///         ServerDownOption = "block",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// WebProxy ForwardServer can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/webproxyForwardserver:WebproxyForwardserver labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/webproxyForwardserver:WebproxyForwardserver labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/webproxyForwardserver:WebproxyForwardserver")]
    public partial class WebproxyForwardserver : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Address type of the forwarding proxy server: IP or FQDN. Valid values: `ip`, `fqdn`.
        /// </summary>
        [Output("addrType")]
        public Output<string> AddrType { get; private set; } = null!;

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

        /// <summary>
        /// Forward server Fully Qualified Domain Name (FQDN).
        /// </summary>
        [Output("fqdn")]
        public Output<string> Fqdn { get; private set; } = null!;

        /// <summary>
        /// Enable/disable forward server health checking. Attempts to connect through the remote forwarding server to a destination to verify that the forwarding server is operating normally. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("healthcheck")]
        public Output<string> Healthcheck { get; private set; } = null!;

        /// <summary>
        /// Forward proxy server IP address.
        /// </summary>
        [Output("ip")]
        public Output<string> Ip { get; private set; } = null!;

        /// <summary>
        /// URL for forward server health check monitoring (default = http://www.google.com).
        /// </summary>
        [Output("monitor")]
        public Output<string> Monitor { get; private set; } = null!;

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

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

        /// <summary>
        /// Port number that the forwarding server expects to receive HTTP sessions on (1 - 65535, default = 3128).
        /// </summary>
        [Output("port")]
        public Output<int> Port { get; private set; } = null!;

        /// <summary>
        /// Action to take when the forward server is found to be down: block sessions until the server is back up or pass sessions to their destination. Valid values: `block`, `pass`.
        /// </summary>
        [Output("serverDownOption")]
        public Output<string> ServerDownOption { get; private set; } = null!;

        /// <summary>
        /// HTTP authentication user name.
        /// </summary>
        [Output("username")]
        public Output<string> Username { 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 WebproxyForwardserver 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 WebproxyForwardserver(string name, WebproxyForwardserverArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/webproxyForwardserver:WebproxyForwardserver", name, args ?? new WebproxyForwardserverArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class WebproxyForwardserverArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Address type of the forwarding proxy server: IP or FQDN. Valid values: `ip`, `fqdn`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

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

        /// <summary>
        /// Forward server Fully Qualified Domain Name (FQDN).
        /// </summary>
        [Input("fqdn")]
        public Input<string>? Fqdn { get; set; }

        /// <summary>
        /// Enable/disable forward server health checking. Attempts to connect through the remote forwarding server to a destination to verify that the forwarding server is operating normally. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("healthcheck")]
        public Input<string>? Healthcheck { get; set; }

        /// <summary>
        /// Forward proxy server IP address.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        /// <summary>
        /// URL for forward server health check monitoring (default = http://www.google.com).
        /// </summary>
        [Input("monitor")]
        public Input<string>? Monitor { get; set; }

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

        [Input("password")]
        private Input<string>? _password;

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

        /// <summary>
        /// Port number that the forwarding server expects to receive HTTP sessions on (1 - 65535, default = 3128).
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Action to take when the forward server is found to be down: block sessions until the server is back up or pass sessions to their destination. Valid values: `block`, `pass`.
        /// </summary>
        [Input("serverDownOption")]
        public Input<string>? ServerDownOption { get; set; }

        /// <summary>
        /// HTTP authentication user name.
        /// </summary>
        [Input("username")]
        public Input<string>? Username { 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 WebproxyForwardserverArgs()
        {
        }
        public static new WebproxyForwardserverArgs Empty => new WebproxyForwardserverArgs();
    }

    public sealed class WebproxyForwardserverState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Address type of the forwarding proxy server: IP or FQDN. Valid values: `ip`, `fqdn`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

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

        /// <summary>
        /// Forward server Fully Qualified Domain Name (FQDN).
        /// </summary>
        [Input("fqdn")]
        public Input<string>? Fqdn { get; set; }

        /// <summary>
        /// Enable/disable forward server health checking. Attempts to connect through the remote forwarding server to a destination to verify that the forwarding server is operating normally. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("healthcheck")]
        public Input<string>? Healthcheck { get; set; }

        /// <summary>
        /// Forward proxy server IP address.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        /// <summary>
        /// URL for forward server health check monitoring (default = http://www.google.com).
        /// </summary>
        [Input("monitor")]
        public Input<string>? Monitor { get; set; }

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

        [Input("password")]
        private Input<string>? _password;

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

        /// <summary>
        /// Port number that the forwarding server expects to receive HTTP sessions on (1 - 65535, default = 3128).
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Action to take when the forward server is found to be down: block sessions until the server is back up or pass sessions to their destination. Valid values: `block`, `pass`.
        /// </summary>
        [Input("serverDownOption")]
        public Input<string>? ServerDownOption { get; set; }

        /// <summary>
        /// HTTP authentication user name.
        /// </summary>
        [Input("username")]
        public Input<string>? Username { 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 WebproxyForwardserverState()
        {
        }
        public static new WebproxyForwardserverState Empty => new WebproxyForwardserverState();
    }
}
