DSCResources/DSC_SqlScriptQuery/DSC_SqlScriptQuery.schema.mof

[ClassVersion("1.0.0.0"), FriendlyName("SqlScriptQuery")]
class DSC_SqlScriptQuery : OMI_BaseResource
{
    [Key, Description("Unique identifier for this resource. Set this to a unique value - allowing multiple resources with only the Variable parameter changing. The information entered is never used during the actual process of running the scripts.")] String Id;
    [Key, Description("Specifies the name of the _SQL Server Database Engine_ instance. For the default instance specify the value `'MSSQLSERVER'`.")] String InstanceName;
    [Key, Description("Full T-SQL query that will perform _Get_ action. Any values returned by the T-SQL queries will also be returned when calling _Get_ (for example by using the cmdlet `Get-DscConfiguration`) through the `'GetResult'` property.")] String GetQuery;
    [Key, Description("Full T-SQL query that will perform _Test_ action. Any script that does not throw an error or returns `NULL` is evaluated to `$true`. The cmdlet `Invoke-SqlCmd` treats T-SQL `PRINT` statements as verbose text, and will not cause the test to return `$false`.")] String TestQuery;
    [Key, Description("Full T-SQL query that will perform _Set_ action.")] String SetQuery;
    [Write, Description("Specifies the host name of the _SQL Server_ to be configured. Default value is the current computer name.")] String ServerName;
    [Write, EmbeddedInstance("MSFT_Credential"), Description("The credentials to authenticate with, using _SQL Server Authentication_. To authenticate using _Windows Authentication_, assign the credentials to the built-in parameter **PsDscRunAsCredential**. If neither of the parameters **Credential** and **PsDscRunAsCredential** are assigned then the SYSTEM account will be used to authenticate using _Windows Authentication_.")] String Credential;
    [Write, Description("Specifies, as a string array, a scripting variable for use in the sql script, and sets a value for the variable. Use a _Windows PowerShell_ array to specify multiple variables and their values. For more information how to use this, please go to the help documentation for [Invoke-SqlCmd](https://docs.microsoft.com/en-us/powershell/module/sqlserver/Invoke-SqlCmd).")] String Variable[];
    [Write, Description("Specifies, as a boolean, whether or not PowerShell will ignore `Invoke-SqlCmd` scripting variables that share a format such as `$(variable_name)`. For more information how to use this, please go to the help documentation for [Invoke-SqlCmd](https://docs.microsoft.com/en-us/powershell/module/sqlserver/Invoke-SqlCmd).")] Boolean DisableVariables;
    [Write, Description("Specifies, as an integer, the number of seconds after which the T-SQL script execution will time out. In some _SQL Server_ versions there is a bug in `Invoke-SqlCmd` where the normal default value `0` (no timeout) is not respected and the default value is incorrectly set to 30 seconds.")] UInt32 QueryTimeout;
    [Write, Description("Specifies how encryption should be enforced when using command `Invoke-SqlCmd`. When not specified, the default value is `Mandatory`."), ValueMap{"Mandatory","Optional","Strict"}, Values{"Mandatory","Optional","Strict"}] String Encrypt;
    [Read, Description("Returns the result from the T-SQL script provided in the parameter **GetQuery** when _Get_ was called.")] String GetResult[];
};