<filename>sdk/dotnet/SystemApiuserSetting.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>
    /// Provides a resource to configure API users of FortiOS. The API user of the token for this feature should have a super admin profile, It can be set in CLI while GUI does not allow.
    /// 
    /// !&gt; **Warning:** The resource will be deprecated and replaced by new resource `fortios.SystemApiuser`, we recommend that you use the new resource.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var test2 = new Fortios.SystemApiuserSetting("test2", new()
    ///     {
    ///         Accprofile = "restAPIprofile",
    ///         Trusthosts = new[]
    ///         {
    ///             new Fortios.Inputs.SystemApiuserSettingTrusthostArgs
    ///             {
    ///                 Ipv4Trusthost = "172.16.31.10 255.255.0.0",
    ///                 Type = "ipv4-trusthost",
    ///             },
    ///             new Fortios.Inputs.SystemApiuserSettingTrusthostArgs
    ///             {
    ///                 Ipv4Trusthost = "172.16.58.3 255.255.0.0",
    ///                 Type = "ipv4-trusthost",
    ///             },
    ///         },
    ///         Vdoms = new[]
    ///         {
    ///             "root",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [FortiosResourceType("fortios:index/systemApiuserSetting:SystemApiuserSetting")]
    public partial class SystemApiuserSetting : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Admin user access profile.
        /// </summary>
        [Output("accprofile")]
        public Output<string> Accprofile { get; private set; } = null!;

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

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

        [Output("trusthosts")]
        public Output<ImmutableArray<Outputs.SystemApiuserSettingTrusthost>> Trusthosts { get; private set; } = null!;

        /// <summary>
        /// Virtual domains.
        /// * `trusthost-Type` - (Required) Trusthost type.
        /// * `trusthost-ipv4_trusthost` - (Required) IPv4 trusted host address.
        /// </summary>
        [Output("vdoms")]
        public Output<ImmutableArray<string>> Vdoms { get; private set; } = null!;


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

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

    public sealed class SystemApiuserSettingArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Admin user access profile.
        /// </summary>
        [Input("accprofile", required: true)]
        public Input<string> Accprofile { get; set; } = null!;

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

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

        [Input("trusthosts", required: true)]
        private InputList<Inputs.SystemApiuserSettingTrusthostArgs>? _trusthosts;
        public InputList<Inputs.SystemApiuserSettingTrusthostArgs> Trusthosts
        {
            get => _trusthosts ?? (_trusthosts = new InputList<Inputs.SystemApiuserSettingTrusthostArgs>());
            set => _trusthosts = value;
        }

        [Input("vdoms", required: true)]
        private InputList<string>? _vdoms;

        /// <summary>
        /// Virtual domains.
        /// * `trusthost-Type` - (Required) Trusthost type.
        /// * `trusthost-ipv4_trusthost` - (Required) IPv4 trusted host address.
        /// </summary>
        public InputList<string> Vdoms
        {
            get => _vdoms ?? (_vdoms = new InputList<string>());
            set => _vdoms = value;
        }

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

    public sealed class SystemApiuserSettingState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Admin user access profile.
        /// </summary>
        [Input("accprofile")]
        public Input<string>? Accprofile { get; set; }

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

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

        [Input("trusthosts")]
        private InputList<Inputs.SystemApiuserSettingTrusthostGetArgs>? _trusthosts;
        public InputList<Inputs.SystemApiuserSettingTrusthostGetArgs> Trusthosts
        {
            get => _trusthosts ?? (_trusthosts = new InputList<Inputs.SystemApiuserSettingTrusthostGetArgs>());
            set => _trusthosts = value;
        }

        [Input("vdoms")]
        private InputList<string>? _vdoms;

        /// <summary>
        /// Virtual domains.
        /// * `trusthost-Type` - (Required) Trusthost type.
        /// * `trusthost-ipv4_trusthost` - (Required) IPv4 trusted host address.
        /// </summary>
        public InputList<string> Vdoms
        {
            get => _vdoms ?? (_vdoms = new InputList<string>());
            set => _vdoms = value;
        }

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