Microsoft.Compute galleries/images

Template format

To create a Microsoft.Compute/galleries/images resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Compute/galleries/images",
  "apiVersion": "2019-12-01",
  "location": "string",
  "tags": {},
  "properties": {
    "description": "string",
    "eula": "string",
    "privacyStatementUri": "string",
    "releaseNoteUri": "string",
    "osType": "string",
    "osState": "string",
    "hyperVGeneration": "string",
    "endOfLifeDate": "string",
    "identifier": {
      "publisher": "string",
      "offer": "string",
      "sku": "string"
    },
    "recommended": {
      "vCPUs": {
        "min": "integer",
        "max": "integer"
      },
      "memory": {
        "min": "integer",
        "max": "integer"
      }
    },
    "disallowed": {
      "diskTypes": [
        "string"
      ]
    },
    "purchasePlan": {
      "name": "string",
      "publisher": "string",
      "product": "string"
    }
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Compute/galleries/images object

Name Type Required Value
name string Yes The name of the image.
type enum Yes images
-or-
Microsoft.Compute/galleries/images

See Set name and type for child resources.
apiVersion enum Yes 2019-12-01
location string Yes Resource location
tags object No Resource tags
properties object Yes GalleryImageProperties object
resources array No versions

GalleryImageProperties object

Name Type Required Value
description string No The description of this gallery Image Definition resource. This property is updatable.
eula string No The Eula agreement for the gallery Image Definition.
privacyStatementUri string No The privacy statement uri.
releaseNoteUri string No The release note uri.
osType enum Yes This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

Windows

Linux. - Windows or Linux
osState enum Yes This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. - Generalized or Specialized
hyperVGeneration enum No The hypervisor generation of the Virtual Machine. Applicable to OS disks only. - V1 or V2
endOfLifeDate string No The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
identifier object Yes GalleryImageIdentifier object
recommended object No RecommendedMachineConfiguration object
disallowed object No Disallowed object
purchasePlan object No ImagePurchasePlan object

GalleryImageIdentifier object

Name Type Required Value
publisher string Yes The name of the gallery Image Definition publisher.
offer string Yes The name of the gallery Image Definition offer.
sku string Yes The name of the gallery Image Definition SKU.

RecommendedMachineConfiguration object

Name Type Required Value
vCPUs object No ResourceRange object
memory object No ResourceRange object

Disallowed object

Name Type Required Value
diskTypes array No A list of disk types. - string

ImagePurchasePlan object

Name Type Required Value
name string No The plan ID.
publisher string No The publisher ID.
product string No The product ID.

ResourceRange object

Name Type Required Value
min integer No The minimum number of the resource.
max integer No The maximum number of the resource.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create an Image Definition in a Shared Image Gallery

Deploy to Azure
This template allows you to create a simple Image Definition in a Shared Image Gallery. Please ensure that you have run the Shared Image Gallery 101 Template before you deploy this.