-
Notifications
You must be signed in to change notification settings - Fork 38
/
base.definition.schema.v1.json
303 lines (303 loc) · 14 KB
/
base.definition.schema.v1.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.cloudformation.us-east-1.amazonaws.com/base.definition.schema.v1.json",
"title": "CloudFormation Provider Base Definition MetaSchema",
"description": "All the basic building blocks for the provider definition schemas are in this schema to maintain consistency among different provider definition schemas. Provider definition schemas could refer to this schema for using basic things like properties, definitions etc.",
"definitions": {
"httpsUrl": {
"type": "string",
"pattern": "^https://[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])(:[0-9]*)*([?/#].*)?$",
"maxLength": 4096
},
"jsonPointerArray": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"format": "json-pointer"
}
},
"schemaArray": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/properties"
}
},
"validations": {
"dependencies": {
"enum": {
"$comment": "Enforce that properties are strongly typed when enum, or const is specified.",
"required": [
"type"
]
},
"const": {
"required": [
"type"
]
},
"properties": {
"$comment": "An object cannot have both defined and undefined properties; therefore, patternProperties is not allowed when properties is specified.",
"not": {
"required": [
"patternProperties"
]
}
}
}
},
"properties": {
"allOf": [
{
"$ref": "#/definitions/validations"
},
{
"$comment": "The following subset of draft-07 property references is supported for resource definitions. Nested properties are disallowed and should be specified as a $ref to a definitions block.",
"type": "object",
"properties": {
"insertionOrder": {
"description": "When set to true, this flag indicates that the order of insertion of the array will be honored, and that changing the order of the array would indicate a diff",
"type": "boolean",
"default": true
},
"arrayType": {
"description": "When set to AttributeList, it indicates that the array is of nested type objects, and when set to Standard it indicates that the array consists of primitive types",
"type": "string",
"default": "Standard",
"enum": [
"Standard",
"AttributeList"
]
},
"$ref": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$ref"
},
"$comment": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$comment"
},
"title": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/description"
},
"examples": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/examples"
},
"default": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/default"
},
"multipleOf": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/maxLength"
},
"minLength": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/minLength"
},
"pattern": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/pattern"
},
"items": {
"$comment": "Redefined as just a schema. A list of schemas is not allowed",
"$ref": "#/definitions/properties",
"default": {}
},
"maxItems": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/maxItems"
},
"minItems": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/minItems"
},
"uniqueItems": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/uniqueItems"
},
"contains": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/contains"
},
"maxProperties": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/maxProperties"
},
"minProperties": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/minProperties"
},
"required": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/required"
},
"properties": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9]{1,64}$": {
"$ref": "#/definitions/properties"
}
},
"additionalProperties": false,
"minProperties": 1
},
"additionalProperties": {
"$comment": "All properties of a resource must be expressed in the schema - arbitrary inputs are not allowed",
"type": "boolean",
"const": false
},
"patternProperties": {
"$comment": "patternProperties allow providers to introduce a specification for key-value pairs, or Map inputs.",
"type": "object",
"propertyNames": {
"format": "regex"
}
},
"dependencies": {
"$comment": "Redefined to capture our properties override.",
"type": "object",
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/properties"
},
{
"$ref": "http://json-schema.org/draft-07/schema#/definitions/stringArray"
}
]
}
},
"const": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/const"
},
"enum": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/enum"
},
"type": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/type"
},
"format": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/format"
},
"allOf": {
"$ref": "#/definitions/schemaArray"
},
"anyOf": {
"$ref": "#/definitions/schemaArray"
},
"oneOf": {
"$ref": "#/definitions/schemaArray"
}
},
"additionalProperties": false
}
]
}
},
"type": "object",
"patternProperties": {
"^\\$id$": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$id"
}
},
"properties": {
"$schema": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$schema"
},
"typeName": {
"$comment": "Resource Type Identifier",
"examples": [
"Organization::Service::Resource",
"AWS::EC2::Instance",
"Initech::TPS::Report"
],
"type": "string",
"pattern": "^[a-zA-Z0-9]{2,64}::[a-zA-Z0-9]{2,64}::[a-zA-Z0-9]{2,64}$"
},
"$comment": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$comment"
},
"title": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/title"
},
"description": {
"$comment": "A short description of the resource provider. This will be shown in the AWS CloudFormation console.",
"$ref": "http://json-schema.org/draft-07/schema#/properties/description"
},
"sourceUrl": {
"$comment": "The location of the source code for this resource provider, to help interested parties submit issues or improvements.",
"examples": [
"https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-s3"
],
"$ref": "#/definitions/httpsUrl"
},
"documentationUrl": {
"$comment": "A page with supplemental documentation. The property documentation in schemas should be able to stand alone, but this is an opportunity for e.g. rich examples or more guided documents.",
"examples": [
"https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/CHAP_Using.html"
],
"$ref": "#/definitions/httpsUrl"
},
"additionalProperties": {
"$comment": "All properties of a resource must be expressed in the schema - arbitrary inputs are not allowed",
"type": "boolean",
"const": false
},
"properties": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9]{1,64}$": {
"$ref": "#/definitions/properties"
}
},
"additionalProperties": false,
"minProperties": 1
},
"definitions": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9]{1,64}$": {
"$ref": "#/definitions/properties"
}
},
"additionalProperties": false
},
"remote": {
"description": "Reserved for CloudFormation use. A namespace to inline remote schemas.",
"type": "object",
"patternProperties": {
"^schema[0-9]+$": {
"description": "Reserved for CloudFormation use. A inlined remote schema.",
"type": "object",
"properties": {
"$comment": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/$comment"
},
"properties": {
"$ref": "#/properties/properties"
},
"definitions": {
"$ref": "#/properties/definitions"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
},
"deprecatedProperties": {
"description": "A list of JSON pointers to properties that have been deprecated by the underlying service provider. These properties are still accepted in create & update operations, however they may be ignored, or converted to a consistent model on application. Deprecated properties are not guaranteed to be present in read paths.",
"$ref": "#/definitions/jsonPointerArray"
},
"required": {
"$ref": "http://json-schema.org/draft-07/schema#/properties/required"
}
}
}