<reponame>pulumiverse/pulumi-fortios// *** 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 FortiSwitch flow tracking and export via ipfix/netflow. Applies to FortiOS Version `&gt;= 6.2.4`.
    /// 
    /// ## Import
    /// 
    /// SwitchController FlowTracking can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/switchcontrollerFlowtracking:SwitchcontrollerFlowtracking labelname SwitchControllerFlowTracking
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/switchcontrollerFlowtracking:SwitchcontrollerFlowtracking labelname SwitchControllerFlowTracking
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/switchcontrollerFlowtracking:SwitchcontrollerFlowtracking")]
    public partial class SwitchcontrollerFlowtracking : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Configure aggregates in which all traffic sessions matching the IP Address will be grouped into the same flow. The structure of `aggregates` block is documented below.
        /// </summary>
        [Output("aggregates")]
        public Output<ImmutableArray<Outputs.SwitchcontrollerFlowtrackingAggregate>> Aggregates { get; private set; } = null!;

        /// <summary>
        /// Configure collector ip address.
        /// </summary>
        [Output("collectorIp")]
        public Output<string> CollectorIp { get; private set; } = null!;

        /// <summary>
        /// Configure collector port number(0-65535, default=0).
        /// </summary>
        [Output("collectorPort")]
        public Output<int> CollectorPort { get; private set; } = null!;

        /// <summary>
        /// Configure collectors for the flow. The structure of `collectors` block is documented below.
        /// </summary>
        [Output("collectors")]
        public Output<ImmutableArray<Outputs.SwitchcontrollerFlowtrackingCollector>> Collectors { 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>
        /// Configure flow tracking protocol. Valid values: `netflow1`, `netflow5`, `netflow9`, `ipfix`.
        /// </summary>
        [Output("format")]
        public Output<string> Format { get; private set; } = null!;

        /// <summary>
        /// Configure flow tracking level. Valid values: `vlan`, `ip`, `port`, `proto`, `mac`.
        /// </summary>
        [Output("level")]
        public Output<string> Level { get; private set; } = null!;

        /// <summary>
        /// Configure flow max export packet size (512-9216, default=512 bytes).
        /// </summary>
        [Output("maxExportPktSize")]
        public Output<int> MaxExportPktSize { get; private set; } = null!;

        /// <summary>
        /// Configure sample mode for the flow tracking. Valid values: `local`, `perimeter`, `device-ingress`.
        /// </summary>
        [Output("sampleMode")]
        public Output<string> SampleMode { get; private set; } = null!;

        /// <summary>
        /// Configure sample rate for the perimeter and device-ingress sampling(0 - 99999).
        /// </summary>
        [Output("sampleRate")]
        public Output<int> SampleRate { get; private set; } = null!;

        /// <summary>
        /// Configure template export period (1-60, default=5 minutes).
        /// </summary>
        [Output("templateExportPeriod")]
        public Output<int> TemplateExportPeriod { get; private set; } = null!;

        /// <summary>
        /// Configure flow session general timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Output("timeoutGeneral")]
        public Output<int> TimeoutGeneral { get; private set; } = null!;

        /// <summary>
        /// Configure flow session ICMP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Output("timeoutIcmp")]
        public Output<int> TimeoutIcmp { get; private set; } = null!;

        /// <summary>
        /// Configure flow session max timeout (60-604800, default=604800 seconds).
        /// </summary>
        [Output("timeoutMax")]
        public Output<int> TimeoutMax { get; private set; } = null!;

        /// <summary>
        /// Configure flow session TCP timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Output("timeoutTcp")]
        public Output<int> TimeoutTcp { get; private set; } = null!;

        /// <summary>
        /// Configure flow session TCP FIN timeout (60-604800, default=300 seconds).
        /// </summary>
        [Output("timeoutTcpFin")]
        public Output<int> TimeoutTcpFin { get; private set; } = null!;

        /// <summary>
        /// Configure flow session TCP RST timeout (60-604800, default=120 seconds).
        /// </summary>
        [Output("timeoutTcpRst")]
        public Output<int> TimeoutTcpRst { get; private set; } = null!;

        /// <summary>
        /// Configure flow session UDP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Output("timeoutUdp")]
        public Output<int> TimeoutUdp { get; private set; } = null!;

        /// <summary>
        /// Configure L4 transport protocol for exporting packets. Valid values: `udp`, `tcp`, `sctp`.
        /// </summary>
        [Output("transport")]
        public Output<string> Transport { 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 SwitchcontrollerFlowtracking 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 SwitchcontrollerFlowtracking(string name, SwitchcontrollerFlowtrackingArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/switchcontrollerFlowtracking:SwitchcontrollerFlowtracking", name, args ?? new SwitchcontrollerFlowtrackingArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class SwitchcontrollerFlowtrackingArgs : global::Pulumi.ResourceArgs
    {
        [Input("aggregates")]
        private InputList<Inputs.SwitchcontrollerFlowtrackingAggregateArgs>? _aggregates;

        /// <summary>
        /// Configure aggregates in which all traffic sessions matching the IP Address will be grouped into the same flow. The structure of `aggregates` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerFlowtrackingAggregateArgs> Aggregates
        {
            get => _aggregates ?? (_aggregates = new InputList<Inputs.SwitchcontrollerFlowtrackingAggregateArgs>());
            set => _aggregates = value;
        }

        /// <summary>
        /// Configure collector ip address.
        /// </summary>
        [Input("collectorIp")]
        public Input<string>? CollectorIp { get; set; }

        /// <summary>
        /// Configure collector port number(0-65535, default=0).
        /// </summary>
        [Input("collectorPort")]
        public Input<int>? CollectorPort { get; set; }

        [Input("collectors")]
        private InputList<Inputs.SwitchcontrollerFlowtrackingCollectorArgs>? _collectors;

        /// <summary>
        /// Configure collectors for the flow. The structure of `collectors` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerFlowtrackingCollectorArgs> Collectors
        {
            get => _collectors ?? (_collectors = new InputList<Inputs.SwitchcontrollerFlowtrackingCollectorArgs>());
            set => _collectors = 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>
        /// Configure flow tracking protocol. Valid values: `netflow1`, `netflow5`, `netflow9`, `ipfix`.
        /// </summary>
        [Input("format")]
        public Input<string>? Format { get; set; }

        /// <summary>
        /// Configure flow tracking level. Valid values: `vlan`, `ip`, `port`, `proto`, `mac`.
        /// </summary>
        [Input("level")]
        public Input<string>? Level { get; set; }

        /// <summary>
        /// Configure flow max export packet size (512-9216, default=512 bytes).
        /// </summary>
        [Input("maxExportPktSize")]
        public Input<int>? MaxExportPktSize { get; set; }

        /// <summary>
        /// Configure sample mode for the flow tracking. Valid values: `local`, `perimeter`, `device-ingress`.
        /// </summary>
        [Input("sampleMode")]
        public Input<string>? SampleMode { get; set; }

        /// <summary>
        /// Configure sample rate for the perimeter and device-ingress sampling(0 - 99999).
        /// </summary>
        [Input("sampleRate")]
        public Input<int>? SampleRate { get; set; }

        /// <summary>
        /// Configure template export period (1-60, default=5 minutes).
        /// </summary>
        [Input("templateExportPeriod")]
        public Input<int>? TemplateExportPeriod { get; set; }

        /// <summary>
        /// Configure flow session general timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Input("timeoutGeneral")]
        public Input<int>? TimeoutGeneral { get; set; }

        /// <summary>
        /// Configure flow session ICMP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutIcmp")]
        public Input<int>? TimeoutIcmp { get; set; }

        /// <summary>
        /// Configure flow session max timeout (60-604800, default=604800 seconds).
        /// </summary>
        [Input("timeoutMax")]
        public Input<int>? TimeoutMax { get; set; }

        /// <summary>
        /// Configure flow session TCP timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Input("timeoutTcp")]
        public Input<int>? TimeoutTcp { get; set; }

        /// <summary>
        /// Configure flow session TCP FIN timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutTcpFin")]
        public Input<int>? TimeoutTcpFin { get; set; }

        /// <summary>
        /// Configure flow session TCP RST timeout (60-604800, default=120 seconds).
        /// </summary>
        [Input("timeoutTcpRst")]
        public Input<int>? TimeoutTcpRst { get; set; }

        /// <summary>
        /// Configure flow session UDP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutUdp")]
        public Input<int>? TimeoutUdp { get; set; }

        /// <summary>
        /// Configure L4 transport protocol for exporting packets. Valid values: `udp`, `tcp`, `sctp`.
        /// </summary>
        [Input("transport")]
        public Input<string>? Transport { 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 SwitchcontrollerFlowtrackingArgs()
        {
        }
        public static new SwitchcontrollerFlowtrackingArgs Empty => new SwitchcontrollerFlowtrackingArgs();
    }

    public sealed class SwitchcontrollerFlowtrackingState : global::Pulumi.ResourceArgs
    {
        [Input("aggregates")]
        private InputList<Inputs.SwitchcontrollerFlowtrackingAggregateGetArgs>? _aggregates;

        /// <summary>
        /// Configure aggregates in which all traffic sessions matching the IP Address will be grouped into the same flow. The structure of `aggregates` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerFlowtrackingAggregateGetArgs> Aggregates
        {
            get => _aggregates ?? (_aggregates = new InputList<Inputs.SwitchcontrollerFlowtrackingAggregateGetArgs>());
            set => _aggregates = value;
        }

        /// <summary>
        /// Configure collector ip address.
        /// </summary>
        [Input("collectorIp")]
        public Input<string>? CollectorIp { get; set; }

        /// <summary>
        /// Configure collector port number(0-65535, default=0).
        /// </summary>
        [Input("collectorPort")]
        public Input<int>? CollectorPort { get; set; }

        [Input("collectors")]
        private InputList<Inputs.SwitchcontrollerFlowtrackingCollectorGetArgs>? _collectors;

        /// <summary>
        /// Configure collectors for the flow. The structure of `collectors` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerFlowtrackingCollectorGetArgs> Collectors
        {
            get => _collectors ?? (_collectors = new InputList<Inputs.SwitchcontrollerFlowtrackingCollectorGetArgs>());
            set => _collectors = 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>
        /// Configure flow tracking protocol. Valid values: `netflow1`, `netflow5`, `netflow9`, `ipfix`.
        /// </summary>
        [Input("format")]
        public Input<string>? Format { get; set; }

        /// <summary>
        /// Configure flow tracking level. Valid values: `vlan`, `ip`, `port`, `proto`, `mac`.
        /// </summary>
        [Input("level")]
        public Input<string>? Level { get; set; }

        /// <summary>
        /// Configure flow max export packet size (512-9216, default=512 bytes).
        /// </summary>
        [Input("maxExportPktSize")]
        public Input<int>? MaxExportPktSize { get; set; }

        /// <summary>
        /// Configure sample mode for the flow tracking. Valid values: `local`, `perimeter`, `device-ingress`.
        /// </summary>
        [Input("sampleMode")]
        public Input<string>? SampleMode { get; set; }

        /// <summary>
        /// Configure sample rate for the perimeter and device-ingress sampling(0 - 99999).
        /// </summary>
        [Input("sampleRate")]
        public Input<int>? SampleRate { get; set; }

        /// <summary>
        /// Configure template export period (1-60, default=5 minutes).
        /// </summary>
        [Input("templateExportPeriod")]
        public Input<int>? TemplateExportPeriod { get; set; }

        /// <summary>
        /// Configure flow session general timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Input("timeoutGeneral")]
        public Input<int>? TimeoutGeneral { get; set; }

        /// <summary>
        /// Configure flow session ICMP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutIcmp")]
        public Input<int>? TimeoutIcmp { get; set; }

        /// <summary>
        /// Configure flow session max timeout (60-604800, default=604800 seconds).
        /// </summary>
        [Input("timeoutMax")]
        public Input<int>? TimeoutMax { get; set; }

        /// <summary>
        /// Configure flow session TCP timeout (60-604800, default=3600 seconds).
        /// </summary>
        [Input("timeoutTcp")]
        public Input<int>? TimeoutTcp { get; set; }

        /// <summary>
        /// Configure flow session TCP FIN timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutTcpFin")]
        public Input<int>? TimeoutTcpFin { get; set; }

        /// <summary>
        /// Configure flow session TCP RST timeout (60-604800, default=120 seconds).
        /// </summary>
        [Input("timeoutTcpRst")]
        public Input<int>? TimeoutTcpRst { get; set; }

        /// <summary>
        /// Configure flow session UDP timeout (60-604800, default=300 seconds).
        /// </summary>
        [Input("timeoutUdp")]
        public Input<int>? TimeoutUdp { get; set; }

        /// <summary>
        /// Configure L4 transport protocol for exporting packets. Valid values: `udp`, `tcp`, `sctp`.
        /// </summary>
        [Input("transport")]
        public Input<string>? Transport { 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 SwitchcontrollerFlowtrackingState()
        {
        }
        public static new SwitchcontrollerFlowtrackingState Empty => new SwitchcontrollerFlowtrackingState();
    }
}
