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

namespace Pulumi.Nexus
{
    [NexusResourceType("nexus:index/nexusSecurityLdap:NexusSecurityLdap")]
    public partial class NexusSecurityLdap : Pulumi.CustomResource
    {
        /// <summary>
        /// The password to bind with. Required if authScheme other than none.
        /// </summary>
        [Output("authPassword")]
        public Output<string?> AuthPassword { get; private set; } = null!;

        /// <summary>
        /// The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5
        /// </summary>
        [Output("authRealm")]
        public Output<string?> AuthRealm { get; private set; } = null!;

        /// <summary>
        /// Authentication scheme used for connecting to LDAP server
        /// </summary>
        [Output("authSchema")]
        public Output<string> AuthSchema { get; private set; } = null!;

        /// <summary>
        /// This must be a fully qualified username if simple authentication is used. Required if authScheme other than none.
        /// </summary>
        [Output("authUsername")]
        public Output<string> AuthUsername { get; private set; } = null!;

        /// <summary>
        /// How long to wait before retrying
        /// </summary>
        [Output("connectionRetryDelaySeconds")]
        public Output<int> ConnectionRetryDelaySeconds { get; private set; } = null!;

        /// <summary>
        /// How long to wait before timeout
        /// </summary>
        [Output("connectionTimeoutSeconds")]
        public Output<int> ConnectionTimeoutSeconds { get; private set; } = null!;

        /// <summary>
        /// The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to
        /// form the full Group search base DN.
        /// </summary>
        [Output("groupBaseDn")]
        public Output<string?> GroupBaseDn { get; private set; } = null!;

        /// <summary>
        /// This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static
        /// </summary>
        [Output("groupIdAttribute")]
        public Output<string?> GroupIdAttribute { get; private set; } = null!;

        /// <summary>
        /// LDAP attribute containing the usernames for the group. Required if groupType is static
        /// </summary>
        [Output("groupMemberAttribute")]
        public Output<string?> GroupMemberAttribute { get; private set; } = null!;

        /// <summary>
        /// The format of user ID stored in the group member attribute. Required if groupType is static
        /// </summary>
        [Output("groupMemberFormat")]
        public Output<string?> GroupMemberFormat { get; private set; } = null!;

        /// <summary>
        /// LDAP class for group objects. Required if groupType is static
        /// </summary>
        [Output("groupObjectClass")]
        public Output<string?> GroupObjectClass { get; private set; } = null!;

        /// <summary>
        /// Are groups located in structures below the group base DN
        /// </summary>
        [Output("groupSubtree")]
        public Output<bool?> GroupSubtree { get; private set; } = null!;

        /// <summary>
        /// Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups).
        /// Required if ldapGroupsAsRoles is true.
        /// </summary>
        [Output("groupType")]
        public Output<string> GroupType { get; private set; } = null!;

        /// <summary>
        /// LDAP server connection hostname
        /// </summary>
        [Output("host")]
        public Output<string> Host { get; private set; } = null!;

        /// <summary>
        /// Denotes whether LDAP assigned roles are used as Nexus Repository Manager roles
        /// </summary>
        [Output("ldapGroupsAsRoles")]
        public Output<bool?> LdapGroupsAsRoles { get; private set; } = null!;

        /// <summary>
        /// How many retry attempts
        /// </summary>
        [Output("maxIncidentCount")]
        public Output<int> MaxIncidentCount { get; private set; } = null!;

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

        /// <summary>
        /// LDAP server connection port to use
        /// </summary>
        [Output("port")]
        public Output<int> Port { get; private set; } = null!;

        /// <summary>
        /// LDAP server connection Protocol to use
        /// </summary>
        [Output("protocol")]
        public Output<string> Protocol { get; private set; } = null!;

        /// <summary>
        /// LDAP location to be added to the connection URL
        /// </summary>
        [Output("searchBase")]
        public Output<string> SearchBase { get; private set; } = null!;

        /// <summary>
        /// Whether to use certificates stored in Nexus Repository Manager's truststore
        /// </summary>
        [Output("useTrustStore")]
        public Output<bool?> UseTrustStore { get; private set; } = null!;

        /// <summary>
        /// The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to
        /// form the full User search base DN.
        /// </summary>
        [Output("userBaseDn")]
        public Output<string?> UserBaseDn { get; private set; } = null!;

        /// <summary>
        /// This is used to find an email address given the user ID
        /// </summary>
        [Output("userEmailAddressAttribute")]
        public Output<string?> UserEmailAddressAttribute { get; private set; } = null!;

        /// <summary>
        /// This is used to find a user given its user ID
        /// </summary>
        [Output("userIdAttribute")]
        public Output<string?> UserIdAttribute { get; private set; } = null!;

        /// <summary>
        /// LDAP search filter to limit user search
        /// </summary>
        [Output("userLdapFilter")]
        public Output<string?> UserLdapFilter { get; private set; } = null!;

        /// <summary>
        /// Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is
        /// dynamic
        /// </summary>
        [Output("userMemberOfAttribute")]
        public Output<string?> UserMemberOfAttribute { get; private set; } = null!;

        /// <summary>
        /// LDAP class for user objects
        /// </summary>
        [Output("userObjectClass")]
        public Output<string?> UserObjectClass { get; private set; } = null!;

        /// <summary>
        /// If this field is blank the user will be authenticated against a bind with the LDAP server
        /// </summary>
        [Output("userPasswordAttribute")]
        public Output<string?> UserPasswordAttribute { get; private set; } = null!;

        /// <summary>
        /// This is used to find a real name given the user ID
        /// </summary>
        [Output("userRealNameAttribute")]
        public Output<string?> UserRealNameAttribute { get; private set; } = null!;

        /// <summary>
        /// Are users located in structures below the user base DN?
        /// </summary>
        [Output("userSubtree")]
        public Output<bool?> UserSubtree { get; private set; } = null!;


        /// <summary>
        /// Create a NexusSecurityLdap 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 NexusSecurityLdap(string name, NexusSecurityLdapArgs args, CustomResourceOptions? options = null)
            : base("nexus:index/nexusSecurityLdap:NexusSecurityLdap", name, args ?? new NexusSecurityLdapArgs(), MakeResourceOptions(options, ""))
        {
        }

        private NexusSecurityLdap(string name, Input<string> id, NexusSecurityLdapState? state = null, CustomResourceOptions? options = null)
            : base("nexus:index/nexusSecurityLdap:NexusSecurityLdap", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/SimCubeLtd/pulumi-nexus/releases/download/v${VERSION}",
            };
            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 NexusSecurityLdap 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 NexusSecurityLdap Get(string name, Input<string> id, NexusSecurityLdapState? state = null, CustomResourceOptions? options = null)
        {
            return new NexusSecurityLdap(name, id, state, options);
        }
    }

    public sealed class NexusSecurityLdapArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The password to bind with. Required if authScheme other than none.
        /// </summary>
        [Input("authPassword")]
        public Input<string>? AuthPassword { get; set; }

        /// <summary>
        /// The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5
        /// </summary>
        [Input("authRealm")]
        public Input<string>? AuthRealm { get; set; }

        /// <summary>
        /// Authentication scheme used for connecting to LDAP server
        /// </summary>
        [Input("authSchema", required: true)]
        public Input<string> AuthSchema { get; set; } = null!;

        /// <summary>
        /// This must be a fully qualified username if simple authentication is used. Required if authScheme other than none.
        /// </summary>
        [Input("authUsername", required: true)]
        public Input<string> AuthUsername { get; set; } = null!;

        /// <summary>
        /// How long to wait before retrying
        /// </summary>
        [Input("connectionRetryDelaySeconds", required: true)]
        public Input<int> ConnectionRetryDelaySeconds { get; set; } = null!;

        /// <summary>
        /// How long to wait before timeout
        /// </summary>
        [Input("connectionTimeoutSeconds", required: true)]
        public Input<int> ConnectionTimeoutSeconds { get; set; } = null!;

        /// <summary>
        /// The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to
        /// form the full Group search base DN.
        /// </summary>
        [Input("groupBaseDn")]
        public Input<string>? GroupBaseDn { get; set; }

        /// <summary>
        /// This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static
        /// </summary>
        [Input("groupIdAttribute")]
        public Input<string>? GroupIdAttribute { get; set; }

        /// <summary>
        /// LDAP attribute containing the usernames for the group. Required if groupType is static
        /// </summary>
        [Input("groupMemberAttribute")]
        public Input<string>? GroupMemberAttribute { get; set; }

        /// <summary>
        /// The format of user ID stored in the group member attribute. Required if groupType is static
        /// </summary>
        [Input("groupMemberFormat")]
        public Input<string>? GroupMemberFormat { get; set; }

