DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof

/*
**Description**
 
This resource is responsible for managing the search crawl rules in the search service application.
You can create new rules, change existing rules and remove existing rules.
 
**Example**
 
    SPSearchCrawlRule IntranetCrawlAccount
    {
        Path = "https://intranet.sharepoint.contoso.com"
        ServiceAppName = "Search Service Application"
        Ensure = "Present"
        RuleType = "InclusionRule"
        CrawlConfigurationRules = "FollowLinksNoPageCrawl","CrawlComplexUrls", "CrawlAsHTTP"
        AuthenticationType = "DefaultRuleAccess"
    }
 
    SPSearchCrawlRule IntranetCrawlAccountCertificate
    {
        Path = "https://intranet.sharepoint.contoso.com"
        ServiceAppName = "Search Service Application"
        Ensure = "Present"
        RuleType = "InclusionRule"
        CrawlConfigurationRules = "FollowLinksNoPageCrawl","CrawlComplexUrls", "CrawlAsHTTP"
        AuthenticationType = "CertificateRuleAccess"
        CertificateName = "Certificate Name"
    }
*/
 
[ClassVersion("1.0.0.0"), FriendlyName("SPSearchCrawlRule")]
class MSFT_SPSearchCrawlRule : OMI_BaseResource
{
    [Key, Description("The name of the search service application")] string Path;
    [Required, Description("The name of the search service application")] string ServiceAppName;
    [Write, Description("Authentication type used by the crawl rule"), ValueMap{"DefaultRuleAccess","BasicAccountRuleAccess","CertificateRuleAccess","NTLMAccountRuleAccess","FormRuleAccess","CookieRuleAccess","AnonymousAccess"}, Values{"DefaultRuleAccess","BasicAccountRuleAccess","CertificateRuleAccess","NTLMAccountRuleAccess","FormRuleAccess","CookieRuleAccess","AnonymousAccess"}] string AuthenticationType;
    [Write, Description("The type of the rule"), ValueMap{"InclusionRule","ExclusionRule"}, Values{"InclusionRule","ExclusionRule"}] string RuleType;
    [Write, Description("The configuration options for this rule"), ValueMap{"FollowLinksNoPageCrawl","CrawlComplexUrls","CrawlAsHTTP"}, Values{"FollowLinksNoPageCrawl","CrawlComplexUrls","CrawlAsHTTP"}] string CrawlConfigurationRules[];
    [Write, Description("The credentials used for this crawl rule (used for types BasicAccountRuleAccess and NTLMAccountRuleAccess)"), EmbeddedInstance("MSFT_Credential")] String AuthenticationCredentials;
    [Write, Description("The certificate used for this crawl rule (used for type CertificateRuleAccess)")] string CertificateName;
    [Write, Description("Present if the service app should exist, absent if it should not"), 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;
};