From 717d480152d32b991e28b87ba18bbd4d762c49ce Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 23 Jun 2023 15:34:16 -0400 Subject: [PATCH] 06/23/2023 CFN Resource Provider Definition Schema. --- testdata/provider.definition.schema.v1.json | 68 ++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/testdata/provider.definition.schema.v1.json b/testdata/provider.definition.schema.v1.json index 4b3fa4d..1d32814 100644 --- a/testdata/provider.definition.schema.v1.json +++ b/testdata/provider.definition.schema.v1.json @@ -4,6 +4,57 @@ "title": "CloudFormation Resource Provider Definition MetaSchema", "description": "This schema validates a CloudFormation resource provider definition.", "definitions": { + "handlerSchema": { + "type": "object", + "properties": { + "properties": { + "$ref": "file://./base.definition.schema.v1.json#/properties/properties" + }, + "required": { + "$ref": "file://./base.definition.schema.v1.json#/properties/required" + }, + "allOf": { + "$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray" + }, + "anyOf": { + "$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray" + }, + "oneOf": { + "$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray" + } + }, + "required": [ + "properties" + ], + "additionalProperties": false + }, + "handlerDefinitionWithSchemaOverride": { + "description": "Defines any execution operations which can be performed on this resource provider", + "type": "object", + "properties": { + "handlerSchema": { + "$ref": "#/definitions/handlerSchema" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false + }, + "timeoutInMinutes": { + "description": "Defines the timeout for the entire operation to be interpreted by the invoker of the handler. The default is 120 (2 hours).", + "type": "integer", + "minimum": 2, + "maximum": 2160, + "default": 120 + } + }, + "additionalProperties": false, + "required": [ + "permissions" + ] + }, "handlerDefinition": { "description": "Defines any execution operations which can be performed on this resource provider", "type": "object", @@ -145,6 +196,13 @@ "description": "A reference to the Tags property in the schema.", "$ref": "http://json-schema.org/draft-07/schema#/properties/$ref", "default": "/properties/Tags" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false } }, "required": [ @@ -183,7 +241,7 @@ "$ref": "#/definitions/handlerDefinition" }, "list": { - "$ref": "#/definitions/handlerDefinition" + "$ref": "#/definitions/handlerDefinitionWithSchemaOverride" } }, "additionalProperties": false @@ -204,6 +262,14 @@ "description": "A list of JSON pointers for properties that can only be updated under certain conditions. For example, you can upgrade the engine version of an RDS DBInstance but you cannot downgrade it. When updating this property for a resource in a CloudFormation stack, the resource will be replaced if it cannot be updated.", "$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray" }, + "nonPublicProperties": { + "description": "A list of JSON pointers for properties that are hidden. These properties will still be used but will not be visible", + "$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray" + }, + "nonPublicDefinitions": { + "description": "A list of JSON pointers for definitions that are hidden. These definitions will still be used but will not be visible", + "$ref": "file://./base.definition.schema.v1.json#/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": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray"