Images - Get
Gets an image.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}?api-version=2025-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}?api-version=2025-11-01&$expand={$expand}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
image
|
path | True |
string |
The name of the image. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
$expand
|
query |
string |
The expand expression to apply on the operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Get information about a virtual machine image.
Sample request
Sample response
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage",
"name": "myImage",
"type": "Microsoft.Compute/images",
"location": "West US",
"properties": {
"storageProfile": {
"osDisk": {
"osType": "Windows",
"blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
"snapshot": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
},
"managedDisk": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1"
},
"osState": "Generalized",
"storageAccountType": "Standard_LRS",
"diskSizeGB": 20
},
"dataDisks": [
{
"lun": 1,
"blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd",
"snapshot": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
},
"managedDisk": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
},
"storageAccountType": "Standard_LRS"
}
],
"zoneResilient": true
},
"provisioningState": "created"
}
}
Definitions
| Name | Description |
|---|---|
|
Api |
Api error. |
|
Api |
Api error base. |
|
Caching |
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage |
|
Cloud |
An error response from the Compute service. |
|
created |
The type of identity that created the resource. |
|
Disk |
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. |
|
Extended |
The complex type of the extended location. |
|
Extended |
The type of the extended location. |
|
Hyper |
Specifies the HyperVGeneration Type |
| Image |
The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. |
|
Image |
Describes a data disk. |
|
Image |
Describes an Operating System disk. |
|
Image |
Describes a storage profile. |
|
Inner |
Inner error details. |
|
Operating |
The OS State. For managed images, use Generalized. |
|
Operating |
This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux. |
|
Storage |
Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types |
|
Sub |
|
|
system |
Metadata pertaining to creation and last modification of the resource. |
ApiError
Api error.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| details |
The Api error details |
|
| innererror |
The Api inner error |
|
| message |
string |
The error message. |
| target |
string |
The target of the particular error. |
ApiErrorBase
Api error base.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| message |
string |
The error message. |
| target |
string |
The target of the particular error. |
CachingTypes
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage
| Value | Description |
|---|---|
| None | |
| ReadOnly | |
| ReadWrite |
CloudError
An error response from the Compute service.
| Name | Type | Description |
|---|---|---|
| error |
Api error. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DiskEncryptionSetParameters
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource Id |
ExtendedLocation
The complex type of the extended location.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the extended location. |
| type |
The type of the extended location. |
ExtendedLocationTypes
The type of the extended location.
| Value | Description |
|---|---|
| EdgeZone |
HyperVGenerationTypes
Specifies the HyperVGeneration Type
| Value | Description |
|---|---|
| V1 | |
| V2 |
Image
The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
| Name | Type | Description |
|---|---|---|
| extendedLocation |
The extended location of the Image. |
|
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties.hyperVGeneration |
Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. |
|
| properties.provisioningState |
string |
The provisioning state. |
| properties.sourceVirtualMachine |
The source virtual machine from which Image is created. |
|
| properties.storageProfile |
Specifies the storage settings for the virtual machine disks. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ImageDataDisk
Describes a data disk.
| Name | Type | Description |
|---|---|---|
| blobUri |
string |
The Virtual Hard Disk. |
| caching |
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. |
|
| diskEncryptionSet |
Specifies the customer managed disk encryption set resource id for the managed image disk. |
|
| diskSizeGB |
integer (int32) |
Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. |
| lun |
integer (int32) |
Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. |
| managedDisk |
The managedDisk. |
|
| snapshot |
The snapshot. |
|
| storageAccountType |
Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. |
ImageOSDisk
Describes an Operating System disk.
| Name | Type | Description |
|---|---|---|
| blobUri |
string |
The Virtual Hard Disk. |
| caching |
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. |
|
| diskEncryptionSet |
Specifies the customer managed disk encryption set resource id for the managed image disk. |
|
| diskSizeGB |
integer (int32) |
Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. |
| managedDisk |
The managedDisk. |
|
| osState |
The OS State. For managed images, use Generalized. |
|
| osType |
This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux. |
|
| snapshot |
The snapshot. |
|
| storageAccountType |
Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. |
ImageStorageProfile
Describes a storage profile.
| Name | Type | Description |
|---|---|---|
| dataDisks |
Specifies the parameters that are used to add a data disk to a virtual machine. |
|
| osDisk |
Specifies information about the operating system disk used by the virtual machine. |
|
| zoneResilient |
boolean |
Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). |
InnerError
Inner error details.
| Name | Type | Description |
|---|---|---|
| errordetail |
string |
The internal error message or exception dump. |
| exceptiontype |
string |
The exception type. |
OperatingSystemStateTypes
The OS State. For managed images, use Generalized.
| Value | Description |
|---|---|
| Generalized |
Generalized image. Needs to be provisioned during deployment time. |
| Specialized |
Specialized image. Contains already provisioned OS Disk. |
OperatingSystemTypes
This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
| Value | Description |
|---|---|
| Windows | |
| Linux |
StorageAccountTypes
Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types
| Value | Description |
|---|---|
| Standard_LRS | |
| Premium_LRS | |
| StandardSSD_LRS | |
| UltraSSD_LRS | |
| Premium_ZRS | |
| StandardSSD_ZRS | |
| PremiumV2_LRS |
SubResource
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource Id |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |