Resources/Schema/New-CmAzCoreAutomation.Schema.json

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "New-CmAzCoreAutomation",
    "type": "object",
    "title": "New-CmAzCoreAutomation",
    "description": "Settings Root.",
    "required": [
        "service",
        "automation"
    ],
    "properties": {
        "component": {
            "$id": "#/component",
            "type": ["string", "null"],
            "title": "Component",
            "description": "Value to determine what cmdlet should be dynamically loaded for these settings."
        },
        "service": {
            "$id": "#/service",
            "type": "object",
            "title": "Service",
            "description": "Contains dependency and publish details for service location.",
            "required": [
                "dependencies",
                "publish"
            ],
            "properties": {
                "dependencies": {
                    "$id": "#/service/dependencies",
                    "type": "object",
                    "title": "Dependencies",
                    "description": "Contains dependency details for service location.",
                    "required": [
                        "workspace"
                    ],
                    "properties": {
                        "keyvault": {
                            "$id": "#/service/dependencies/keyvault",
                            "type": ["string", "null"],
                            "title": "Keyvault",
                            "description": "Dependency value to fetch existing resource type."
                        },
                        "workspace": {
                            "$id": "#/service/dependencies/workspace",
                            "type": "string",
                            "title": "Workspace",
                            "description": "Dependency value to fetch existing resource type."
                        },
                        "vnet": {
                            "$id": "#/service/dependencies/vnet",
                            "type": ["string", "null"],
                            "title": "Vnet",
                            "description": "Global default dependency value to fetch existing resource type."
                        },
                        "privateZones": {
                            "$id": "#/service/dependencies/privateZones",
                            "type": ["array", "null"],
                            "title": "PrivateZones",
                            "description": "Dependency value to fetch existing resource type. Enables private zone integration."
                        }
                    },
                    "additionalProperties": false
                },
                "publish": {
                    "$id": "#/service/publish",
                    "type": "object",
                    "title": "Publish",
                    "description": "Contains publish details for service location.",
                    "required": [
                        "automation",
                        "resourceGroup"
                    ],
                    "properties": {
                        "resourceGroup": {
                            "$id": "#/service/publish/resourceGroup",
                            "type": "string",
                            "title": "ResourceGroup",
                            "description": "Value to publish on deployed resource type."
                        },
                        "automation": {
                            "$id": "#/service/publish/automation",
                            "type": "string",
                            "title": "Automation",
                            "description": "Value to publish on deployed resource type."
                        },
                        "privateEndpoint": {
                            "$id": "#/service/publish/privateEndpoint",
                            "type": ["string", "null"],
                            "title": "PrivateEndpoint",
                            "description": "Global default value to publish on deployed resource type."
                        }
                    },
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        },
        "automation": {
            "$id": "#/automation",
            "type": "object",
            "title": "Automation",
            "description": "Contains details required to deploy an Automation Account.",
            "required": [
                "name",
                "location"
            ],
            "properties": {
                "location": {
                    "$id": "#/automation/location",
                    "type": "string",
                    "title": "Location",
                    "description": "Automation account deployment location."
                },
                "name": {
                    "$id": "#/automation/name",
                    "type": "string",
                    "title": "Name",
                    "description": "Becomes part of the generated automation account name."
                },
                "managedIdentity": {
                    "$id": "#/automation/managedIdentity",
                    "type": ["object", "null"],
                    "title": "ManagedIdentity",
                    "description": "Configure system assigned managed identity. *Preview",
                    "properties": {
                        "scope": {
                            "$id": "#/automation/managedIdentity/scope",
                            "type": ["string", "null"],
                            "title": "Scope",
                            "description": "Scope of managed identity.",
                            "default": "/Subscription/<Context subscription Id>/"
                        },
                        "role": {
                            "$id": "#/automation/managedIdentity/role",
                            "type": ["string", "null"],
                            "title": "role",
                            "description": "Azure role to be assinged to managed identity of automation account. Use None to disable this feature.",
                            "default": "Contributor"
                        },
                        "enabled": {
                            "$id": "#/automation/managedIdentity/enabled",
                            "type": ["boolean", "null"],
                            "title": "Enabled",
                            "description": "Create managed identity.",
                            "default": true
                        }
                    }
                },
                "sourceControl": {
                    "$id": "#/automation/sourceControl",
                    "type": ["object", "null"],
                    "title": "SourceControl",
                    "description": "Container for an existing repo in source control.",
                    "required": [
                        "url",
                        "keyVaultPersonalAccessToken",
                        "type"
                    ],
                    "properties": {
                        "keyVaultPersonalAccessToken": {
                            "$id": "#/automation/sourceControl/keyVaultPersonalAccessToken",
                            "type": ["string", "null"],
                            "title": "KeyVaultPersonalAccessToken",
                            "description": "Secret name of PAT token in existing key vault to access repo."
                        },
                        "url": {
                            "$id": "#/automation/sourceControl/url",
                            "type": ["string", "null"],
                            "title": "Url",
                            "description": "Url of source control repo."
                        },
                        "type": {
                            "$id": "#/automation/sourceControl/type",
                            "type": ["string", "null"],
                            "title": "Type",
                            "description": "Type of repo e.g Github.",
                            "default": "github"
                        },
                        "branch": {
                            "$id": "#/automation/sourceControl/branch",
                            "type": ["string", "null"],
                            "title": "Branch",
                            "description": "Existing branch within repo.",
                            "default": "master"
                        },
                        "folderPath": {
                            "$id": "#/automation/sourceControl/folderPath",
                            "type": ["string", "null"],
                            "title": "FolderPath",
                            "description": "Directory path of Runbook or DSC files.",
                            "default": "/"
                        },
                        "service": {
                            "$id": "#/automation/privateEndpoints/items/allOf/service",
                            "type": ["object", "null"],
                            "title": "Service",
                            "description": "Contains dependency and publish details for service location.",
                            "properties": {
                                "dependencies": {
                                    "$id": "#/automation/privateEndpoints/items/allOf/service/dependencies",
                                    "type": ["object", "null"],
                                    "title": "Dependencies",
                                    "description": "Contains dependency details for service location.",
                                    "properties": {
                                        "keyvault": {
                                            "$id": "#/service/dependencies/keyvault",
                                            "type": ["string", "null"],
                                            "title": "Keyvault",
                                            "description": "Dependency value to fetch existing resource type."
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "additionalProperties": false
                },
                "privateEndpoints": {
                    "$id": "#/automation/privateEndpoints",
                    "type": ["array", "null"],
                    "title": "PrivateEndpoints",
                    "description": "Container for private endpoint details.",
                    "items": {
                        "$id": "#/automation/privateEndpoints/items",
                        "allOf": [
                            {
                                "$id": "#/automation/privateEndpoints/items/allOf",
                                "type": "object",
                                "required": [
                                    "subnetName",
                                    "subResourceName"
                                ],
                                "properties": {
                                    "subnetName": {
                                        "$id": "#/automation/privateEndpoints/items/allOf/subnetName",
                                        "type": "string",
                                        "title": "SubnetName",
                                        "description": "Names of underlying sub-resources to create private connection with."
                                    },
                                    "name": {
                                        "$id": "#/automation/privateEndpoints/items/allOf/name",
                                        "type": ["string", "null"],
                                        "title": "Name",
                                        "description": "Becomes part of private endpoint name."
                                    },
                                    "subResourceName": {
                                        "$id": "#/automation/privateEndpoints/items/allOf/subResourceNames",
                                        "type": "string",
                                        "title": "SubResourceName",
                                        "enum": ["Webhook", "DSCAndHybridWorker"],
                                        "description": "Names of underlying sub-resources to create private connection with."
                                    },
                                    "service": {
                                        "$id": "#/automation/privateEndpoints/items/allOf/service",
                                        "type": ["object", "null"],
                                        "title": "Service",
                                        "description": "Contains dependency and publish details for service location.",
                                        "properties": {
                                            "dependencies": {
                                                "$id": "#/automation/privateEndpoints/items/allOf/service/dependencies",
                                                "type": ["object", "null"],
                                                "title": "Dependencies",
                                                "description": "Contains dependency details for service location.",
                                                "properties": {
                                                    "vnet": {
                                                        "$id": "#/automation/privateEndpoints/items/allOf/service/dependencies/vnet",
                                                        "type": ["string", "null"],
                                                        "title": "Vnet",
                                                        "description": "Local overriding dependency value to fetch existing resource type."
                                                    },
                                                    "privateZones": {
                                                        "$id": "#/automation/privateEndpoints/items/allOf/service/dependencies/privateZones",
                                                        "type": ["array", "null"],
                                                        "title": "PrivateZones",
                                                        "description": "Dependency value to fetch existing resource type. Enables private zone integration."
                                                    }
                                                },
                                                "additionalProperties": false
                                            },
                                            "publish": {
                                                "$id": "#/automation/privateEndpoints/items/allOf/service/publish",
                                                "type": "object",
                                                "title": "Publish",
                                                "description": "Contains publish details for service location.",
                                                "properties": {
                                                    "privateEndpoint": {
                                                        "$id": "#/automation/privateEndpoints/items/allOf/service/publish/privateEndpoint",
                                                        "type": "string",
                                                        "title": "PrivateEndpoint",
                                                        "description": "Local overriding value to publish on deployed resource type."
                                                    }
                                                },
                                                "additionalProperties": false
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                },
                                "additionalProperties": false
                            }
                        ]
                    }
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}