<filename>sdk/dotnet/SystemSdwan.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 redundant internet connections using SD-WAN (formerly virtual WAN link). Applies to FortiOS Version `&gt;= 6.4.1`.
    /// 
    /// ## Import
    /// 
    /// System Sdwan can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemSdwan:SystemSdwan labelname SystemSdwan
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemSdwan:SystemSdwan labelname SystemSdwan
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/systemSdwan:SystemSdwan")]
    public partial class SystemSdwan : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Maximum number of interface members a packet is duplicated in the SD-WAN zone (2 - 4, default = 2; if set to 3, the original packet plus 2 more copies are created).
        /// </summary>
        [Output("duplicationMaxNum")]
        public Output<int> DuplicationMaxNum { get; private set; } = null!;

        /// <summary>
        /// Create SD-WAN duplication rule. The structure of `duplication` block is documented below.
        /// </summary>
        [Output("duplications")]
        public Output<ImmutableArray<Outputs.SystemSdwanDuplication>> Duplications { 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>
        /// Physical interfaces that will be alerted. The structure of `fail_alert_interfaces` block is documented below.
        /// </summary>
        [Output("failAlertInterfaces")]
        public Output<ImmutableArray<Outputs.SystemSdwanFailAlertInterface>> FailAlertInterfaces { get; private set; } = null!;

        /// <summary>
        /// Enable/disable SD-WAN Internet connection status checking (failure detection). Valid values: `enable`, `disable`.
        /// </summary>
        [Output("failDetect")]
        public Output<string> FailDetect { get; private set; } = null!;

        /// <summary>
        /// SD-WAN status checking or health checking. Identify a server on the Internet and determine how SD-WAN verifies that the FortiGate can communicate with it. The structure of `health_check` block is documented below.
        /// </summary>
        [Output("healthChecks")]
        public Output<ImmutableArray<Outputs.SystemSdwanHealthCheck>> HealthChecks { get; private set; } = null!;

        /// <summary>
        /// Algorithm or mode to use for load balancing Internet traffic to SD-WAN members. Valid values: `source-ip-based`, `weight-based`, `usage-based`, `source-dest-ip-based`, `measured-volume-based`.
        /// </summary>
        [Output("loadBalanceMode")]
        public Output<string> LoadBalanceMode { get; private set; } = null!;

        /// <summary>
        /// FortiGate interfaces added to the SD-WAN. The structure of `members` block is documented below.
        /// </summary>
        [Output("members")]
        public Output<ImmutableArray<Outputs.SystemSdwanMember>> Members { get; private set; } = null!;

        /// <summary>
        /// Waiting period in seconds when switching from the primary neighbor to the secondary neighbor from the neighbor start. (0 - 10000000, default = 0).
        /// </summary>
        [Output("neighborHoldBootTime")]
        public Output<int> NeighborHoldBootTime { get; private set; } = null!;

        /// <summary>
        /// Enable/disable hold switching from the secondary neighbor to the primary neighbor. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("neighborHoldDown")]
        public Output<string> NeighborHoldDown { get; private set; } = null!;

        /// <summary>
        /// Waiting period in seconds when switching from the secondary neighbor to the primary neighbor when hold-down is disabled. (0 - 10000000, default = 0).
        /// </summary>
        [Output("neighborHoldDownTime")]
        public Output<int> NeighborHoldDownTime { get; private set; } = null!;

        /// <summary>
        /// Create SD-WAN neighbor from BGP neighbor table to control route advertisements according to SLA status. The structure of `neighbor` block is documented below.
        /// </summary>
        [Output("neighbors")]
        public Output<ImmutableArray<Outputs.SystemSdwanNeighbor>> Neighbors { get; private set; } = null!;

        /// <summary>
        /// Create SD-WAN rules (also called services) to control how sessions are distributed to interfaces in the SD-WAN. The structure of `service` block is documented below.
        /// </summary>
        [Output("services")]
        public Output<ImmutableArray<Outputs.SystemSdwanService>> Services { get; private set; } = null!;

        /// <summary>
        /// Enable/disable bypass routing when speedtest on a SD-WAN member. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("speedtestBypassRouting")]
        public Output<string> SpeedtestBypassRouting { get; private set; } = null!;

        /// <summary>
        /// Enable/disable SD-WAN. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { 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>
        /// Configure SD-WAN zones. The structure of `zone` block is documented below.
        /// </summary>
        [Output("zones")]
        public Output<ImmutableArray<Outputs.SystemSdwanZone>> Zones { get; private set; } = null!;


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

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

    public sealed class SystemSdwanArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Maximum number of interface members a packet is duplicated in the SD-WAN zone (2 - 4, default = 2; if set to 3, the original packet plus 2 more copies are created).
        /// </summary>
        [Input("duplicationMaxNum")]
        public Input<int>? DuplicationMaxNum { get; set; }

        [Input("duplications")]
        private InputList<Inputs.SystemSdwanDuplicationArgs>? _duplications;

        /// <summary>
        /// Create SD-WAN duplication rule. The structure of `duplication` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanDuplicationArgs> Duplications
        {
            get => _duplications ?? (_duplications = new InputList<Inputs.SystemSdwanDuplicationArgs>());
            set => _duplications = value;
        }

        /// <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("failAlertInterfaces")]
        private InputList<Inputs.SystemSdwanFailAlertInterfaceArgs>? _failAlertInterfaces;

        /// <summary>
        /// Physical interfaces that will be alerted. The structure of `fail_alert_interfaces` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanFailAlertInterfaceArgs> FailAlertInterfaces
        {
            get => _failAlertInterfaces ?? (_failAlertInterfaces = new InputList<Inputs.SystemSdwanFailAlertInterfaceArgs>());
            set => _failAlertInterfaces = value;
        }

        /// <summary>
        /// Enable/disable SD-WAN Internet connection status checking (failure detection). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("failDetect")]
        public Input<string>? FailDetect { get; set; }

        [Input("healthChecks")]
        private InputList<Inputs.SystemSdwanHealthCheckArgs>? _healthChecks;

        /// <summary>
        /// SD-WAN status checking or health checking. Identify a server on the Internet and determine how SD-WAN verifies that the FortiGate can communicate with it. The structure of `health_check` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanHealthCheckArgs> HealthChecks
        {
            get => _healthChecks ?? (_healthChecks = new InputList<Inputs.SystemSdwanHealthCheckArgs>());
            set => _healthChecks = value;
        }

        /// <summary>
        /// Algorithm or mode to use for load balancing Internet traffic to SD-WAN members. Valid values: `source-ip-based`, `weight-based`, `usage-based`, `source-dest-ip-based`, `measured-volume-based`.
        /// </summary>
        [Input("loadBalanceMode")]
        public Input<string>? LoadBalanceMode { get; set; }

        [Input("members")]
        private InputList<Inputs.SystemSdwanMemberArgs>? _members;

        /// <summary>
        /// FortiGate interfaces added to the SD-WAN. The structure of `members` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanMemberArgs> Members
        {
            get => _members ?? (_members = new InputList<Inputs.SystemSdwanMemberArgs>());
            set => _members = value;
        }

        /// <summary>
        /// Waiting period in seconds when switching from the primary neighbor to the secondary neighbor from the neighbor start. (0 - 10000000, default = 0).
        /// </summary>
        [Input("neighborHoldBootTime")]
        public Input<int>? NeighborHoldBootTime { get; set; }

        /// <summary>
        /// Enable/disable hold switching from the secondary neighbor to the primary neighbor. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("neighborHoldDown")]
        public Input<string>? NeighborHoldDown { get; set; }

        /// <summary>
        /// Waiting period in seconds when switching from the secondary neighbor to the primary neighbor when hold-down is disabled. (0 - 10000000, default = 0).
        /// </summary>
        [Input("neighborHoldDownTime")]
        public Input<int>? NeighborHoldDownTime { get; set; }

        [Input("neighbors")]
        private InputList<Inputs.SystemSdwanNeighborArgs>? _neighbors;

        /// <summary>
        /// Create SD-WAN neighbor from BGP neighbor table to control route advertisements according to SLA status. The structure of `neighbor` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanNeighborArgs> Neighbors
        {
            get => _neighbors ?? (_neighbors = new InputList<Inputs.SystemSdwanNeighborArgs>());
            set => _neighbors = value;
        }

        [Input("services")]
        private InputList<Inputs.SystemSdwanServiceArgs>? _services;

        /// <summary>
        /// Create SD-WAN rules (also called services) to control how sessions are distributed to interfaces in the SD-WAN. The structure of `service` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanServiceArgs> Services
        {
            get => _services ?? (_services = new InputList<Inputs.SystemSdwanServiceArgs>());
            set => _services = value;
        }

        /// <summary>
        /// Enable/disable bypass routing when speedtest on a SD-WAN member. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("speedtestBypassRouting")]
        public Input<string>? SpeedtestBypassRouting { get; set; }

        /// <summary>
        /// Enable/disable SD-WAN. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { 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; }

        [Input("zones")]
        private InputList<Inputs.SystemSdwanZoneArgs>? _zones;

        /// <summary>
        /// Configure SD-WAN zones. The structure of `zone` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanZoneArgs> Zones
        {
            get => _zones ?? (_zones = new InputList<Inputs.SystemSdwanZoneArgs>());
            set => _zones = value;
        }

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

    public sealed class SystemSdwanState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Maximum number of interface members a packet is duplicated in the SD-WAN zone (2 - 4, default = 2; if set to 3, the original packet plus 2 more copies are created).
        /// </summary>
        [Input("duplicationMaxNum")]
        public Input<int>? DuplicationMaxNum { get; set; }

        [Input("duplications")]
        private InputList<Inputs.SystemSdwanDuplicationGetArgs>? _duplications;

        /// <summary>
        /// Create SD-WAN duplication rule. The structure of `duplication` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanDuplicationGetArgs> Duplications
        {
            get => _duplications ?? (_duplications = new InputList<Inputs.SystemSdwanDuplicationGetArgs>());
            set => _duplications = value;
        }

        /// <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("failAlertInterfaces")]
        private InputList<Inputs.SystemSdwanFailAlertInterfaceGetArgs>? _failAlertInterfaces;

        /// <summary>
        /// Physical interfaces that will be alerted. The structure of `fail_alert_interfaces` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanFailAlertInterfaceGetArgs> FailAlertInterfaces
        {
            get => _failAlertInterfaces ?? (_failAlertInterfaces = new InputList<Inputs.SystemSdwanFailAlertInterfaceGetArgs>());
            set => _failAlertInterfaces = value;
        }

        /// <summary>
        /// Enable/disable SD-WAN Internet connection status checking (failure detection). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("failDetect")]
        public Input<string>? FailDetect { get; set; }

        [Input("healthChecks")]
        private InputList<Inputs.SystemSdwanHealthCheckGetArgs>? _healthChecks;

        /// <summary>
        /// SD-WAN status checking or health checking. Identify a server on the Internet and determine how SD-WAN verifies that the FortiGate can communicate with it. The structure of `health_check` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanHealthCheckGetArgs> HealthChecks
        {
            get => _healthChecks ?? (_healthChecks = new InputList<Inputs.SystemSdwanHealthCheckGetArgs>());
            set => _healthChecks = value;
        }

        /// <summary>
        /// Algorithm or mode to use for load balancing Internet traffic to SD-WAN members. Valid values: `source-ip-based`, `weight-based`, `usage-based`, `source-dest-ip-based`, `measured-volume-based`.
        /// </summary>
        [Input("loadBalanceMode")]
        public Input<string>? LoadBalanceMode { get; set; }

        [Input("members")]
        private InputList<Inputs.SystemSdwanMemberGetArgs>? _members;

        /// <summary>
        /// FortiGate interfaces added to the SD-WAN. The structure of `members` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanMemberGetArgs> Members
        {
            get => _members ?? (_members = new InputList<Inputs.SystemSdwanMemberGetArgs>());
            set => _members = value;
        }

        /// <summary>
        /// Waiting period in seconds when switching from the primary neighbor to the secondary neighbor from the neighbor start. (0 - 10000000, default = 0).
        /// </summary>
        [Input("neighborHoldBootTime")]
        public Input<int>? NeighborHoldBootTime { get; set; }

        /// <summary>
        /// Enable/disable hold switching from the secondary neighbor to the primary neighbor. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("neighborHoldDown")]
        public Input<string>? NeighborHoldDown { get; set; }

        /// <summary>
        /// Waiting period in seconds when switching from the secondary neighbor to the primary neighbor when hold-down is disabled. (0 - 10000000, default = 0).
        /// </summary>
        [Input("neighborHoldDownTime")]
        public Input<int>? NeighborHoldDownTime { get; set; }

        [Input("neighbors")]
        private InputList<Inputs.SystemSdwanNeighborGetArgs>? _neighbors;

        /// <summary>
        /// Create SD-WAN neighbor from BGP neighbor table to control route advertisements according to SLA status. The structure of `neighbor` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanNeighborGetArgs> Neighbors
        {
            get => _neighbors ?? (_neighbors = new InputList<Inputs.SystemSdwanNeighborGetArgs>());
            set => _neighbors = value;
        }

        [Input("services")]
        private InputList<Inputs.SystemSdwanServiceGetArgs>? _services;

        /// <summary>
        /// Create SD-WAN rules (also called services) to control how sessions are distributed to interfaces in the SD-WAN. The structure of `service` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanServiceGetArgs> Services
        {
            get => _services ?? (_services = new InputList<Inputs.SystemSdwanServiceGetArgs>());
            set => _services = value;
        }

        /// <summary>
        /// Enable/disable bypass routing when speedtest on a SD-WAN member. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("speedtestBypassRouting")]
        public Input<string>? SpeedtestBypassRouting { get; set; }

        /// <summary>
        /// Enable/disable SD-WAN. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { 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; }

        [Input("zones")]
        private InputList<Inputs.SystemSdwanZoneGetArgs>? _zones;

        /// <summary>
        /// Configure SD-WAN zones. The structure of `zone` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemSdwanZoneGetArgs> Zones
        {
            get => _zones ?? (_zones = new InputList<Inputs.SystemSdwanZoneGetArgs>());
            set => _zones = value;
        }

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