Microsoft.Compute galleries/images

The galleries/images resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Compute/galleries/images resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Compute/galleries/images@2021-07-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: parentSymbolicName
  properties: {
    description: 'string'
    disallowed: {
      diskTypes: [ 'string' ]
    }
    endOfLifeDate: 'string'
    eula: 'string'
    features: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    hyperVGeneration: 'string'
    identifier: {
      offer: 'string'
      publisher: 'string'
      sku: 'string'
    }
    osState: 'string'
    osType: 'string'
    privacyStatementUri: 'string'
    purchasePlan: {
      name: 'string'
      product: 'string'
      publisher: 'string'
    }
    recommended: {
      memory: {
        max: int
        min: int
      }
      vCPUs: {
        max: int
        min: int
      }
    }
    releaseNoteUri: 'string'
  }
}

Property values

galleries/images

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Compute/galleries/images'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2021-07-01'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
parentSymbolicName
properties Describes the properties of a gallery image definition. GalleryImageProperties

GalleryImageProperties

Name Description Value
description The description of this gallery image definition resource. This property is updatable. string
disallowed Describes the disallowed disk types. Disallowed
endOfLifeDate The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. string
eula The Eula agreement for the gallery image definition. string
features A list of gallery image features. GalleryImageFeature[]
hyperVGeneration The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 'V1'
'V2'
identifier This is the gallery image definition identifier. GalleryImageIdentifier (required)
osState The OS State. 'Generalized'
'Specialized'
osType The operating system of the osDiskImage. 'Linux'
'Windows'
privacyStatementUri The privacy statement uri. string
purchasePlan Describes the gallery image definition purchase plan. This is used by marketplace images. ImagePurchasePlan
recommended The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. RecommendedMachineConfiguration
releaseNoteUri The release note uri. string

Disallowed

Name Description Value
diskTypes A list of disk types. string[]

GalleryImageFeature

Name Description Value
name The name of the gallery image feature. string
value The value of the gallery image feature. string

GalleryImageIdentifier

Name Description Value
offer The name of the gallery image definition offer. string (required)
publisher The name of the gallery image definition publisher. string (required)
sku The name of the gallery image definition SKU. string (required)

ImagePurchasePlan

Name Description Value
name The plan ID. string
product The product ID. string
publisher The publisher ID. string

RecommendedMachineConfiguration

Name Description Value
memory Describes the resource range. ResourceRange
vCPUs Describes the resource range. ResourceRange

ResourceRange

Name Description Value
max The maximum number of the resource. int
min The minimum number of the resource. int

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.