        /// <summary>
        /// LDAP class for group objects. Required if groupType is static
        /// </summary>
        [Input("groupObjectClass")]
        public Input<string>? GroupObjectClass { get; set; }

        /// <summary>
        /// Are groups located in structures below the group base DN
        /// </summary>
        [Input("groupSubtree")]
        public Input<bool>? GroupSubtree { get; set; }

        /// <summary>
        /// Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups).
        /// Required if ldapGroupsAsRoles is true.
        /// </summary>
        [Input("groupType", required: true)]
        public Input<string> GroupType { get; set; } = null!;

        /// <summary>
        /// LDAP server connection hostname
        /// </summary>
        [Input("host", required: true)]
        public Input<string> Host { get; set; } = null!;

        /// <summary>
        /// Denotes whether LDAP assigned roles are used as Nexus Repository Manager roles
        /// </summary>
        [Input("ldapGroupsAsRoles")]
        public Input<bool>? LdapGroupsAsRoles { get; set; }

        /// <summary>
        /// How many retry attempts
        /// </summary>
        [Input("maxIncidentCount", required: true)]
        public Input<int> MaxIncidentCount { get; set; } = null!;

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

        /// <summary>
        /// LDAP server connection port to use
        /// </summary>
        [Input("port", required: true)]
        public Input<int> Port { get; set; } = null!;

        /// <summary>
        /// LDAP server connection Protocol to use
        /// </summary>
        [Input("protocol", required: true)]
        public Input<string> Protocol { get; set; } = null!;

        /// <summary>
        /// LDAP location to be added to the connection URL
        /// </summary>
        [Input("searchBase", required: true)]
        public Input<string> SearchBase { get; set; } = null!;

        /// <summary>
        /// Whether to use certificates stored in Nexus Repository Manager's truststore
        /// </summary>
        [Input("useTrustStore")]
        public Input<bool>? UseTrustStore { get; set; }

        /// <summary>
        /// The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to
        /// form the full User search base DN.
        /// </summary>
        [Input("userBaseDn")]
        public Input<string>? UserBaseDn { get; set; }

        /// <summary>
        /// This is used to find an email address given the user ID
        /// </summary>
        [Input("userEmailAddressAttribute")]
        public Input<string>? UserEmailAddressAttribute { get; set; }

        /// <summary>
        /// This is used to find a user given its user ID
        /// </summary>
        [Input("userIdAttribute")]
        public Input<string>? UserIdAttribute { get; set; }

        /// <summary>
        /// LDAP search filter to limit user search
        /// </summary>
        [Input("userLdapFilter")]
        public Input<string>? UserLdapFilter { get; set; }

        /// <summary>
        /// Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is
        /// dynamic
        /// </summary>
        [Input("userMemberOfAttribute")]
        public Input<string>? UserMemberOfAttribute { get; set; }

        /// <summary>
        /// LDAP class for user objects
        /// </summary>
        [Input("userObjectClass")]
        public Input<string>? UserObjectClass { get; set; }

        /// <summary>
        /// If this field is blank the user will be authenticated against a bind with the LDAP server
        /// </summary>
        [Input("userPasswordAttribute")]
        public Input<string>? UserPasswordAttribute { get; set; }

        /// <summary>
        /// This is used to find a real name given the user ID
        /// </summary>
        [Input("userRealNameAttribute")]
        public Input<string>? UserRealNameAttribute { get; set; }

        /// <summary>
        /// Are users located in structures below the user base DN?
        /// </summary>
        [Input("userSubtree")]
        public Input<bool>? UserSubtree { get; set; }

        public NexusSecurityLdapArgs()
        {
        }
    }

    public sealed class NexusSecurityLdapState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The password to bind with. Required if authScheme other than none.
        /// </summary>
        [Input("authPassword")]
        public Input<string>? AuthPassword { get; set; }

        /// <summary>
        /// The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5
        /// </summary>
        [Input("authRealm")]
        public Input<string>? AuthRealm { get; set; }

        /// <summary>
        /// Authentication scheme used for connecting to LDAP server
        /// </summary>
        [Input("authSchema")]
        public Input<string>? AuthSchema { get; set; }

        /// <summary>
        /// This must be a fully qualified username if simple authentication is used. Required if authScheme other than none.
        /// </summary>
        [Input("authUsername")]
        public Input<string>? AuthUsername { get; set; }

        /// <summary>
        /// How long to wait before retrying
        /// </summary>
        [Input("connectionRetryDelaySeconds")]
        public Input<int>? ConnectionRetryDelaySeconds { get; set; }

        /// <summary>
        /// How long to wait before timeout
        /// </summary>
        [Input("connectionTimeoutSeconds")]
        public Input<int>? ConnectionTimeoutSeconds { get; set; }

        /// <summary>
        /// The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to
        /// form the full Group search base DN.
        /// </summary>
        [Input("groupBaseDn")]
        public Input<string>? GroupBaseDn { get; set; }

        /// <summary>
        /// This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static
        /// </summary>
        [Input("groupIdAttribute")]
        public Input<string>? GroupIdAttribute { get; set; }

        /// <summary>
        /// LDAP attribute containing the usernames for the group. Required if groupType is static
        /// </summary>
        [Input("groupMemberAttribute")]
        public Input<string>? GroupMemberAttribute { get; set; }

        /// <summary>
        /// The format of user ID stored in the group member attribute. Required if groupType is static
        /// </summary>
        [Input("groupMemberFormat")]
        public Input<string>? GroupMemberFormat { get; set; }

        /// <summary>
        /// LDAP class for group objects. Required if groupType is static
        /// </summary>
        [Input("groupObjectClass")]
        public Input<string>? GroupObjectClass { get; set; }

        /// <summary>
        /// Are groups located in structures below the group base DN
        /// </summary>
        [Input("groupSubtree")]
        public Input<bool>? GroupSubtree { get; set; }

        /// <summary>
        /// Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups).
        /// Required if ldapGroupsAsRoles is true.
        /// </summary>
        [Input("groupType")]
        public Input<string>? GroupType { get; set; }

        /// <summary>
        /// LDAP server connection hostname
        /// </summary>
        [Input("host")]
        public Input<string>? Host { get; set; }

        /// <summary>
        /// Denotes whether LDAP assigned roles are used as Nexus Repository Manager roles
        /// </summary>
        [Input("ldapGroupsAsRoles")]
        public Input<bool>? LdapGroupsAsRoles { get; set; }

        /// <summary>
        /// How many retry attempts
        /// </summary>
        [Input("maxIncidentCount")]
        public Input<int>? MaxIncidentCount { get; set; }

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

        /// <summary>
        /// LDAP server connection port to use
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// LDAP server connection Protocol to use
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// LDAP location to be added to the connection URL
        /// </summary>
        [Input("searchBase")]
        public Input<string>? SearchBase { get; set; }

        /// <summary>
        /// Whether to use certificates stored in Nexus Repository Manager's truststore
        /// </summary>
        [Input("useTrustStore")]
        public Input<bool>? UseTrustStore { get; set; }

        /// <summary>
        /// The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to
        /// form the full User search base DN.
        /// </summary>
        [Input("userBaseDn")]
        public Input<string>? UserBaseDn { get; set; }

        /// <summary>
        /// This is used to find an email address given the user ID
        /// </summary>
        [Input("userEmailAddressAttribute")]
        public Input<string>? UserEmailAddressAttribute { get; set; }

        /// <summary>
        /// This is used to find a user given its user ID
        /// </summary>
        [Input("userIdAttribute")]
        public Input<string>? UserIdAttribute { get; set; }

        /// <summary>
        /// LDAP search filter to limit user search
        /// </summary>
        [Input("userLdapFilter")]
        public Input<string>? UserLdapFilter { get; set; }

        /// <summary>
        /// Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is
        /// dynamic
        /// </summary>
        [Input("userMemberOfAttribute")]
        public Input<string>? UserMemberOfAttribute { get; set; }

        /// <summary>
        /// LDAP class for user objects
        /// </summary>
        [Input("userObjectClass")]
        public Input<string>? UserObjectClass { get; set; }

        /// <summary>
        /// If this field is blank the user will be authenticated against a bind with the LDAP server
        /// </summary>
        [Input("userPasswordAttribute")]
        public Input<string>? UserPasswordAttribute { get; set; }

        /// <summary>
        /// This is used to find a real name given the user ID
        /// </summary>
        [Input("userRealNameAttribute")]
        public Input<string>? UserRealNameAttribute { get; set; }

        /// <summary>
        /// Are users located in structures below the user base DN?
        /// </summary>
        [Input("userSubtree")]
        public Input<bool>? UserSubtree { get; set; }

        public NexusSecurityLdapState()
        {
        }
    }
}
