// *** 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 FortiGate Session Life Support Protocol (FGSP) session synchronization. Applies to FortiOS Version `&lt;= 7.2.0`.
    /// 
    /// ## 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.SystemClustersync("trname", new()
    ///     {
    ///         HbInterval = 3,
    ///         HbLostThreshold = 3,
    ///         Peerip = "1.1.1.1",
    ///         Peervd = "root",
    ///         SlaveAddIkeRoutes = "enable",
    ///         SyncId = 1,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// System ClusterSync can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemClustersync:SystemClustersync labelname {{sync_id}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemClustersync:SystemClustersync labelname {{sync_id}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/systemClustersync:SystemClustersync")]
    public partial class SystemClustersync : global::Pulumi.CustomResource
    {
        /// <summary>
        /// List of interfaces to be turned down before session synchronization is complete. The structure of `down_intfs_before_sess_sync` block is documented below.
        /// </summary>
        [Output("downIntfsBeforeSessSyncs")]
        public Output<ImmutableArray<Outputs.SystemClustersyncDownIntfsBeforeSessSync>> DownIntfsBeforeSessSyncs { 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>
        /// Heartbeat interval (1 - 10 sec).
        /// </summary>
        [Output("hbInterval")]
        public Output<int> HbInterval { get; private set; } = null!;

        /// <summary>
        /// Lost heartbeat threshold (1 - 10).
        /// </summary>
        [Output("hbLostThreshold")]
        public Output<int> HbLostThreshold { get; private set; } = null!;

        /// <summary>
        /// IKE heartbeat interval (1 - 60 secs).
        /// </summary>
        [Output("ikeHeartbeatInterval")]
        public Output<int> IkeHeartbeatInterval { get; private set; } = null!;

        /// <summary>
        /// Enable/disable IKE HA monitor. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("ikeMonitor")]
        public Output<string> IkeMonitor { get; private set; } = null!;

        /// <summary>
        /// IKE HA monitor interval (10 - 300 secs).
        /// </summary>
        [Output("ikeMonitorInterval")]
        public Output<int> IkeMonitorInterval { get; private set; } = null!;

        /// <summary>
        /// Enable/disable IPsec tunnel synchronization. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("ipsecTunnelSync")]
        public Output<string> IpsecTunnelSync { get; private set; } = null!;

        /// <summary>
        /// IP address of the interface on the peer unit that is used for the session synchronization link.
        /// </summary>
        [Output("peerip")]
        public Output<string> Peerip { get; private set; } = null!;

        /// <summary>
        /// VDOM that contains the session synchronization link interface on the peer unit. Usually both peers would have the same peervd.
        /// </summary>
        [Output("peervd")]
        public Output<string> Peervd { get; private set; } = null!;

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("secondaryAddIpsecRoutes")]
        public Output<string> SecondaryAddIpsecRoutes { get; private set; } = null!;

        /// <summary>
        /// Add one or more filters if you only want to synchronize some sessions. Use the filter to configure the types of sessions to synchronize. The structure of `session_sync_filter` block is documented below.
        /// </summary>
        [Output("sessionSyncFilter")]
        public Output<Outputs.SystemClustersyncSessionSyncFilter> SessionSyncFilter { get; private set; } = null!;

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("slaveAddIkeRoutes")]
        public Output<string> SlaveAddIkeRoutes { get; private set; } = null!;

        /// <summary>
        /// Sync ID.
        /// </summary>
        [Output("syncId")]
        public Output<int> SyncId { get; private set; } = null!;

        /// <summary>
        /// Sessions from these VDOMs are synchronized using this session synchronization configuration. The structure of `syncvd` block is documented below.
        /// </summary>
        [Output("syncvds")]
        public Output<ImmutableArray<Outputs.SystemClustersyncSyncvd>> Syncvds { 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 SystemClustersync 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 SystemClustersync(string name, SystemClustersyncArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/systemClustersync:SystemClustersync", name, args ?? new SystemClustersyncArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class SystemClustersyncArgs : global::Pulumi.ResourceArgs
    {
        [Input("downIntfsBeforeSessSyncs")]
        private InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncArgs>? _downIntfsBeforeSessSyncs;

        /// <summary>
        /// List of interfaces to be turned down before session synchronization is complete. The structure of `down_intfs_before_sess_sync` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncArgs> DownIntfsBeforeSessSyncs
        {
            get => _downIntfsBeforeSessSyncs ?? (_downIntfsBeforeSessSyncs = new InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncArgs>());
            set => _downIntfsBeforeSessSyncs = 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; }

        /// <summary>
        /// Heartbeat interval (1 - 10 sec).
        /// </summary>
        [Input("hbInterval")]
        public Input<int>? HbInterval { get; set; }

        /// <summary>
        /// Lost heartbeat threshold (1 - 10).
        /// </summary>
        [Input("hbLostThreshold")]
        public Input<int>? HbLostThreshold { get; set; }

        /// <summary>
        /// IKE heartbeat interval (1 - 60 secs).
        /// </summary>
        [Input("ikeHeartbeatInterval")]
        public Input<int>? IkeHeartbeatInterval { get; set; }

        /// <summary>
        /// Enable/disable IKE HA monitor. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("ikeMonitor")]
        public Input<string>? IkeMonitor { get; set; }

        /// <summary>
        /// IKE HA monitor interval (10 - 300 secs).
        /// </summary>
        [Input("ikeMonitorInterval")]
        public Input<int>? IkeMonitorInterval { get; set; }

        /// <summary>
        /// Enable/disable IPsec tunnel synchronization. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("ipsecTunnelSync")]
        public Input<string>? IpsecTunnelSync { get; set; }

        /// <summary>
        /// IP address of the interface on the peer unit that is used for the session synchronization link.
        /// </summary>
        [Input("peerip")]
        public Input<string>? Peerip { get; set; }

        /// <summary>
        /// VDOM that contains the session synchronization link interface on the peer unit. Usually both peers would have the same peervd.
        /// </summary>
        [Input("peervd")]
        public Input<string>? Peervd { get; set; }

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("secondaryAddIpsecRoutes")]
        public Input<string>? SecondaryAddIpsecRoutes { get; set; }

        /// <summary>
        /// Add one or more filters if you only want to synchronize some sessions. Use the filter to configure the types of sessions to synchronize. The structure of `session_sync_filter` block is documented below.
        /// </summary>
        [Input("sessionSyncFilter")]
        public Input<Inputs.SystemClustersyncSessionSyncFilterArgs>? SessionSyncFilter { get; set; }

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("slaveAddIkeRoutes")]
        public Input<string>? SlaveAddIkeRoutes { get; set; }

        /// <summary>
        /// Sync ID.
        /// </summary>
        [Input("syncId")]
        public Input<int>? SyncId { get; set; }

        [Input("syncvds")]
        private InputList<Inputs.SystemClustersyncSyncvdArgs>? _syncvds;

        /// <summary>
        /// Sessions from these VDOMs are synchronized using this session synchronization configuration. The structure of `syncvd` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemClustersyncSyncvdArgs> Syncvds
        {
            get => _syncvds ?? (_syncvds = new InputList<Inputs.SystemClustersyncSyncvdArgs>());
            set => _syncvds = value;
        }

        /// <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 SystemClustersyncArgs()
        {
        }
        public static new SystemClustersyncArgs Empty => new SystemClustersyncArgs();
    }

    public sealed class SystemClustersyncState : global::Pulumi.ResourceArgs
    {
        [Input("downIntfsBeforeSessSyncs")]
        private InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncGetArgs>? _downIntfsBeforeSessSyncs;

        /// <summary>
        /// List of interfaces to be turned down before session synchronization is complete. The structure of `down_intfs_before_sess_sync` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncGetArgs> DownIntfsBeforeSessSyncs
        {
            get => _downIntfsBeforeSessSyncs ?? (_downIntfsBeforeSessSyncs = new InputList<Inputs.SystemClustersyncDownIntfsBeforeSessSyncGetArgs>());
            set => _downIntfsBeforeSessSyncs = 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; }

        /// <summary>
        /// Heartbeat interval (1 - 10 sec).
        /// </summary>
        [Input("hbInterval")]
        public Input<int>? HbInterval { get; set; }

        /// <summary>
        /// Lost heartbeat threshold (1 - 10).
        /// </summary>
        [Input("hbLostThreshold")]
        public Input<int>? HbLostThreshold { get; set; }

        /// <summary>
        /// IKE heartbeat interval (1 - 60 secs).
        /// </summary>
        [Input("ikeHeartbeatInterval")]
        public Input<int>? IkeHeartbeatInterval { get; set; }

        /// <summary>
        /// Enable/disable IKE HA monitor. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("ikeMonitor")]
        public Input<string>? IkeMonitor { get; set; }

        /// <summary>
        /// IKE HA monitor interval (10 - 300 secs).
        /// </summary>
        [Input("ikeMonitorInterval")]
        public Input<int>? IkeMonitorInterval { get; set; }

        /// <summary>
        /// Enable/disable IPsec tunnel synchronization. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("ipsecTunnelSync")]
        public Input<string>? IpsecTunnelSync { get; set; }

        /// <summary>
        /// IP address of the interface on the peer unit that is used for the session synchronization link.
        /// </summary>
        [Input("peerip")]
        public Input<string>? Peerip { get; set; }

        /// <summary>
        /// VDOM that contains the session synchronization link interface on the peer unit. Usually both peers would have the same peervd.
        /// </summary>
        [Input("peervd")]
        public Input<string>? Peervd { get; set; }

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("secondaryAddIpsecRoutes")]
        public Input<string>? SecondaryAddIpsecRoutes { get; set; }

        /// <summary>
        /// Add one or more filters if you only want to synchronize some sessions. Use the filter to configure the types of sessions to synchronize. The structure of `session_sync_filter` block is documented below.
        /// </summary>
        [Input("sessionSyncFilter")]
        public Input<Inputs.SystemClustersyncSessionSyncFilterGetArgs>? SessionSyncFilter { get; set; }

        /// <summary>
        /// Enable/disable IKE route announcement on the backup unit. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("slaveAddIkeRoutes")]
        public Input<string>? SlaveAddIkeRoutes { get; set; }

        /// <summary>
        /// Sync ID.
        /// </summary>
        [Input("syncId")]
        public Input<int>? SyncId { get; set; }

        [Input("syncvds")]
        private InputList<Inputs.SystemClustersyncSyncvdGetArgs>? _syncvds;

        /// <summary>
        /// Sessions from these VDOMs are synchronized using this session synchronization configuration. The structure of `syncvd` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemClustersyncSyncvdGetArgs> Syncvds
        {
            get => _syncvds ?? (_syncvds = new InputList<Inputs.SystemClustersyncSyncvdGetArgs>());
            set => _syncvds = value;
        }

        /// <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 SystemClustersyncState()
        {
        }
        public static new SystemClustersyncState Empty => new SystemClustersyncState();
    }
}
