DSCResources/DSC_SqlAGDatabase/DSC_SqlAGDatabase.schema.mof

[ClassVersion("1.0.0.0"), FriendlyName("SqlAGDatabase")]
class DSC_SqlAGDatabase : OMI_BaseResource
{
    [Required, Description("The name of the database(s) to add to the availability group. This accepts wildcards.")] String DatabaseName[];
    [Key, Description("Hostname of the _SQL Server_ where the primary replica of the availability group lives. If the availability group is not currently on this server, the resource will attempt to connect to the server where the primary replica lives.")] String ServerName;
    [Key, Description("Name of the _SQL Server_ instance where the primary replica of the availability group lives. If the availability group is not currently on this instance, the resource will attempt to connect to the instance where the primary replica lives.")] String InstanceName;
    [Key, Description("The name of the availability group in which to manage the database membership(s).")] String AvailabilityGroupName;
    [Required, Description("The path used to seed the availability group replicas. This should be a path that is accessible by all of the replicas.")] String BackupPath;
    [Write, Description("Specifies the membership of the database(s) in the availability group. The option `'Present'` means that the defined database(s) are added to the availability group. All other databases that may be a member of the availability group are ignored. The option `'Absent'` means that the defined database(s) are removed from the availability group. All other databases that may be a member of the availability group are ignored. The default is `'Present'`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
    [Write, Description("When parameter **Ensure** is set to `'Present'` it ensures the specified database(s) are the only databases that are a member of the specified Availability Group. This parameter is ignored when parameter **Ensure** is set to `'Absent'`.")] Boolean Force;
    [Write, Description("If set to `$true`, this ensures the database owner of the database on the primary replica is the owner of the database on all secondary replicas. This requires the database owner is available as a login on all replicas and that the **PsDscRunAsCredential** has _impersonate any login_, _control server_, _impersonate login_, or _control login_ permissions. If set to `$false`, the owner of the database will be the username specified in **PsDscRunAsCredential**. The default is `$false`.")] Boolean MatchDatabaseOwner;
    [Write, Description("If set to `$true`, this adds the restore option `WITH REPLACE`. If set to `$false`, existing databases and files will block the restore and throw error. The default is `$false`.")] Boolean ReplaceExisting;
    [Write, Description("Specifies that the resource will only determine if a change is needed if the target node is the active host of the _SQL Server_ instance.")] Boolean ProcessOnlyOnActiveNode;
    [Read, Description("Returns if the current node is actively hosting the _SQL Server_ instance.")] Boolean IsActiveNode;
};