<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 access lists.
    /// 
    /// ## 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.RouterAccesslist("trname", new()
    ///     {
    ///         Comments = "test accesslist",
    ///     });
    /// 
    /// });
    /// ```
    /// ## Note
    /// 
    /// The feature can only be correctly supported when FortiOS Version &gt;= 6.2.4, for FortiOS Version &lt; 6.2.4, please use the following resource configuration as an alternative.
    /// 
    /// ### Example
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname1 = new Fortios.SystemAutoscript("trname1", new()
    ///     {
    ///         Interval = 1,
    ///         OutputSize = 10,
    ///         Repeat = 1,
    ///         Script = @"config router access-list
    /// edit ""static-redistribution""
    /// config rule
    /// edit 10
    /// set prefix 10.0.0.0 255.255.255.0
    /// set action permit
    /// set exact-match enable
    /// end
    /// end
    /// 
    /// ",
    ///         Start = "auto",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Router AccessList can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/routerAccesslist:RouterAccesslist labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="true"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/routerAccesslist:RouterAccesslist labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/routerAccesslist:RouterAccesslist")]
    public partial class RouterAccesslist : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comments")]
        public Output<string> Comments { get; private set; } = null!;

        [Output("dynamicSortSubtable")]
        public Output<string?> DynamicSortSubtable { get; private set; } = null!;

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

        /// <summary>
        /// Rule. The structure of `rule` block is documented below.
        /// </summary>
        [Output("rules")]
        public Output<ImmutableArray<Outputs.RouterAccesslistRule>> Rules { get; private set; } = null!;

        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;


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

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

    public sealed class RouterAccesslistArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comments")]
        public Input<string>? Comments { get; set; }

        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

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

        [Input("rules")]
        private InputList<Inputs.RouterAccesslistRuleArgs>? _rules;

        /// <summary>
        /// Rule. The structure of `rule` block is documented below.
        /// </summary>
        public InputList<Inputs.RouterAccesslistRuleArgs> Rules
        {
            get => _rules ?? (_rules = new InputList<Inputs.RouterAccesslistRuleArgs>());
            set => _rules = value;
        }

        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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

    public sealed class RouterAccesslistState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comments")]
        public Input<string>? Comments { get; set; }

        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

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

        [Input("rules")]
        private InputList<Inputs.RouterAccesslistRuleGetArgs>? _rules;

        /// <summary>
        /// Rule. The structure of `rule` block is documented below.
        /// </summary>
        public InputList<Inputs.RouterAccesslistRuleGetArgs> Rules
        {
            get => _rules ?? (_rules = new InputList<Inputs.RouterAccesslistRuleGetArgs>());
            set => _rules = value;
        }

        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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