-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathprovider.definition.schema.v1.json
369 lines (369 loc) · 16.9 KB
/
provider.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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "provider.definition.schema.v1.json",
"title": "CloudFormation Resource Provider Definition MetaSchema",
"description": "This schema validates a CloudFormation resource provider definition.",
"definitions": {
"handlerDefinition": {
"description": "Defines any execution operations which can be performed on this resource provider",
"type": "object",
"properties": {
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"additionalItems": false
}
},
"additionalItems": false,
"required": [
"permissions"
]
},
"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": false
},
"readOnly": {
"description": "A list of properties that are able to be found in a Read request but unable to be specified by the customer",
"$ref": "https://json-schema.org/draft-07/schema#/definitions/stringArray"
},
"writeOnly": {
"description": "A list of properties (typically sensitive) that are able to be specified by the customer but unable to be returned in a Read request",
"$ref": "https://json-schema.org/draft-07/schema#/definitions/stringArray"
},
"$ref": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/$ref"
},
"$comment": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/$comment"
},
"title": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/title"
},
"description": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/description"
},
"examples": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/examples"
},
"default": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/default"
},
"multipleOf": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/maxLength"
},
"minLength": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/minLength"
},
"pattern": {
"$ref": "https://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": "https://json-schema.org/draft-07/schema#/properties/maxItems"
},
"minItems": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/minItems"
},
"uniqueItems": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/uniqueItems"
},
"contains": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/contains"
},
"maxProperties": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/maxProperties"
},
"minProperties": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/minProperties"
},
"required": {
"$ref": "https://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": "https://json-schema.org/draft-07/schema#/definitions/stringArray"
}
]
}
},
"const": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/const"
},
"enum": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/enum"
},
"type": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/type"
},
"format": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/format"
},
"allOf": {
"$ref": "#/definitions/schemaArray"
},
"anyOf": {
"$ref": "#/definitions/schemaArray"
},
"oneOf": {
"$ref": "#/definitions/schemaArray"
}
},
"additionalProperties": false
}
]
}
},
"type": "object",
"properties": {
"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": "https://json-schema.org/draft-07/schema#/properties/$comment"
},
"title": {
"$ref": "https://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": "https://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"
],
"type": "string"
},
"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"
],
"type": "string"
},
"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
},
"handlers": {
"description": "Defines the provisioning operations which can be performed on this resource type",
"type": "object",
"properties": {
"create": {
"$ref": "#/definitions/handlerDefinition"
},
"read": {
"$ref": "#/definitions/handlerDefinition"
},
"update": {
"$ref": "#/definitions/handlerDefinition"
},
"delete": {
"$ref": "#/definitions/handlerDefinition"
},
"list": {
"$ref": "#/definitions/handlerDefinition"
}
},
"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": "https://json-schema.org/draft-07/schema#/properties/$comment"
},
"properties": {
"$ref": "#/properties/properties"
},
"definitions": {
"$ref": "#/properties/definitions"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
},
"readOnlyProperties": {
"description": "A list of JSON pointers to properties that are able to be found in a Read request but unable to be specified by the customer",
"$ref": "#/definitions/jsonPointerArray"
},
"writeOnlyProperties": {
"description": "A list of JSON pointers to properties (typically sensitive) that are able to be specified by the customer but unable to be returned in a Read request",
"$ref": "#/definitions/jsonPointerArray"
},
"createOnlyProperties": {
"description": "A list of JSON pointers to properties that are only able to be specified by the customer when creating a resource. Conversely, any property *not* in this list can be applied to an Update request.",
"$ref": "#/definitions/jsonPointerArray"
},
"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"
},
"primaryIdentifier": {
"description": "A required identifier which uniquely identifies an instance of this resource type. An identifier is a non-zero-length list of JSON pointers to properties that form a single key. An identifier can be a single or multiple properties to support composite-key identifiers.",
"$ref": "#/definitions/jsonPointerArray"
},
"additionalIdentifiers": {
"description": "An optional list of supplementary identifiers, each of which uniquely identifies an instance of this resource type. An identifier is a non-zero-length list of JSON pointers to properties that form a single key. An identifier can be a single or multiple properties to support composite-key identifiers.",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/jsonPointerArray"
}
},
"required": {
"$ref": "https://json-schema.org/draft-07/schema#/properties/required"
},
"allOf": {
"$ref": "#/definitions/schemaArray"
},
"anyOf": {
"$ref": "#/definitions/schemaArray"
},
"oneOf": {
"$ref": "#/definitions/schemaArray"
}
},
"required": [
"typeName",
"properties",
"description",
"primaryIdentifier"
],
"additionalProperties": false
}