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 |
---|---|---|---|---|
lab
|
path | True |
string |
The name of the lab. |
name
|
path | True |
string |
The name of the custom image. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
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 |
OK |
|
Other Status Codes |
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
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 |
---|---|
Cloud |
Error from a REST request. |
Cloud |
Body of an error from a REST request. |
Custom |
A custom image. |
Custom |
The OS type of the custom image (i.e. Windows, Linux) |
Custom |
Properties for creating a custom image from a VHD. |
Custom |
Properties for plan on a custom image. |
Custom |
Properties for creating a custom image from a virtual machine. |
Data |
Storage information about the data disks present in the custom image |
Linux |
Information about a Linux OS. |
Linux |
The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). |
Storage |
The storage type for the disk (i.e. Standard, Premium). |
Windows |
Information about a Windows OS. |
Windows |
The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). |
CloudError
Error from a REST request.
Name | Type | Description |
---|---|---|
error |
The cloud error that occurred |
CloudErrorBody
Body of an error from a REST request.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
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 |
Storage information about the plan related to this custom image |
|
properties.dataDiskStorageInfo |
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 |
The VHD from which the image is to be created. |
|
properties.vm |
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 |
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 |
The Linux OS information of the VM. |
|
sourceVmId |
string |
The source vm identifier. |
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 |
Disk Storage Type |
LinuxOsInfo
Information about a Linux OS.
Name | Type | Description |
---|---|---|
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 |
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 |