Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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@2018-06-01' = {
parent: resourceSymbolicName
___location: 'string'
name: 'string'
properties: {
description: 'string'
disallowed: {
diskTypes: [
'string'
]
}
endOfLifeDate: 'string'
eula: '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'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/galleries/images
| Name | Description | Value |
|---|---|---|
| ___location | Resource ___location | string (required) |
| name | The resource name | string (required) |
| 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 |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
Disallowed
| Name | Description | Value |
|---|---|---|
| diskTypes | A list of disk types. | 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) |
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 |
| identifier | This is the gallery Image Definition identifier. | GalleryImageIdentifier (required) |
| osState | The allowed values for OS State are 'Generalized'. | '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 |
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 |
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Azure Image Builder with Azure Windows Baseline | Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
| Configure Dev Box service | This template would create all Dev Box admin resources as per Dev Box quick start guide (/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": "2018-06-01",
"name": "string",
"___location": "string",
"properties": {
"description": "string",
"disallowed": {
"diskTypes": [ "string" ]
},
"endOfLifeDate": "string",
"eula": "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"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/galleries/images
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2018-06-01' |
| ___location | Resource ___location | string (required) |
| name | The resource name | string (required) |
| properties | Describes the properties of a gallery Image Definition. | GalleryImageProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Compute/galleries/images' |
Disallowed
| Name | Description | Value |
|---|---|---|
| diskTypes | A list of disk types. | 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) |
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 |
| identifier | This is the gallery Image Definition identifier. | GalleryImageIdentifier (required) |
| osState | The allowed values for OS State are 'Generalized'. | '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 |
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 |
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Azure Image Builder with Azure Windows Baseline |
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
| Configure Dev Box service |
This template would create all Dev Box admin resources as per Dev Box quick start guide (/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. |
| Create an Image Definition in a Azure Compute Gallery |
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. |
Terraform (AzAPI provider) 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 Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/galleries/images@2018-06-01"
name = "string"
parent_id = "string"
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
description = "string"
disallowed = {
diskTypes = [
"string"
]
}
endOfLifeDate = "string"
eula = "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
Microsoft.Compute/galleries/images
| Name | Description | Value |
|---|---|---|
| ___location | Resource ___location | string (required) |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: galleries |
| properties | Describes the properties of a gallery Image Definition. | GalleryImageProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Compute/galleries/images@2018-06-01" |
Disallowed
| Name | Description | Value |
|---|---|---|
| diskTypes | A list of disk types. | 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) |
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 |
| identifier | This is the gallery Image Definition identifier. | GalleryImageIdentifier (required) |
| osState | The allowed values for OS State are 'Generalized'. | '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 |
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 |
ResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Shared Image within a Shared Image Gallery.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "___location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
___location = var.___location
}
resource "azapi_resource" "gallery" {
type = "Microsoft.Compute/galleries@2022-03-03"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
___location = var.___location
body = {
properties = {
description = ""
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "image" {
type = "Microsoft.Compute/galleries/images@2022-03-03"
parent_id = azapi_resource.gallery.id
name = var.resource_name
___location = var.___location
body = {
properties = {
architecture = "x64"
description = ""
disallowed = {
diskTypes = [
]
}
features = null
hyperVGeneration = "V1"
identifier = {
offer = "AccTesOffer230630032848825313"
publisher = "AccTesPublisher230630032848825313"
sku = "AccTesSku230630032848825313"
}
osState = "Generalized"
osType = "Linux"
privacyStatementUri = ""
recommended = {
memory = {
}
vCPUs = {
}
}
releaseNoteUri = ""
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}