Microsoft.Compute galleries/images 2022-01-03

Bicep resource definition

The galleries/images resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

resource symbolicname 'Microsoft.Compute/galleries/images@2022-01-03' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  properties: {
    architecture: 'string'
    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
name The resource name

See how to set names and types for child resources in Bicep.
string (required)

Character limit: 1-80

Valid characters:
Alphanumerics, underscores, hyphens, and periods.

Start and end with alphanumeric.
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.
Symbolic name for resource of type: galleries
properties Describes the properties of a gallery image definition. GalleryImageProperties

GalleryImageProperties

Name Description Value
architecture The architecture of the image. Applicable to OS disks only. 'Arm64'
'x64'
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 This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. 'Generalized'
'Specialized' (required)
osType 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
'Linux'
'Windows' (required)
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
Azure Image Builder with Azure Windows Baseline

Deploy to Azure
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied.
Create an Image Definition in a Azure Compute Gallery

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

Deploy to Azure
This template would create all Dev Box admin resources as per Dev Box quick start guide (https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box.

ARM template resource definition

The galleries/images resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

{
  "type": "Microsoft.Compute/galleries/images",
  "apiVersion": "2022-01-03",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "architecture": "string",
    "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 'Microsoft.Compute/galleries/images'
apiVersion The resource api version '2022-01-03'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)

Character limit: 1-80

Valid characters:
Alphanumerics, underscores, hyphens, and periods.

Start and end with alphanumeric.
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
properties Describes the properties of a gallery image definition. GalleryImageProperties

GalleryImageProperties

Name Description Value
architecture The architecture of the image. Applicable to OS disks only. 'Arm64'
'x64'
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 This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. 'Generalized'
'Specialized' (required)
osType 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
'Linux'
'Windows' (required)
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
Azure Image Builder with Azure Windows Baseline

Deploy to Azure
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied.
Create an Image Definition in a Azure Compute Gallery

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

Deploy to Azure
This template would create all Dev Box admin resources as per Dev Box quick start guide (https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box.

Terraform (AzAPI provider) resource definition

The galleries/images resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/galleries/images@2022-01-03"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      architecture = "string"
      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 "Microsoft.Compute/galleries/images@2022-01-03"
name The resource name string (required)

Character limit: 1-80

Valid characters:
Alphanumerics, underscores, hyphens, and periods.

Start and end with alphanumeric.
location Resource location string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: galleries
tags Resource tags Dictionary of tag names and values.
properties Describes the properties of a gallery image definition. GalleryImageProperties

GalleryImageProperties

Name Description Value
architecture The architecture of the image. Applicable to OS disks only. "Arm64"
"x64"
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 This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. "Generalized"
"Specialized" (required)
osType 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
"Linux"
"Windows" (required)
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