|
3 | 3 | "additionalProperties": false,
|
4 | 4 | "definitions": {
|
5 | 5 | "Action": {
|
6 |
| - "anyOf": [ |
7 |
| - { |
8 |
| - "$ref": "#/definitions/Wildcard" |
9 |
| - }, |
10 |
| - { |
11 |
| - "$ref": "#/definitions/StringOrStringArray" |
12 |
| - } |
13 |
| - ], |
14 | 6 | "cfnLint": [
|
15 | 7 | "AWS::IAM::Policy/Properties/PolicyDocument/Statement/Action"
|
| 8 | + ], |
| 9 | + "items": { |
| 10 | + "type": "string" |
| 11 | + }, |
| 12 | + "type": [ |
| 13 | + "string", |
| 14 | + "array" |
16 | 15 | ]
|
17 | 16 | },
|
18 | 17 | "AwsArn": {
|
19 |
| - "pattern": "(^arn:(aws|aws-cn|aws-us-gov):[^:]+:[^:]*(:(?:\\d{12}|\\*|aws)?:.+|)|\\*)$", |
20 |
| - "type": "string" |
| 18 | + "pattern": "(^arn:(aws|aws-cn|aws-us-gov):[^:]+:[^:]*(:(?:\\d{12}|\\*|aws)?:.+|)|\\*)$" |
21 | 19 | },
|
22 | 20 | "AwsPrincipalArn": {
|
23 | 21 | "anyOf": [
|
24 | 22 | {
|
25 |
| - "pattern": "^((arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:(?:root|user|group|role)|\\*)|\\d{12})" |
| 23 | + "const": "*" |
| 24 | + }, |
| 25 | + { |
| 26 | + "pattern": "^\\d{12}$" |
| 27 | + }, |
| 28 | + { |
| 29 | + "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:(?:root|user|group|role)" |
26 | 30 | },
|
27 | 31 | {
|
28 | 32 | "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::cloudfront:user/.+$"
|
29 | 33 | }
|
30 |
| - ], |
31 |
| - "type": "string" |
| 34 | + ] |
| 35 | + }, |
| 36 | + "Boolean": { |
| 37 | + "enum": [ |
| 38 | + "true", |
| 39 | + "false", |
| 40 | + true, |
| 41 | + false |
| 42 | + ] |
| 43 | + }, |
| 44 | + "Booleans": { |
| 45 | + "if": { |
| 46 | + "type": [ |
| 47 | + "string", |
| 48 | + "boolean" |
| 49 | + ] |
| 50 | + }, |
| 51 | + "items": { |
| 52 | + "$ref": "#/definitions/Boolean", |
| 53 | + "type": [ |
| 54 | + "string", |
| 55 | + "boolean" |
| 56 | + ] |
| 57 | + }, |
| 58 | + "then": { |
| 59 | + "$ref": "#/definitions/Boolean" |
| 60 | + }, |
| 61 | + "type": [ |
| 62 | + "string", |
| 63 | + "array", |
| 64 | + "boolean" |
| 65 | + ] |
32 | 66 | },
|
33 | 67 | "Condition": {
|
34 | 68 | "patternProperties": {
|
|
114 | 148 | },
|
115 | 149 | "Null": {
|
116 | 150 | "additionalProperties": {
|
117 |
| - "scalarOrArray": { |
118 |
| - "enum": [ |
119 |
| - "true", |
120 |
| - "false", |
121 |
| - true, |
122 |
| - false |
123 |
| - ] |
124 |
| - } |
| 151 | + "$ref": "#/definitions/Booleans" |
125 | 152 | },
|
126 | 153 | "type": "object"
|
127 | 154 | }
|
|
130 | 157 | },
|
131 | 158 | "ConditionSetValue": {
|
132 | 159 | "additionalProperties": {
|
133 |
| - "$ref": "#/definitions/StringArray" |
| 160 | + "items": { |
| 161 | + "type": "string" |
| 162 | + }, |
| 163 | + "type": "array" |
134 | 164 | },
|
135 | 165 | "type": "object"
|
136 | 166 | },
|
137 | 167 | "ConditionValue": {
|
138 | 168 | "additionalProperties": {
|
139 |
| - "anyOf": [ |
140 |
| - { |
141 |
| - "$ref": "#/definitions/StringOrStringArray" |
142 |
| - }, |
143 |
| - { |
144 |
| - "type": "boolean" |
145 |
| - }, |
146 |
| - { |
147 |
| - "type": "number" |
148 |
| - } |
| 169 | + "items": { |
| 170 | + "type": "string" |
| 171 | + }, |
| 172 | + "type": [ |
| 173 | + "boolean", |
| 174 | + "number", |
| 175 | + "string", |
| 176 | + "array" |
149 | 177 | ]
|
150 | 178 | },
|
151 | 179 | "type": "object"
|
|
156 | 184 | },
|
157 | 185 | "properties": {
|
158 | 186 | "AWS": {
|
159 |
| - "scalarOrArray": { |
160 |
| - "$ref": "#/definitions/AwsPrincipalArn" |
161 |
| - } |
| 187 | + "$ref": "#/definitions/AwsPrincipalArn", |
| 188 | + "items": { |
| 189 | + "$ref": "#/definitions/AwsPrincipalArn", |
| 190 | + "type": "string" |
| 191 | + }, |
| 192 | + "type": [ |
| 193 | + "string", |
| 194 | + "array" |
| 195 | + ] |
162 | 196 | },
|
163 | 197 | "CanonicalUser": {
|
164 |
| - "$ref": "#/definitions/StringOrStringArray" |
| 198 | + "items": { |
| 199 | + "type": "string" |
| 200 | + }, |
| 201 | + "type": [ |
| 202 | + "string", |
| 203 | + "array" |
| 204 | + ] |
165 | 205 | },
|
166 | 206 | "Federated": {
|
167 |
| - "$ref": "#/definitions/StringOrStringArray" |
| 207 | + "items": { |
| 208 | + "type": "string" |
| 209 | + }, |
| 210 | + "type": [ |
| 211 | + "string", |
| 212 | + "array" |
| 213 | + ] |
168 | 214 | },
|
169 | 215 | "Service": {
|
170 |
| - "scalarOrArray": { |
| 216 | + "items": { |
171 | 217 | "type": "string"
|
172 |
| - } |
| 218 | + }, |
| 219 | + "type": [ |
| 220 | + "string", |
| 221 | + "array" |
| 222 | + ] |
173 | 223 | }
|
174 | 224 | },
|
175 | 225 | "then": {
|
|
181 | 231 | ]
|
182 | 232 | },
|
183 | 233 | "Resource": {
|
184 |
| - "scalarOrArray": { |
185 |
| - "$ref": "#/definitions/AwsArn" |
186 |
| - } |
| 234 | + "$ref": "#/definitions/AwsArn", |
| 235 | + "items": { |
| 236 | + "$ref": "#/definitions/AwsArn", |
| 237 | + "type": "string" |
| 238 | + }, |
| 239 | + "type": [ |
| 240 | + "string", |
| 241 | + "array" |
| 242 | + ] |
187 | 243 | },
|
188 | 244 | "Statement": {
|
189 | 245 | "additionalProperties": false,
|
|
252 | 308 | },
|
253 | 309 | "required": [
|
254 | 310 | "Effect"
|
255 |
| - ], |
256 |
| - "type": "object" |
257 |
| - }, |
258 |
| - "StringArray": { |
259 |
| - "type": "string" |
260 |
| - }, |
261 |
| - "StringOrStringArray": { |
262 |
| - "scalarOrArray": { |
263 |
| - "$ref": "#/definitions/StringArray" |
264 |
| - } |
| 311 | + ] |
265 | 312 | },
|
266 | 313 | "Wildcard": {
|
267 | 314 | "const": "*"
|
|
272 | 319 | "type": "string"
|
273 | 320 | },
|
274 | 321 | "Statement": {
|
275 |
| - "scalarOrArray": { |
276 |
| - "$ref": "#/definitions/Statement" |
277 |
| - } |
| 322 | + "$ref": "#/definitions/Statement", |
| 323 | + "items": { |
| 324 | + "$ref": "#/definitions/Statement", |
| 325 | + "type": "object" |
| 326 | + }, |
| 327 | + "type": [ |
| 328 | + "object", |
| 329 | + "array" |
| 330 | + ] |
278 | 331 | },
|
279 | 332 | "Version": {
|
280 | 333 | "cfnLint": [
|
|
0 commit comments