Custom Images - Get

Get custom image.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}?$expand={$expand}&api-version=2018-09-15

URI Parameters

Name In Required Type Description
labName
path True

string

The name of the lab.

name
path True

string

The name of the custom image.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription ID.

api-version
query True

string

Client API version.

$expand
query

string

Specify the $expand query. Example: 'properties($select=vm)'

Responses

Name Type Description
200 OK

CustomImage

OK

Other Status Codes

CloudError

BadRequest

Security

azure_auth

OAuth2 Implicit Grant

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Access Microsoft Azure

Examples

CustomImages_Get

Sample Request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{customImageName}?api-version=2018-09-15

Sample Response

{
  "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/customimages/{customImageName}",
  "name": "{customImageName}",
  "type": "Microsoft.DevTestLab/labs/customImages",
  "location": "{location}",
  "properties": {
    "description": "My Custom Image",
    "author": "{authorName}",
    "creationDate": "2021-10-10T09:59:28.7985144+00:00",
    "provisioningState": "Succeeded",
    "uniqueIdentifier": "{uniqueIdentifier}",
    "vm": {
      "sourceVmId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}",
      "linuxOsInfo": {
        "linuxOsState": "NonDeprovisioned"
      }
    }
  },
  "tags": {
    "tagName1": "tagValue1"
  }
}

Definitions

Name Description
CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

CustomImage

A custom image.

CustomImageOsType

The OS type of the custom image (i.e. Windows, Linux)

CustomImagePropertiesCustom

Properties for creating a custom image from a VHD.

CustomImagePropertiesFromPlan

Properties for plan on a custom image.

CustomImagePropertiesFromVm

Properties for creating a custom image from a virtual machine.

DataDiskStorageTypeInfo

Storage information about the data disks present in the custom image

LinuxOsInfo

Information about a Linux OS.

LinuxOsState

The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied).

StorageType

The storage type for the disk (i.e. Standard, Premium).

WindowsOsInfo

Information about a Windows OS.

WindowsOsState

The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied).

CloudError

Error from a REST request.

Name Type Description
error

CloudErrorBody

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

The error code.

details

CloudErrorBody[]

Inner errors.

message

string

The error message.

target

string

The error target.

CustomImage

A custom image.

Name Type Description
id

string

The identifier of the resource.

location

string

The location of the resource.

name

string

The name of the resource.

properties.author

string

The author of the custom image.

properties.creationDate

string

The creation date of the custom image.

properties.customImagePlan

CustomImagePropertiesFromPlan

Storage information about the plan related to this custom image

properties.dataDiskStorageInfo

DataDiskStorageTypeInfo[]

Storage information about the data disks present in the custom image

properties.description

string

The description of the custom image.

properties.isPlanAuthorized

boolean

Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment

properties.managedImageId

string

The Managed Image Id backing the custom image.

properties.managedSnapshotId

string

The Managed Snapshot Id backing the custom image.

properties.provisioningState

string

The provisioning status of the resource.

properties.uniqueIdentifier

string

The unique immutable identifier of a resource (Guid).

properties.vhd

CustomImagePropertiesCustom

The VHD from which the image is to be created.

properties.vm

CustomImagePropertiesFromVm

The virtual machine from which the image is to be created.

tags

object

The tags of the resource.

type

string

The type of the resource.

CustomImageOsType

The OS type of the custom image (i.e. Windows, Linux)

Name Type Description
Linux

string

None

string

Windows

string

CustomImagePropertiesCustom

Properties for creating a custom image from a VHD.

Name Type Description
imageName

string

The image name.

osType

CustomImageOsType

The OS type of the custom image (i.e. Windows, Linux)

sysPrep

boolean

Indicates whether sysprep has been run on the VHD.

CustomImagePropertiesFromPlan

Properties for plan on a custom image.

Name Type Description
id

string

The id of the plan, equivalent to name of the plan

offer

string

The offer for the plan from the marketplace image the custom image is derived from

publisher

string

The publisher for the plan from the marketplace image the custom image is derived from

CustomImagePropertiesFromVm

Properties for creating a custom image from a virtual machine.

Name Type Description
linuxOsInfo

LinuxOsInfo

The Linux OS information of the VM.

sourceVmId

string

The source vm identifier.

windowsOsInfo

WindowsOsInfo

The Windows OS information of the VM.

DataDiskStorageTypeInfo

Storage information about the data disks present in the custom image

Name Type Description
lun

string

Disk Lun

storageType

StorageType

Disk Storage Type

LinuxOsInfo

Information about a Linux OS.

Name Type Description
linuxOsState

LinuxOsState

The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied).

LinuxOsState

The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied).

Name Type Description
DeprovisionApplied

string

DeprovisionRequested

string

NonDeprovisioned

string

StorageType

The storage type for the disk (i.e. Standard, Premium).

Name Type Description
Premium

string

Standard

string

StandardSSD

string

WindowsOsInfo

Information about a Windows OS.

Name Type Description
windowsOsState

WindowsOsState

The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied).

WindowsOsState

The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied).

Name Type Description
NonSysprepped

string

SysprepApplied

string

SysprepRequested

string