Created
April 10, 2015 18:49
-
-
Save vors/81ef0a81f4e46da84331 to your computer and use it in GitHub Desktop.
Experimental json schema of DSC azure extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "id": "http://schema.management.azure.com/schemas/2014-04-01/Microsoft.Powershell.DSC.json", | |
| "title": "Microsoft.Powershell.DSC", | |
| "description": "Microsoft.Powershell.DSC Extension for Azure VMs", | |
| "definitions": { | |
| "DscConfigurationArguments": { | |
| "oneOf": [ | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "Name": { | |
| "type": "string" | |
| }, | |
| "Value": { | |
| } | |
| } | |
| }, | |
| "description" : "Array of name-value pairs. This format was introduced to support complex types such as PSCredential." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Hashtable." | |
| } | |
| ] | |
| }, | |
| "DscConfigurationFunction": { | |
| "type": "string", | |
| "pattern": "(^[\\w,\\s]+\\.ps1\\\\[\\w]+$)", | |
| "description": "The ConfigurationFunction in the form: SampleConfiguration.ps1\\SampleConfiguration, where SampleConfiguration.ps1 is filename in the zip archive, passed to ModulesUrl and SampleConfiguration is a name of the Configuration in SampleConfiguration.ps1 file to use." | |
| }, | |
| "DscConfigurationFunctionForGallery": { | |
| "type": "string", | |
| "pattern": "(^[\\w,\\s]+\\\\[\\w]+$)", | |
| "description": "The ConfigurationFunction in the form: ModuleName\\SampleConfiguration, where ModuleName is name of the module from PSGallery, containing Configuration and SampleConfiguration is a name of the Configuration to use." | |
| }, | |
| "DscProtectedSettingsItems": { | |
| "type": "object", | |
| "description": "Hashtable in the form \"Items\": { \"UserPassword\": \"password123\". It's used in public settings in form: \"Value\": { \"UserName\": \"foo\", \"Password\": \"PrivateSettingsRef:UserPassword\"" | |
| }, | |
| "DscPublicSettings": { | |
| "oneOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "SasToken": { | |
| "type": "string" | |
| }, | |
| "ModulesUrl": { | |
| "type": "string" | |
| }, | |
| "Properties": { | |
| "$ref": "#/definitions/DscConfigurationArguments" | |
| }, | |
| "ConfigurationFunction": { | |
| "$ref": "#/definitions/DscConfigurationFunction" | |
| }, | |
| "WmfVersion": { | |
| "type": [ "string", "null" ] | |
| } | |
| }, | |
| "required": [ | |
| "ConfigurationFunction", | |
| "ModulesUrl" | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "ModuleName": { | |
| "type": [ "string", "null" ] | |
| }, | |
| "ModuleVersion": { | |
| "type": [ "string", "null" ] | |
| }, | |
| "ModuleSource": { | |
| "type": [ "string", "null" ] | |
| }, | |
| "Properties": { | |
| "$ref": "#/definitions/DscConfigurationArguments" | |
| }, | |
| "ConfigurationFunction": { | |
| "$ref": "#/definitions/DscConfigurationFunctionForGallery" | |
| }, | |
| "WmfVersion": { | |
| "type": [ "string", "null" ] | |
| } | |
| }, | |
| "required": [ | |
| "ModuleName", | |
| "ModuleVersion", | |
| "ModuleSource", | |
| "ConfigurationFunction" | |
| ] | |
| } | |
| ] | |
| }, | |
| "DscProtectedSettings": { | |
| "type": "object", | |
| "properties": { | |
| "DataBlobUri": { | |
| "type": [ "string", "null" ] | |
| }, | |
| "Items": { | |
| "$ref": "#/definitions/DscProtectedSettingsItems" | |
| } | |
| } | |
| } | |
| }, | |
| "type": "object", | |
| "properties": { | |
| "publisher": { | |
| "type": "string", | |
| "description": "Microsoft.Powershell" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "description": "DSC" | |
| }, | |
| "typeHandlerVersion": { | |
| "type": "string", | |
| "description": "1.7" | |
| }, | |
| "settings": { | |
| "$ref": "#/definitions/DscPublicSettings" | |
| }, | |
| "protectedSettings": { | |
| "$ref": "#/definitions/DscProtectedSettings" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment