PSRule-language.schema.json
{ "$schema": "http://json-schema.org/draft-07/schema#", "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" } ], "definitions": { "resource-metadata": { "type": "object", "title": "Metadata", "description": "Additional information to identify the resource.", "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the resource. This must be unique.", "minLength": 3 }, "annotations": { "type": "object", "title": "Annotations" }, "tags": { "type": "object", "title": "Tags", "additionalProperties": { "type": "string" } } }, "required": [ "name" ] }, "baseline-v1": { "type": "object", "title": "Baseline", "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "apiVersion": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule Baseline resource.", "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "enum": [ "Baseline" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/baselineSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "additionalProperties": false }, "baselineSpec": { "type": "object", "title": "Spec", "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "type": "object", "title": "Rule", "description": "A filter for included or excluded rules.", "properties": { "include": { "type": "array", "title": "Include rules", "description": "Rules to include by name in the baseline.", "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "$ref": "#/definitions/rule-names" }, "exclude": { "type": "array", "title": "Exclude rules", "description": "Rules to exclude by name from the baseline.", "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "$ref": "#/definitions/rule-names" }, "tag": { "type": "object", "title": "Tags", "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "additionalProperties": { "oneOf": [ { "type": "string", "description": "A required tag." }, { "type": "array", "description": "A required tag.", "items": { "type": "string" }, "uniqueItems": true } ] } } }, "additionalProperties": false } }, "additionalProperties": false }, "moduleConfig-v1": { "type": "object", "title": "ModuleConfig", "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/moduleConfigSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "additionalProperties": false }, "moduleConfigSpec": { "type": "object", "title": "Spec", "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "type": "object", "title": "Output options", "description": "Options that affect how output is generated.", "properties": { "culture": { "type": "array", "title": "Culture", "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "items": { "type": "string", "description": "A culture for generating output.", "minLength": 2 }, "uniqueItems": true, "defaultSnippets": [ { "label": "en-AU", "bodyText": [ "en-AU" ] }, { "label": "en-US", "bodyText": [ "en-US" ] }, { "label": "en-GB", "bodyText": [ "en-GB" ] } ] } }, "additionalProperties": false }, "rule": { "type": "object", "title": "Rule", "description": "A filter for included or excluded rules.", "properties": { "baseline": { "type": "string", "title": "Baseline", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#rulebaseline)", "$ref": "#/definitions/rule-names" } }, "additionalProperties": false } }, "additionalProperties": false }, "rule-names": { "type": "array", "items": { "type": "string", "$ref": "#/definitions/rule-name" }, "uniqueItems": true }, "rule-name": { "type": "string", "minLength": 3 }, "binding-option": { "type": "object", "title": "Object binding", "description": "Configure property/ object binding options.", "properties": { "field": { "type": "object", "title": "Field", "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "additionalProperties": { "type": "array", "description": "A custom field to bind.", "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "items": { "type": "string" }, "uniqueItems": true } }, "ignoreCase": { "type": "boolean", "title": "Ignore case", "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "default": true }, "nameSeparator": { "type": "string", "title": "Name separator", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "default": "/" }, "preferTargetInfo": { "type": "boolean", "title": "Prefer target info", "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "default": false }, "targetName": { "type": "array", "title": "Bind TargetName", "description": "Specifies one or more property names to bind TargetName to.", "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "items": { "type": "string" }, "uniqueItems": true }, "targetType": { "type": "array", "title": "Bind TargetType", "description": "Specifies one or more property names to bind TargetType to.", "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "items": { "type": "string" }, "uniqueItems": true }, "useQualifiedName": { "type": "boolean", "title": "Use qualified name", "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "default": false } }, "additionalProperties": false }, "configuration": { "type": "object", "title": "Configuration values", "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "defaultSnippets": [ { "label": "Configuration value", "body": { "${1:Key}": "${2:Value}" } } ] }, "convention-option": { "type": "object", "title": "Convention options", "description": "Options that configure conventions.", "properties": { "include": { "type": "array", "title": "Include conventions", "description": "An ordered list of conventions to include.", "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#conventioninclude)", "items": { "type": "string" }, "uniqueItems": true } }, "additionalProperties": false }, "selector-v1": { "type": "object", "title": "Selector", "description": "A PSRule Selector.", "markdownDescription": "A PSRule Selector. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html)", "properties": { "apiVersion": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule Selector resource.", "enum": [ "Selector" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/selectorSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ] }, "selectorSpec": { "type": "object", "title": "Spec", "description": "PSRule selector specification.", "properties": { "if": { "type": "object", "$ref": "#/definitions/selectorExpression" } }, "required": [ "if" ], "additionalProperties": false }, "rule-v1": { "type": "object", "title": "Rule", "description": "A PSRule Rule.", "markdownDescription": "A PSRule Rule. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Rules.html)", "properties": { "apiVersion": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule Rule resource.", "enum": [ "Rule" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/ruleSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ] }, "ruleSpec": { "type": "object", "title": "Spec", "description": "PSRule rule specification.", "properties": { "condition": { "type": "object", "$ref": "#/definitions/selectorExpression" }, "type": { "type": "array", "title": "Type pre-condition", "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "uniqueItems": true }, "with": { "type": "array", "title": "Selector pre-condition", "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "uniqueItems": true } }, "required": [ "condition" ], "additionalProperties": false }, "selectorExpression": { "type": "object", "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ] }, "selectorOperator": { "type": "object", "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ] }, "selectorCondition": { "type": "object", "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" } ] }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "type": "string", "title": "Field", "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)" } }, "required": [ "field" ] }, "selectorPropertyType": { "properties": { "type": { "type": "string", "title": "Type", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#type)", "default": "." } }, "required": [ "type" ] }, "selectorPropertyName": { "properties": { "name": { "type": "string", "title": "Name", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#name)", "default": "." } }, "required": [ "name" ] }, "selectorOperatorAllOf": { "type": "object", "properties": { "allOf": { "type": "array", "title": "AllOf", "description": "All of the expressions must be true.", "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#allof)", "items": { "$ref": "#/definitions/selectorExpression" } } }, "required": [ "allOf" ], "additionalProperties": false }, "selectorOperatorAnyOf": { "type": "object", "properties": { "anyOf": { "type": "array", "title": "AnyOf", "description": "One of the expressions must be true.", "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#anyof)", "items": { "$ref": "#/definitions/selectorExpression" } } }, "required": [ "anyOf" ], "additionalProperties": false }, "selectorOperatorNot": { "type": "object", "properties": { "not": { "type": "object", "title": "Not", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#not)", "$ref": "#/definitions/selectorExpression" } }, "required": [ "not" ] }, "selectorConditionExists": { "type": "object", "properties": { "exists": { "type": "boolean", "title": "Exists", "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#exists)" }, "field": { "type": "string", "title": "Field", "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)" } }, "required": [ "exists", "field" ] }, "selectorConditionEquals": { "type": "object", "properties": { "equals": { "oneOf": [ { "type": "string", "title": "Equals", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)" }, { "type": "integer", "title": "Equals", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)" }, { "type": "boolean", "title": "Equals", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)" } ] } }, "required": [ "equals" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionNotEquals": { "type": "object", "properties": { "notEquals": { "oneOf": [ { "type": "string", "title": "Not Equals", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)" }, { "type": "integer", "title": "Not Equals", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)" }, { "type": "boolean", "title": "Not Equals", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)" } ] } }, "required": [ "notEquals" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionHasValue": { "type": "object", "properties": { "hasValue": { "type": "boolean", "title": "Has Value", "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasvalue)" } }, "required": [ "hasValue" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionMatch": { "type": "object", "properties": { "match": { "type": "string", "title": "Match", "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#match)" } }, "required": [ "match" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionNotMatch": { "type": "object", "properties": { "notMatch": { "type": "string", "title": "Not Match", "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notmatch)" } }, "required": [ "notMatch" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionIn": { "type": "object", "properties": { "in": { "type": "array", "title": "In", "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#in)" } }, "required": [ "in" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionNotIn": { "type": "object", "properties": { "notIn": { "type": "array", "title": "Not In", "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notin)" } }, "required": [ "notIn" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionSetOf": { "type": "object", "properties": { "setOf": { "type": "array", "title": "SetOf", "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)" }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "default": false } }, "required": [ "setOf" ], "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ] }, "selectorConditionSubset": { "type": "object", "properties": { "subset": { "type": "array", "title": "Subset", "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)" }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "default": false }, "unique": { "type": "boolean", "title": "Unique", "description": "Determines each of the field values must be unique.", "markdownDescription": "Determines each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "default": false } }, "required": [ "subset" ], "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ] }, "selectorConditionCount": { "type": "object", "properties": { "count": { "type": "integer", "title": "Count", "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#count)", "minimum": 0 } }, "required": [ "count" ], "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ] }, "selectorConditionLess": { "type": "object", "properties": { "less": { "type": "integer", "title": "Less", "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#less)" } }, "required": [ "less" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionLessOrEquals": { "type": "object", "properties": { "lessOrEquals": { "type": "integer", "title": "Less or Equal to", "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#lessorequals)" } }, "required": [ "lessOrEquals" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionGreater": { "type": "object", "properties": { "greater": { "type": "integer", "title": "Greater", "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greater)" } }, "required": [ "greater" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionGreaterOrEquals": { "type": "object", "properties": { "greaterOrEquals": { "type": "integer", "title": "Greater or Equal to", "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greaterorequals)" } }, "required": [ "greaterOrEquals" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionStartsWith": { "type": "object", "properties": { "startsWith": { "title": "Starts with", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#startswith)", "$ref": "#/definitions/selectorExpressionValueMultiString" } }, "required": [ "startsWith" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionEndsWith": { "type": "object", "properties": { "endsWith": { "title": "Ends with", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#endswith)", "$ref": "#/definitions/selectorExpressionValueMultiString" } }, "required": [ "endsWith" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionContains": { "type": "object", "properties": { "contains": { "title": "Contains", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#contains)", "$ref": "#/definitions/selectorExpressionValueMultiString" } }, "required": [ "contains" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionIsString": { "type": "object", "properties": { "isString": { "type": "boolean", "title": "Is string", "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isstring)" } }, "required": [ "isString" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionIsLower": { "type": "object", "properties": { "isLower": { "type": "boolean", "title": "Is Lowercase", "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#islower)" } }, "required": [ "isLower" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorConditionIsUpper": { "type": "object", "properties": { "isUpper": { "type": "boolean", "title": "Is Uppercase", "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isupper)" } }, "required": [ "isUpper" ], "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "uniqueItems": true } ] } } } |