DSCResources/DSC_SqlDatabaseUser/DSC_SqlDatabaseUser.schema.mof

[ClassVersion("1.0.0.0"), FriendlyName("SqlDatabaseUser")]
class DSC_SqlDatabaseUser : OMI_BaseResource
{
    [Key, Description("Specifies the name of the database user to be added or removed.")] String Name;
    [Key, Description("Specifies the _SQL Server_ instance in which the database exist.")] String InstanceName;
    [Key, Description("Specifies the name of the database in which to configure the database user.")] String DatabaseName;
    [Write, Description("Specifies the host name of the _SQL Server_ on which the instance exist. Default value is the current computer name.")] String ServerName;
    [Write, Description("Specifies the name of the login to associate with the database user. This must be specified if parameter **UserType** is set to `'Login'`.")] String LoginName;
    [Write, Description("Specifies the name of the asymmetric key to associate with the database user. This must be specified if parameter **UserType** is set to `'AsymmetricKey'`.")] String AsymmetricKeyName;
    [Write, Description("Specifies the name of the certificate to associate with the database user. This must be specified if parameter **UserType** is set to `'Certificate'`.")] String CertificateName;
    [Write, Description("Specifies the type of the database user. Default value is `'NoLogin'`."), ValueMap{"Login", "NoLogin", "Certificate", "AsymmetricKey"}, Values{"Login", "NoLogin", "Certificate", "AsymmetricKey"}] String UserType;
    [Write, Description("Specifies if the database user should be present or absent. If `'Present'` then the database user will be added to the database and, if needed, the login mapping will be updated. If `'Absent'` then the database user will be removed from the database. Default value is `'Present'`."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure;
    [Write, Description("Specifies if it is allowed to re-create the database user if either the user type, the asymmetric key, or the certificate changes. Default value is `$false` not allowing database users to be re-created.")] Boolean Force;
    [Read, Description("Returns the authentication type of the login connected to the database user. This will return either `'Windows'`, `'Instance'`, or `'None'`. The value `'Windows'` means the login is using _Windows Authentication_, `'Instance'` means that the login is using _SQL Authentication_, and `'None'` means that the database user have no login connected to it.")] String AuthenticationType;
    [Read, Description("Returns the login type of the login connected to the database user. If no login is connected to the database user this returns `$null`.")] String LoginType;
};