Files
sql-server-samples/samples/manage/sql-assessment-api/docs/Customization/RulesetFileStructure.md
T
Aleksei Guzev 0c5f2ef62a Update SQL Assessment API docs
- Fix image references
- Add target pattern page
- Add message template page
2022-09-30 00:22:05 +03:00

2.0 KiB

Ruleset file structure

Rule set is stored in a text file that contains a JSON object. The rule set object has three simple mandatory properties: name, version, and schemaVersion. The latter specifies the file format version. As of the time of writing this document, the file format version is 1.0. The name and version properties comprise the identity of the set.

An essential part of a ruleset is the optional rules property that stores an array of SQL Assessment API rules. Rules are used to build a checklist. For more information, see Understanding Rules and Probes.

The optional probes property contains definitions for probes. Probes are used to get actual data from target SQL Server instances, hosting machines, and other sources. Each probe definition is a JSON array of one or more implementations. For more information, see Probes.

The rules and probes properties are optional because rules from one ruleset can use probes from another one.

Ruleset Structure

{
     "name": "Ruleset name",
     "version": "Ruleset version",
     "schemaVersion": "Schema version",
     "rules":[
          {
                rule A 
          },
          {
                rule B 
          },

          
     ],
     "probes":{
          "probe1": [
               {
                     implementation 1 
               },
               {
                     implementation 2 
               },

                              
          ],
          "probe2": [
               
          ],

          
     }
}

Ruleset examples: