DSCResources/MSFT_xSPDatabaseAAG/MSFT_xSPDatabaseAAG.schema.mof

/*
**Description**
 
This resource will allow specifying which SQL Server AlwaysOn Availability group a resource should be in.
This resource does not configure the Availability Groups on SQL Server, they must already exist.
It simply adds the specified database to the group.
 
 
**Example**
 
    xSPDatabaseAAG ConfigDBAAG
    {
        DatabaseName = "SP_Config"
        AGName = "MyAvailabilityGroup"
        FileShare = "\\SQL\Backups"
        Ensure = "Present"
        PsDscRunAsCredential = $InstallAccount
    }s
*/
[ClassVersion("1.0.0.0"), FriendlyName("xSPDatabaseAAG")]
class MSFT_xSPDatabaseAAG : OMI_BaseResource
{
    [Key, Description("The name of the database to put in the AlwaysOn group")] string DatabaseName;
    [Required, Description("Name of the AlwaysOn group on the SQL server - this must already exist")] string AGName;
    [Write, Description("The fileshare to use for the SQL backup when adding to the group")] string FileShare;
    [Required, Description("Present if the database should be in this AlwaysOn group, or Absent if it should not be in the group"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
    [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};