Skip to content

Commit 91529ec

Browse files
committed
Update policy rule schema
1 parent f78ab4c commit 91529ec

File tree

2 files changed

+993
-7
lines changed

2 files changed

+993
-7
lines changed

schemas/2020-09-01/policyDefinition.json

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "https://schema.management.azure.com/schemas/2019-09-01/policyDefinition.json#",
2+
"id": "https://schema.management.azure.com/schemas/2020-09-01/policyDefinition.json#",
33
"$schema": "http://json-schema.org/draft-04/schema#",
44
"title": "Policy Definition",
55
"description": "This schema defines Azure resource policy definition, please see https://azure.microsoft.com/documentation/articles/resource-manager-policy/ for more details.",
@@ -20,7 +20,7 @@
2020
"oneOf": [
2121
{
2222
"type": "string",
23-
"enum": [ "append", "audit", "auditIfNotExists", "deny", "deployIfNotExists", "modify", "disabled" ]
23+
"enum": [ "append", "audit", "auditIfNotExists", "deny", "deployIfNotExists", "manual", "modify", "disabled" ]
2424
},
2525
{ "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" }
2626
]
@@ -29,7 +29,8 @@
2929
"oneOf": [
3030
{ "$ref": "#/definitions/ifNotExistsDetails" },
3131
{ "$ref": "#/definitions/appendDetails" },
32-
{ "$ref": "#/definitions/modifyDetails" }
32+
{ "$ref": "#/definitions/modifyDetails" },
33+
{ "$ref": "#/definitions/manualDetails" }
3334
]
3435
}
3536
},
@@ -106,8 +107,15 @@
106107
"type": "object",
107108
"properties": {
108109
"conflictEffect": {
109-
"type": "string",
110-
"enum": [ "deny", "audit" ]
110+
"oneOf": [
111+
{
112+
"type": "string",
113+
"enum": [ "audit", "deny" ]
114+
},
115+
{
116+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
117+
}
118+
]
111119
},
112120
"roleDefinitionIds": {
113121
"type": "array",
@@ -129,7 +137,7 @@
129137
"value": {
130138
},
131139
"condition": {
132-
"type": "string"
140+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
133141
}
134142
},
135143
"required": [
@@ -145,6 +153,23 @@
145153
"required": [ "roleDefinitionIds", "operations" ],
146154
"additionalProperties": false
147155
},
156+
"manualDetails": {
157+
"type": "object",
158+
"properties": {
159+
"defaultState": {
160+
"oneOf": [
161+
{
162+
"type": "string",
163+
"enum": [ "Compliant", "NonCompliant", "Unknown" ]
164+
},
165+
{
166+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
167+
}
168+
]
169+
}
170+
},
171+
"additionalProperties": false
172+
},
148173
"condition": {
149174
"allOf": [
150175
{
@@ -369,7 +394,10 @@
369394
{
370395
"properties": {
371396
"value": {
372-
"type": [ "array", "string" ]
397+
"oneOf": [
398+
{ "type": "array" },
399+
{ "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" }
400+
]
373401
},
374402
"name": {
375403
"type": "string"

0 commit comments

Comments
 (0)