// *** 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;

namespace Pulumi.Routeros.CapsMan
{
    /// <summary>
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Routeros = Pulumi.Routeros;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var testSecurity = new Routeros.CapsMan.Security("testSecurity", new()
    ///     {
    ///         AuthenticationTypes = new[]
    ///         {
    ///             "wpa-psk",
    ///             "wpa-eap",
    ///             "wpa2-psk",
    ///         },
    ///         Comment = "test_security",
    ///         DisablePmkid = true,
    ///         EapMethods = "eap-tls,passthrough",
    ///         EapRadiusAccounting = true,
    ///         Encryptions = new[]
    ///         {
    ///             "tkip",
    ///             "aes-ccm",
    ///         },
    ///         GroupEncryption = "aes-ccm",
    ///         GroupKeyUpdate = "1h",
    ///         Passphrase = "9jnerlff23u8ed01np9g6ysbhsh0dvcs",
    ///         TlsCertificate = "none",
    ///         TlsMode = "verify-certificate",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Import with the name of the CAPsMAN security profile in case of the example use test-security-config
    /// 
    /// ```sh
    ///  $ pulumi import routeros:CapsMan/security:Security test_security test-security-config
    /// ```
    /// </summary>
    [RouterosResourceType("routeros:CapsMan/security:Security")]
    public partial class Security : global::Pulumi.CustomResource
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___id_")]
        public Output<int?> ___id_ { get; private set; } = null!;

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___path_")]
        public Output<string?> ___path_ { get; private set; } = null!;

        /// <summary>
        /// Specify the type of Authentication from wpa-psk, wpa2-psk, wpa-eap or wpa2-eap.
        /// </summary>
        [Output("authenticationTypes")]
        public Output<ImmutableArray<string>> AuthenticationTypes { get; private set; } = null!;

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

        /// <summary>
        /// Whether to include PMKID into the EAPOL frame sent out by the Access Point. Disabling PMKID can cause compatibility issues with devices that use the PMKID to connect to an Access Point.
        /// </summary>
        [Output("disablePmkid")]
        public Output<bool?> DisablePmkid { get; private set; } = null!;

        /// <summary>
        /// eap-tls - Use built-in EAP TLS authentication; passthrough - Access point will relay authentication process to the RADIUS server.
        /// </summary>
        [Output("eapMethods")]
        public Output<string?> EapMethods { get; private set; } = null!;

        /// <summary>
        /// Specifies if RADIUS traffic accounting should be used if RADIUS authentication gets done for this client
        /// </summary>
        [Output("eapRadiusAccounting")]
        public Output<bool?> EapRadiusAccounting { get; private set; } = null!;

        /// <summary>
        /// Set type of unicast encryption algorithm used.
        /// </summary>
        [Output("encryptions")]
        public Output<ImmutableArray<string>> Encryptions { get; private set; } = null!;

        /// <summary>
        /// Access Point advertises one of these ciphers, multiple values can be selected. Access Point uses it to encrypt all broadcast and multicast frames. Client attempts connection only to Access Points that use one of the specified group ciphers.
        /// </summary>
        [Output("groupEncryption")]
        public Output<string?> GroupEncryption { get; private set; } = null!;

        /// <summary>
        /// Controls how often Access Point updates the group key. This key is used to encrypt all broadcast and multicast frames. property only has effect for Access Points. (30s..1h)
        /// </summary>
        [Output("groupKeyUpdate")]
        public Output<string?> GroupKeyUpdate { get; private set; } = null!;

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// WPA or WPA2 pre-shared key.
        /// </summary>
        [Output("passphrase")]
        public Output<string?> Passphrase { get; private set; } = null!;

        /// <summary>
        /// Access Point always needs a certificate when security.tls-mode is set to value other than no-certificates.
        /// </summary>
        [Output("tlsCertificate")]
        public Output<string?> TlsCertificate { get; private set; } = null!;

        /// <summary>
        /// This property has effect only when security.eap-methods contains eap-tls.
        /// </summary>
        [Output("tlsMode")]
        public Output<string?> TlsMode { get; private set; } = null!;


        /// <summary>
        /// Create a Security 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 Security(string name, SecurityArgs? args = null, CustomResourceOptions? options = null)
            : base("routeros:CapsMan/security:Security", name, args ?? new SecurityArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Security(string name, Input<string> id, SecurityState? state = null, CustomResourceOptions? options = null)
            : base("routeros:CapsMan/security:Security", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                AdditionalSecretOutputs =
                {
                    "passphrase",
                },
            };
            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 Security 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 Security Get(string name, Input<string> id, SecurityState? state = null, CustomResourceOptions? options = null)
        {
            return new Security(name, id, state, options);
        }
    }

    public sealed class SecurityArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        [Input("authenticationTypes")]
        private InputList<string>? _authenticationTypes;

        /// <summary>
        /// Specify the type of Authentication from wpa-psk, wpa2-psk, wpa-eap or wpa2-eap.
        /// </summary>
        public InputList<string> AuthenticationTypes
        {
            get => _authenticationTypes ?? (_authenticationTypes = new InputList<string>());
            set => _authenticationTypes = value;
        }

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

        /// <summary>
        /// Whether to include PMKID into the EAPOL frame sent out by the Access Point. Disabling PMKID can cause compatibility issues with devices that use the PMKID to connect to an Access Point.
        /// </summary>
        [Input("disablePmkid")]
        public Input<bool>? DisablePmkid { get; set; }

        /// <summary>
        /// eap-tls - Use built-in EAP TLS authentication; passthrough - Access point will relay authentication process to the RADIUS server.
        /// </summary>
        [Input("eapMethods")]
        public Input<string>? EapMethods { get; set; }

        /// <summary>
        /// Specifies if RADIUS traffic accounting should be used if RADIUS authentication gets done for this client
        /// </summary>
        [Input("eapRadiusAccounting")]
        public Input<bool>? EapRadiusAccounting { get; set; }

        [Input("encryptions")]
        private InputList<string>? _encryptions;

        /// <summary>
        /// Set type of unicast encryption algorithm used.
        /// </summary>
        public InputList<string> Encryptions
        {
            get => _encryptions ?? (_encryptions = new InputList<string>());
            set => _encryptions = value;
        }

        /// <summary>
        /// Access Point advertises one of these ciphers, multiple values can be selected. Access Point uses it to encrypt all broadcast and multicast frames. Client attempts connection only to Access Points that use one of the specified group ciphers.
        /// </summary>
        [Input("groupEncryption")]
        public Input<string>? GroupEncryption { get; set; }

        /// <summary>
        /// Controls how often Access Point updates the group key. This key is used to encrypt all broadcast and multicast frames. property only has effect for Access Points. (30s..1h)
        /// </summary>
        [Input("groupKeyUpdate")]
        public Input<string>? GroupKeyUpdate { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("passphrase")]
        private Input<string>? _passphrase;

        /// <summary>
        /// WPA or WPA2 pre-shared key.
        /// </summary>
        public Input<string>? Passphrase
        {
            get => _passphrase;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _passphrase = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Access Point always needs a certificate when security.tls-mode is set to value other than no-certificates.
        /// </summary>
        [Input("tlsCertificate")]
        public Input<string>? TlsCertificate { get; set; }

        /// <summary>
        /// This property has effect only when security.eap-methods contains eap-tls.
        /// </summary>
        [Input("tlsMode")]
        public Input<string>? TlsMode { get; set; }

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

    public sealed class SecurityState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        [Input("authenticationTypes")]
        private InputList<string>? _authenticationTypes;

        /// <summary>
        /// Specify the type of Authentication from wpa-psk, wpa2-psk, wpa-eap or wpa2-eap.
        /// </summary>
        public InputList<string> AuthenticationTypes
        {
            get => _authenticationTypes ?? (_authenticationTypes = new InputList<string>());
            set => _authenticationTypes = value;
        }

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

        /// <summary>
        /// Whether to include PMKID into the EAPOL frame sent out by the Access Point. Disabling PMKID can cause compatibility issues with devices that use the PMKID to connect to an Access Point.
        /// </summary>
        [Input("disablePmkid")]
        public Input<bool>? DisablePmkid { get; set; }

        /// <summary>
        /// eap-tls - Use built-in EAP TLS authentication; passthrough - Access point will relay authentication process to the RADIUS server.
        /// </summary>
        [Input("eapMethods")]
        public Input<string>? EapMethods { get; set; }

        /// <summary>
        /// Specifies if RADIUS traffic accounting should be used if RADIUS authentication gets done for this client
        /// </summary>
        [Input("eapRadiusAccounting")]
        public Input<bool>? EapRadiusAccounting { get; set; }

        [Input("encryptions")]
        private InputList<string>? _encryptions;

        /// <summary>
        /// Set type of unicast encryption algorithm used.
        /// </summary>
        public InputList<string> Encryptions
        {
            get => _encryptions ?? (_encryptions = new InputList<string>());
            set => _encryptions = value;
        }

        /// <summary>
        /// Access Point advertises one of these ciphers, multiple values can be selected. Access Point uses it to encrypt all broadcast and multicast frames. Client attempts connection only to Access Points that use one of the specified group ciphers.
        /// </summary>
        [Input("groupEncryption")]
        public Input<string>? GroupEncryption { get; set; }

        /// <summary>
        /// Controls how often Access Point updates the group key. This key is used to encrypt all broadcast and multicast frames. property only has effect for Access Points. (30s..1h)
        /// </summary>
        [Input("groupKeyUpdate")]
        public Input<string>? GroupKeyUpdate { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("passphrase")]
        private Input<string>? _passphrase;

        /// <summary>
        /// WPA or WPA2 pre-shared key.
        /// </summary>
        public Input<string>? Passphrase
        {
            get => _passphrase;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _passphrase = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Access Point always needs a certificate when security.tls-mode is set to value other than no-certificates.
        /// </summary>
        [Input("tlsCertificate")]
        public Input<string>? TlsCertificate { get; set; }

        /// <summary>
        /// This property has effect only when security.eap-methods contains eap-tls.
        /// </summary>
        [Input("tlsMode")]
        public Input<string>? TlsMode { get; set; }

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