<gh_stars>0// *** 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 user groups.
    /// 
    /// ## 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.UserGroup("trname", new()
    ///     {
    ///         Company = "optional",
    ///         Email = "enable",
    ///         Expire = 14400,
    ///         ExpireType = "immediately",
    ///         GroupType = "firewall",
    ///         MaxAccounts = 0,
    ///         Members = new[]
    ///         {
    ///             new Fortios.Inputs.UserGroupMemberArgs
    ///             {
    ///                 Name = "guest",
    ///             },
    ///         },
    ///         MobilePhone = "disable",
    ///         MultipleGuestAdd = "disable",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// User Group can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/userGroup:UserGroup labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/userGroup:UserGroup labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/userGroup:UserGroup")]
    public partial class UserGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Enable/disable overriding the global number of concurrent authentication sessions for this user group. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("authConcurrentOverride")]
        public Output<string> AuthConcurrentOverride { get; private set; } = null!;

        /// <summary>
        /// Maximum number of concurrent authenticated connections per user (0 - 100).
        /// </summary>
        [Output("authConcurrentValue")]
        public Output<int> AuthConcurrentValue { get; private set; } = null!;

        /// <summary>
        /// Authentication timeout in minutes for this user group. 0 to use the global user setting auth-timeout.
        /// </summary>
        [Output("authtimeout")]
        public Output<int> Authtimeout { get; private set; } = null!;

        /// <summary>
        /// Set the action for the company guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Output("company")]
        public Output<string> Company { 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>
        /// Enable/disable the guest user email address field. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("email")]
        public Output<string> Email { get; private set; } = null!;

        /// <summary>
        /// Time in seconds before guest user accounts expire. (1 - 31536000 sec)
        /// </summary>
        [Output("expire")]
        public Output<int> Expire { get; private set; } = null!;

        /// <summary>
        /// Determine when the expiration countdown begins. Valid values: `immediately`, `first-successful-login`.
        /// </summary>
        [Output("expireType")]
        public Output<string> ExpireType { get; private set; } = null!;

        /// <summary>
        /// Group ID.
        /// </summary>
        [Output("fosid")]
        public Output<int> Fosid { get; private set; } = null!;

        /// <summary>
        /// Set the group to be for firewall authentication, FSSO, RSSO, or guest users. Valid values: `firewall`, `fsso-service`, `rsso`, `guest`.
        /// </summary>
        [Output("groupType")]
        public Output<string> GroupType { get; private set; } = null!;

        /// <summary>
        /// Guest User. The structure of `guest` block is documented below.
        /// </summary>
        [Output("guests")]
        public Output<ImmutableArray<Outputs.UserGroupGuest>> Guests { get; private set; } = null!;

        /// <summary>
        /// Realm attribute for MD5-digest authentication.
        /// </summary>
        [Output("httpDigestRealm")]
        public Output<string> HttpDigestRealm { get; private set; } = null!;

        /// <summary>
        /// Group matches. The structure of `match` block is documented below.
        /// </summary>
        [Output("matches")]
        public Output<ImmutableArray<Outputs.UserGroupMatch>> Matches { get; private set; } = null!;

        /// <summary>
        /// Maximum number of guest accounts that can be created for this group (0 means unlimited).
        /// </summary>
        [Output("maxAccounts")]
        public Output<int> MaxAccounts { get; private set; } = null!;

        /// <summary>
        /// Names of users, peers, LDAP severs, or RADIUS servers to add to the user group. The structure of `member` block is documented below.
        /// </summary>
        [Output("members")]
        public Output<ImmutableArray<Outputs.UserGroupMember>> Members { get; private set; } = null!;

        /// <summary>
        /// Enable/disable the guest user mobile phone number field. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("mobilePhone")]
        public Output<string> MobilePhone { get; private set; } = null!;

        /// <summary>
        /// Enable/disable addition of multiple guests. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("multipleGuestAdd")]
        public Output<string> MultipleGuestAdd { get; private set; } = null!;

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

        /// <summary>
        /// Guest user password type. Valid values: `auto-generate`, `specify`, `disable`.
        /// </summary>
        [Output("password")]
        public Output<string> Password { get; private set; } = null!;

        /// <summary>
        /// SMS server.
        /// </summary>
        [Output("smsCustomServer")]
        public Output<string> SmsCustomServer { get; private set; } = null!;

        /// <summary>
        /// Send SMS through FortiGuard or other external server. Valid values: `fortiguard`, `custom`.
        /// </summary>
        [Output("smsServer")]
        public Output<string> SmsServer { get; private set; } = null!;

        /// <summary>
        /// Set the action for the sponsor guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Output("sponsor")]
        public Output<string> Sponsor { get; private set; } = null!;

        /// <summary>
        /// Name of the RADIUS user group that this local user group represents.
        /// </summary>
        [Output("ssoAttributeValue")]
        public Output<string> SsoAttributeValue { get; private set; } = null!;

        /// <summary>
        /// Guest user ID type. Valid values: `email`, `auto-generate`, `specify`.
        /// </summary>
        [Output("userId")]
        public Output<string> UserId { get; private set; } = null!;

        /// <summary>
        /// Enable/disable the guest user name entry. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("userName")]
        public Output<string> UserName { 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 UserGroup 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 UserGroup(string name, UserGroupArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/userGroup:UserGroup", name, args ?? new UserGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class UserGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Enable/disable overriding the global number of concurrent authentication sessions for this user group. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("authConcurrentOverride")]
        public Input<string>? AuthConcurrentOverride { get; set; }

        /// <summary>
        /// Maximum number of concurrent authenticated connections per user (0 - 100).
        /// </summary>
        [Input("authConcurrentValue")]
        public Input<int>? AuthConcurrentValue { get; set; }

        /// <summary>
        /// Authentication timeout in minutes for this user group. 0 to use the global user setting auth-timeout.
        /// </summary>
        [Input("authtimeout")]
        public Input<int>? Authtimeout { get; set; }

        /// <summary>
        /// Set the action for the company guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Input("company")]
        public Input<string>? Company { get; set; }

        /// <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>
        /// Enable/disable the guest user email address field. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("email")]
        public Input<string>? Email { get; set; }

        /// <summary>
        /// Time in seconds before guest user accounts expire. (1 - 31536000 sec)
        /// </summary>
        [Input("expire")]
        public Input<int>? Expire { get; set; }

        /// <summary>
        /// Determine when the expiration countdown begins. Valid values: `immediately`, `first-successful-login`.
        /// </summary>
        [Input("expireType")]
        public Input<string>? ExpireType { get; set; }

        /// <summary>
        /// Group ID.
        /// </summary>
        [Input("fosid")]
        public Input<int>? Fosid { get; set; }

        /// <summary>
        /// Set the group to be for firewall authentication, FSSO, RSSO, or guest users. Valid values: `firewall`, `fsso-service`, `rsso`, `guest`.
        /// </summary>
        [Input("groupType")]
        public Input<string>? GroupType { get; set; }

        [Input("guests")]
        private InputList<Inputs.UserGroupGuestArgs>? _guests;

        /// <summary>
        /// Guest User. The structure of `guest` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupGuestArgs> Guests
        {
            get => _guests ?? (_guests = new InputList<Inputs.UserGroupGuestArgs>());
            set => _guests = value;
        }

        /// <summary>
        /// Realm attribute for MD5-digest authentication.
        /// </summary>
        [Input("httpDigestRealm")]
        public Input<string>? HttpDigestRealm { get; set; }

        [Input("matches")]
        private InputList<Inputs.UserGroupMatchArgs>? _matches;

        /// <summary>
        /// Group matches. The structure of `match` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupMatchArgs> Matches
        {
            get => _matches ?? (_matches = new InputList<Inputs.UserGroupMatchArgs>());
            set => _matches = value;
        }

        /// <summary>
        /// Maximum number of guest accounts that can be created for this group (0 means unlimited).
        /// </summary>
        [Input("maxAccounts")]
        public Input<int>? MaxAccounts { get; set; }

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

        /// <summary>
        /// Names of users, peers, LDAP severs, or RADIUS servers to add to the user group. The structure of `member` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupMemberArgs> Members
        {
            get => _members ?? (_members = new InputList<Inputs.UserGroupMemberArgs>());
            set => _members = value;
        }

        /// <summary>
        /// Enable/disable the guest user mobile phone number field. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("mobilePhone")]
        public Input<string>? MobilePhone { get; set; }

        /// <summary>
        /// Enable/disable addition of multiple guests. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("multipleGuestAdd")]
        public Input<string>? MultipleGuestAdd { get; set; }

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

        /// <summary>
        /// Guest user password type. Valid values: `auto-generate`, `specify`, `disable`.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// SMS server.
        /// </summary>
        [Input("smsCustomServer")]
        public Input<string>? SmsCustomServer { get; set; }

        /// <summary>
        /// Send SMS through FortiGuard or other external server. Valid values: `fortiguard`, `custom`.
        /// </summary>
        [Input("smsServer")]
        public Input<string>? SmsServer { get; set; }

        /// <summary>
        /// Set the action for the sponsor guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Input("sponsor")]
        public Input<string>? Sponsor { get; set; }

        /// <summary>
        /// Name of the RADIUS user group that this local user group represents.
        /// </summary>
        [Input("ssoAttributeValue")]
        public Input<string>? SsoAttributeValue { get; set; }

        /// <summary>
        /// Guest user ID type. Valid values: `email`, `auto-generate`, `specify`.
        /// </summary>
        [Input("userId")]
        public Input<string>? UserId { get; set; }

        /// <summary>
        /// Enable/disable the guest user name entry. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { 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 UserGroupArgs()
        {
        }
        public static new UserGroupArgs Empty => new UserGroupArgs();
    }

    public sealed class UserGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Enable/disable overriding the global number of concurrent authentication sessions for this user group. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("authConcurrentOverride")]
        public Input<string>? AuthConcurrentOverride { get; set; }

        /// <summary>
        /// Maximum number of concurrent authenticated connections per user (0 - 100).
        /// </summary>
        [Input("authConcurrentValue")]
        public Input<int>? AuthConcurrentValue { get; set; }

        /// <summary>
        /// Authentication timeout in minutes for this user group. 0 to use the global user setting auth-timeout.
        /// </summary>
        [Input("authtimeout")]
        public Input<int>? Authtimeout { get; set; }

        /// <summary>
        /// Set the action for the company guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Input("company")]
        public Input<string>? Company { get; set; }

        /// <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>
        /// Enable/disable the guest user email address field. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("email")]
        public Input<string>? Email { get; set; }

        /// <summary>
        /// Time in seconds before guest user accounts expire. (1 - 31536000 sec)
        /// </summary>
        [Input("expire")]
        public Input<int>? Expire { get; set; }

        /// <summary>
        /// Determine when the expiration countdown begins. Valid values: `immediately`, `first-successful-login`.
        /// </summary>
        [Input("expireType")]
        public Input<string>? ExpireType { get; set; }

        /// <summary>
        /// Group ID.
        /// </summary>
        [Input("fosid")]
        public Input<int>? Fosid { get; set; }

        /// <summary>
        /// Set the group to be for firewall authentication, FSSO, RSSO, or guest users. Valid values: `firewall`, `fsso-service`, `rsso`, `guest`.
        /// </summary>
        [Input("groupType")]
        public Input<string>? GroupType { get; set; }

        [Input("guests")]
        private InputList<Inputs.UserGroupGuestGetArgs>? _guests;

        /// <summary>
        /// Guest User. The structure of `guest` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupGuestGetArgs> Guests
        {
            get => _guests ?? (_guests = new InputList<Inputs.UserGroupGuestGetArgs>());
            set => _guests = value;
        }

        /// <summary>
        /// Realm attribute for MD5-digest authentication.
        /// </summary>
        [Input("httpDigestRealm")]
        public Input<string>? HttpDigestRealm { get; set; }

        [Input("matches")]
        private InputList<Inputs.UserGroupMatchGetArgs>? _matches;

        /// <summary>
        /// Group matches. The structure of `match` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupMatchGetArgs> Matches
        {
            get => _matches ?? (_matches = new InputList<Inputs.UserGroupMatchGetArgs>());
            set => _matches = value;
        }

        /// <summary>
        /// Maximum number of guest accounts that can be created for this group (0 means unlimited).
        /// </summary>
        [Input("maxAccounts")]
        public Input<int>? MaxAccounts { get; set; }

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

        /// <summary>
        /// Names of users, peers, LDAP severs, or RADIUS servers to add to the user group. The structure of `member` block is documented below.
        /// </summary>
        public InputList<Inputs.UserGroupMemberGetArgs> Members
        {
            get => _members ?? (_members = new InputList<Inputs.UserGroupMemberGetArgs>());
            set => _members = value;
        }

        /// <summary>
        /// Enable/disable the guest user mobile phone number field. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("mobilePhone")]
        public Input<string>? MobilePhone { get; set; }

        /// <summary>
        /// Enable/disable addition of multiple guests. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("multipleGuestAdd")]
        public Input<string>? MultipleGuestAdd { get; set; }

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

        /// <summary>
        /// Guest user password type. Valid values: `auto-generate`, `specify`, `disable`.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// SMS server.
        /// </summary>
        [Input("smsCustomServer")]
        public Input<string>? SmsCustomServer { get; set; }

        /// <summary>
        /// Send SMS through FortiGuard or other external server. Valid values: `fortiguard`, `custom`.
        /// </summary>
        [Input("smsServer")]
        public Input<string>? SmsServer { get; set; }

        /// <summary>
        /// Set the action for the sponsor guest user field. Valid values: `optional`, `mandatory`, `disabled`.
        /// </summary>
        [Input("sponsor")]
        public Input<string>? Sponsor { get; set; }

        /// <summary>
        /// Name of the RADIUS user group that this local user group represents.
        /// </summary>
        [Input("ssoAttributeValue")]
        public Input<string>? SsoAttributeValue { get; set; }

        /// <summary>
        /// Guest user ID type. Valid values: `email`, `auto-generate`, `specify`.
        /// </summary>
        [Input("userId")]
        public Input<string>? UserId { get; set; }

        /// <summary>
        /// Enable/disable the guest user name entry. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { 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 UserGroupState()
        {
        }
        public static new UserGroupState Empty => new UserGroupState();
    }
}
