diff --git a/schemas/2022-02-14/Microsoft.VirtualMachineImages.json b/schemas/2022-02-14/Microsoft.VirtualMachineImages.json index 43c87237fc..8f7cb3e1c6 100644 --- a/schemas/2022-02-14/Microsoft.VirtualMachineImages.json +++ b/schemas/2022-02-14/Microsoft.VirtualMachineImages.json @@ -85,10 +85,6 @@ } }, "definitions": { - "Componentsvrq145schemasimagetemplateidentitypropertiesuserassignedidentitiesadditionalproperties": { - "type": "object", - "properties": {} - }, "ImageTemplateCustomizer": { "type": "object", "oneOf": [ @@ -214,7 +210,7 @@ { "type": "object", "additionalProperties": { - "$ref": "#/definitions/Componentsvrq145schemasimagetemplateidentitypropertiesuserassignedidentitiesadditionalproperties" + "$ref": "#/definitions/UserAssignedIdentity" }, "properties": {} }, @@ -222,7 +218,7 @@ "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" } ], - "description": "The list of user identities associated with the image template. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'." + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests." } }, "description": "Identity for the image template." @@ -950,6 +946,11 @@ ], "description": "Purchase plan configuration for platform image." }, + "UserAssignedIdentity": { + "type": "object", + "properties": {}, + "description": "User assigned identity properties" + }, "VirtualNetworkConfig": { "type": "object", "properties": { diff --git a/schemas/2022-07-01/Microsoft.VirtualMachineImages.json b/schemas/2022-07-01/Microsoft.VirtualMachineImages.json new file mode 100644 index 0000000000..ef743d0c8f --- /dev/null +++ b/schemas/2022-07-01/Microsoft.VirtualMachineImages.json @@ -0,0 +1,1307 @@ +{ + "id": "https://schema.management.azure.com/schemas/2022-07-01/Microsoft.VirtualMachineImages.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.VirtualMachineImages", + "description": "Microsoft VirtualMachineImages Resource Types", + "resourceDefinitions": { + "imageTemplates": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-07-01" + ] + }, + "identity": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateIdentity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Identity for the image template." + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the image Template" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the properties of an image template" + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/imageTemplates_triggers_childResource" + } + ] + } + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.VirtualMachineImages/imageTemplates" + ] + } + }, + "required": [ + "apiVersion", + "identity", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.VirtualMachineImages/imageTemplates" + }, + "imageTemplates_triggers": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-07-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the trigger" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/TriggerProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the properties of a trigger" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.VirtualMachineImages/imageTemplates/triggers" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.VirtualMachineImages/imageTemplates/triggers" + } + }, + "definitions": { + "DistributeVersioner": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/DistributeVersionerLatest" + }, + { + "$ref": "#/definitions/DistributeVersionerSource" + } + ], + "properties": {}, + "description": "Describes how to generate new x.y.z version number for distribution." + }, + "DistributeVersionerLatest": { + "type": "object", + "properties": { + "major": { + "oneOf": [ + { + "type": "integer", + "minimum": -1, + "default": "-1" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Major version for the generated version number. Determine what is \"latest\" based on versions with this value as the major version. -1 is equivalent to leaving it unset." + }, + "scheme": { + "type": "string", + "enum": [ + "Latest" + ] + } + }, + "required": [ + "scheme" + ], + "description": "Generates version number that will be latest based on existing version numbers." + }, + "DistributeVersionerSource": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "Source" + ] + } + }, + "required": [ + "scheme" + ], + "description": "Generates version number based on version number of source image" + }, + "ImageTemplateCustomizer": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateShellCustomizer" + }, + { + "$ref": "#/definitions/ImageTemplateRestartCustomizer" + }, + { + "$ref": "#/definitions/ImageTemplateWindowsUpdateCustomizer" + }, + { + "$ref": "#/definitions/ImageTemplatePowerShellCustomizer" + }, + { + "$ref": "#/definitions/ImageTemplateFileCustomizer" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Friendly Name to provide context on what this customization step does" + } + }, + "description": "Describes a unit of image customization" + }, + "ImageTemplateDistributor": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateManagedImageDistributor" + }, + { + "$ref": "#/definitions/ImageTemplateSharedImageDistributor" + }, + { + "$ref": "#/definitions/ImageTemplateVhdDistributor" + } + ], + "properties": { + "artifactTags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Tags that will be applied to the artifact once it has been created/updated by the distributor." + }, + "runOutputName": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name to be used for the associated RunOutput." + } + }, + "required": [ + "runOutputName" + ], + "description": "Generic distribution object" + }, + "ImageTemplateFileCustomizer": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the file provided in the sourceUri field above" + }, + "sourceUri": { + "type": "string", + "description": "The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc" + }, + "type": { + "type": "string", + "enum": [ + "File" + ] + } + }, + "required": [ + "type" + ], + "description": "Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner" + }, + "ImageTemplateFileValidator": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the file provided in the sourceUri field above" + }, + "sourceUri": { + "type": "string", + "description": "The URI of the file to be uploaded to the VM for validation. It can be a github link, Azure Storage URI (authorized or SAS), etc" + }, + "type": { + "type": "string", + "enum": [ + "File" + ] + } + }, + "required": [ + "type" + ], + "description": "Uploads files required for validation to VMs (Linux, Windows). Corresponds to Packer file provisioner" + }, + "ImageTemplateIdentity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "UserAssigned", + "None" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity used for the image template. The type 'None' will remove any identities from the image template." + }, + "userAssignedIdentities": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentity" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests." + } + }, + "description": "Identity for the image template." + }, + "ImageTemplateInVMValidator": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateShellValidator" + }, + { + "$ref": "#/definitions/ImageTemplatePowerShellValidator" + }, + { + "$ref": "#/definitions/ImageTemplateFileValidator" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Friendly Name to provide context on what this validation step does" + } + }, + "description": "Describes a unit of in-VM validation of image" + }, + "ImageTemplateManagedImageDistributor": { + "type": "object", + "properties": { + "imageId": { + "type": "string", + "description": "Resource Id of the Managed Disk Image" + }, + "location": { + "type": "string", + "description": "Azure location for the image, should match if image already exists" + }, + "type": { + "type": "string", + "enum": [ + "ManagedImage" + ] + } + }, + "required": [ + "imageId", + "location", + "type" + ], + "description": "Distribute as a Managed Disk Image." + }, + "ImageTemplateManagedImageSource": { + "type": "object", + "properties": { + "imageId": { + "type": "string", + "description": "ARM resource id of the managed image in customer subscription" + }, + "type": { + "type": "string", + "enum": [ + "ManagedImage" + ] + } + }, + "required": [ + "imageId", + "type" + ], + "description": "Describes an image source that is a managed image in customer subscription. This image must reside in the same subscription and region as the Image Builder template." + }, + "ImageTemplatePlatformImageSource": { + "type": "object", + "properties": { + "offer": { + "type": "string", + "description": "Image offer from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "planInfo": { + "oneOf": [ + { + "$ref": "#/definitions/PlatformImagePurchasePlan" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Purchase plan configuration for platform image." + }, + "publisher": { + "type": "string", + "description": "Image Publisher in [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "sku": { + "type": "string", + "description": "Image sku from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "type": { + "type": "string", + "enum": [ + "PlatformImage" + ] + }, + "version": { + "type": "string", + "description": "Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). If 'latest' is specified here, the version is evaluated when the image build takes place, not when the template is submitted." + } + }, + "required": [ + "type" + ], + "description": "Describes an image source from [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "ImageTemplatePowerShellCustomizer": { + "type": "object", + "properties": { + "inline": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of PowerShell commands to execute" + }, + "runAsSystem": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true." + }, + "runElevated": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If specified, the PowerShell script will be run with elevated privileges" + }, + "scriptUri": { + "type": "string", + "description": "URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the power shell script provided in the scriptUri field above" + }, + "type": { + "type": "string", + "enum": [ + "PowerShell" + ] + }, + "validExitCodes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Valid exit codes for the PowerShell script. [Default: 0]" + } + }, + "required": [ + "type" + ], + "description": "Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified." + }, + "ImageTemplatePowerShellValidator": { + "type": "object", + "properties": { + "inline": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of PowerShell commands to execute" + }, + "runAsSystem": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true." + }, + "runElevated": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If specified, the PowerShell script will be run with elevated privileges" + }, + "scriptUri": { + "type": "string", + "description": "URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the power shell script provided in the scriptUri field above" + }, + "type": { + "type": "string", + "enum": [ + "PowerShell" + ] + }, + "validExitCodes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Valid exit codes for the PowerShell script. [Default: 0]" + } + }, + "required": [ + "type" + ], + "description": "Runs the specified PowerShell script during the validation phase (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified." + }, + "ImageTemplateProperties": { + "type": "object", + "properties": { + "buildTimeoutInMinutes": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "maximum": 960, + "default": "0" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions). Omit or specify 0 to use the default (4 hours)." + }, + "customize": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" + }, + "distribute": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateDistributor" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The distribution targets where the image output needs to go to." + }, + "optimize": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplatePropertiesOptimize" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies optimization to be performed on image." + }, + "source": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes a virtual machine image source for building, customizing and distributing" + }, + "stagingResourceGroup": { + "type": "string", + "description": "The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain." + }, + "validate": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplatePropertiesValidate" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration options and list of validations to be performed on the resulting image." + }, + "vmProfile": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplateVmProfile" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the virtual machines used to build and validate images" + } + }, + "required": [ + "distribute", + "source" + ], + "description": "Describes the properties of an image template" + }, + "ImageTemplatePropertiesOptimize": { + "type": "object", + "properties": { + "vmBoot": { + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplatePropertiesOptimizeVmBoot" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Optimization is applied on the image for a faster VM boot." + } + }, + "description": "Specifies optimization to be performed on image." + }, + "ImageTemplatePropertiesOptimizeVmBoot": { + "type": "object", + "properties": { + "state": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Enabling this field will improve VM boot time by optimizing the final customized image output." + } + }, + "description": "Optimization is applied on the image for a faster VM boot." + }, + "ImageTemplatePropertiesValidate": { + "type": "object", + "properties": { + "continueDistributeOnFailure": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If validation fails and this field is set to false, output image(s) will not be distributed. This is the default behavior. If validation fails and this field is set to true, output image(s) will still be distributed. Please use this option with caution as it may result in bad images being distributed for use. In either case (true or false), the end to end image run will be reported as having failed in case of a validation failure. [Note: This field has no effect if validation succeeds.]" + }, + "inVMValidations": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateInVMValidator" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of validations to be performed." + }, + "sourceValidationOnly": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If this field is set to true, the image specified in the 'source' section will directly be validated. No separate build will be run to generate and then validate a customized image." + } + }, + "description": "Configuration options and list of validations to be performed on the resulting image." + }, + "ImageTemplateRestartCustomizer": { + "type": "object", + "properties": { + "restartCheckCommand": { + "type": "string", + "description": "Command to check if restart succeeded [Default: '']" + }, + "restartCommand": { + "type": "string", + "description": "Command to execute the restart [Default: 'shutdown /r /f /t 0 /c \"packer restart\"']" + }, + "restartTimeout": { + "type": "string", + "description": "Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']" + }, + "type": { + "type": "string", + "enum": [ + "WindowsRestart" + ] + } + }, + "required": [ + "type" + ], + "description": "Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner" + }, + "ImageTemplateSharedImageDistributor": { + "type": "object", + "properties": { + "excludeFromLatest": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Flag that indicates whether created image version should be excluded from latest. Omit to use the default (false)." + }, + "galleryImageId": { + "type": "string", + "description": "Resource Id of the Azure Compute Gallery image" + }, + "replicationRegions": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "[Deprecated] A list of regions that the image will be replicated to. This list can be specified only if targetRegions is not specified. This field is deprecated - use targetRegions instead." + }, + "storageAccountType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_ZRS", + "Premium_LRS" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "[Deprecated] Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS). This field can be specified only if replicationRegions is specified. This field is deprecated - use targetRegions instead." + }, + "targetRegions": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/TargetRegion" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The target regions where the distributed Image Version is going to be replicated to. This object supersedes replicationRegions and can be specified only if replicationRegions is not specified." + }, + "type": { + "type": "string", + "enum": [ + "SharedImage" + ] + }, + "versioning": { + "oneOf": [ + { + "$ref": "#/definitions/DistributeVersioner" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes how to generate new x.y.z version number for distribution." + } + }, + "required": [ + "galleryImageId", + "type" + ], + "description": "Distribute via Azure Compute Gallery." + }, + "ImageTemplateSharedImageVersionSource": { + "type": "object", + "properties": { + "imageVersionId": { + "type": "string", + "description": "ARM resource id of the image version. When image version name is 'latest', the version is evaluated when the image build takes place." + }, + "type": { + "type": "string", + "enum": [ + "SharedImageVersion" + ] + } + }, + "required": [ + "imageVersionId", + "type" + ], + "description": "Describes an image source that is an image version in an Azure Compute Gallery or a Direct Shared Gallery." + }, + "ImageTemplateShellCustomizer": { + "type": "object", + "properties": { + "inline": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of shell commands to execute" + }, + "scriptUri": { + "type": "string", + "description": "URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the shell script provided in the scriptUri field" + }, + "type": { + "type": "string", + "enum": [ + "Shell" + ] + } + }, + "required": [ + "type" + ], + "description": "Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified." + }, + "ImageTemplateShellValidator": { + "type": "object", + "properties": { + "inline": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of shell commands to execute" + }, + "scriptUri": { + "type": "string", + "description": "URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the shell script provided in the scriptUri field" + }, + "type": { + "type": "string", + "enum": [ + "Shell" + ] + } + }, + "required": [ + "type" + ], + "description": "Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified." + }, + "ImageTemplateSource": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/ImageTemplatePlatformImageSource" + }, + { + "$ref": "#/definitions/ImageTemplateManagedImageSource" + }, + { + "$ref": "#/definitions/ImageTemplateSharedImageVersionSource" + } + ], + "properties": {}, + "description": "Describes a virtual machine image source for building, customizing and distributing" + }, + "imageTemplates_triggers_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-07-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the trigger" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/TriggerProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the properties of a trigger" + }, + "type": { + "type": "string", + "enum": [ + "triggers" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.VirtualMachineImages/imageTemplates/triggers" + }, + "ImageTemplateVhdDistributor": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "VHD" + ] + }, + "uri": { + "type": "string", + "description": "Optional Azure Storage URI for the distributed VHD blob. Omit to use the default (empty string) in which case VHD would be published to the storage account in the staging resource group." + } + }, + "required": [ + "type" + ], + "description": "Distribute via VHD in a storage account." + }, + "ImageTemplateVmProfile": { + "type": "object", + "properties": { + "osDiskSizeGB": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "default": "0" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." + }, + "userAssignedIdentities": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Optional array of resource IDs of user assigned managed identities to be configured on the build VM and validation VM. This may include the identity of the image template." + }, + "vmSize": { + "type": "string", + "default": "", + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images)." + }, + "vnetConfig": { + "oneOf": [ + { + "$ref": "#/definitions/VirtualNetworkConfig" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Virtual Network configuration." + } + }, + "description": "Describes the virtual machines used to build and validate images" + }, + "ImageTemplateWindowsUpdateCustomizer": { + "type": "object", + "properties": { + "filters": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of filters to select updates to apply. Omit or specify empty array to use the default (no filter). Refer to above link for examples and detailed description of this field." + }, + "searchCriteria": { + "type": "string", + "description": "Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples and detailed description of this field." + }, + "type": { + "type": "string", + "enum": [ + "WindowsUpdate" + ] + }, + "updateLimit": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "default": "0" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" + } + }, + "required": [ + "type" + ], + "description": "Installs Windows Updates. Corresponds to Packer Windows Update Provisioner (https://github.com/rgl/packer-provisioner-windows-update)" + }, + "PlatformImagePurchasePlan": { + "type": "object", + "properties": { + "planName": { + "type": "string", + "description": "Name of the purchase plan." + }, + "planProduct": { + "type": "string", + "description": "Product of the purchase plan." + }, + "planPublisher": { + "type": "string", + "description": "Publisher of the purchase plan." + } + }, + "required": [ + "planName", + "planProduct", + "planPublisher" + ], + "description": "Purchase plan configuration for platform image." + }, + "SourceImageTriggerProperties": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "SourceImage" + ] + } + }, + "required": [ + "kind" + ], + "description": "Properties of SourceImage kind of trigger" + }, + "TargetRegion": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the region." + }, + "replicaCount": { + "oneOf": [ + { + "type": "integer", + "minimum": 1, + "default": "1" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The number of replicas of the Image Version to be created in this region. Omit to use the default (1)." + }, + "storageAccountType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_ZRS", + "Premium_LRS" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies the storage account type to be used to store the image in this region. Omit to use the default (Standard_LRS)." + } + }, + "required": [ + "name" + ], + "description": "Describes the target region information." + }, + "TriggerProperties": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/SourceImageTriggerProperties" + } + ], + "properties": {}, + "description": "Describes the properties of a trigger" + }, + "UserAssignedIdentity": { + "type": "object", + "properties": {}, + "description": "User assigned identity properties" + }, + "VirtualNetworkConfig": { + "type": "object", + "properties": { + "proxyVmSize": { + "type": "string", + "default": "", + "description": "Size of the proxy virtual machine used to pass traffic to the build VM and validation VM. Omit or specify empty string to use the default (Standard_A1_v2)." + }, + "subnetId": { + "type": "string", + "description": "Resource id of a pre-existing subnet." + } + }, + "description": "Virtual Network configuration." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index cb022e645d..6022d697b4 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -31222,6 +31222,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-02-14/Microsoft.VirtualMachineImages.json#/resourceDefinitions/imageTemplates" }, + { + "$ref": "https://schema.management.azure.com/schemas/2022-07-01/Microsoft.VirtualMachineImages.json#/resourceDefinitions/imageTemplates" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2022-07-01/Microsoft.VirtualMachineImages.json#/resourceDefinitions/imageTemplates_triggers" + }, { "$ref": "https://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.VisualStudio.json#/resourceDefinitions/account" },