Microsoft.DevTestLab labs/customimages

The labs/customimages 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.DevTestLab/labs/customimages resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.DevTestLab/labs/customimages@2018-09-15' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  parent: parentSymbolicName
  properties: {
    author: 'string'
    customImagePlan: {
      id: 'string'
      offer: 'string'
      publisher: 'string'
    dataDiskStorageInfo: [
        lun: 'string'
        storageType: 'string'
    description: 'string'
    isPlanAuthorized: bool
    managedImageId: 'string'
    managedSnapshotId: 'string'
    vhd: {
      imageName: 'string'
      osType: 'string'
      sysPrep: bool
    vm: {
      linuxOsInfo: {
        linuxOsState: 'string'
      sourceVmId: 'string'
      windowsOsInfo: {
        windowsOsState: 'string'

Property values


Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
location The location of the resource. string
tags The tags of the resource. 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.
properties Properties of a custom image. CustomImageProperties (required)


Name Description Value
author The author of the custom image. string
customImagePlan Properties for plan on a custom image. CustomImagePropertiesFromPlan
dataDiskStorageInfo Storage information about the data disks present in the custom image DataDiskStorageTypeInfo[]
description The description of the custom image. string
isPlanAuthorized Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment bool
managedImageId The Managed Image Id backing the custom image. string
managedSnapshotId The Managed Snapshot Id backing the custom image. string
vhd Properties for creating a custom image from a VHD. CustomImagePropertiesCustom
vm Properties for creating a custom image from a virtual machine. CustomImagePropertiesFromVm


Name Description Value
id The id of the plan, equivalent to name of the plan string
offer The offer for the plan from the marketplace image the custom image is derived from string
publisher The publisher for the plan from the marketplace image the custom image is derived from string


Name Description Value
lun Disk Lun string
storageType The storage type for the disk (i.e. Standard, Premium). 'Premium'


Name Description Value
imageName The image name. string
osType The OS type of the custom image (i.e. Windows, Linux) 'Linux'
sysPrep Indicates whether sysprep has been run on the VHD. bool


Name Description Value
linuxOsInfo Information about a Linux OS. LinuxOsInfo
sourceVmId The source vm identifier. string
windowsOsInfo Information about a Windows OS. WindowsOsInfo


Name Description Value
linuxOsState The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). 'DeprovisionApplied'


Name Description Value
windowsOsState The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). 'NonSysprepped'