Virtual Machines - List
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines?api-version=2026-04-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines?api-version=2026-04-01&$filter={$filter}&$expand=instanceView
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
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 |
The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified |
||
|
$filter
|
query |
string |
The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| 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
|
Virtual |
|
Virtual |
VirtualMachine_List_MaximumSet_Gen
Sample request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines?api-version=2026-04-01&$filter=aaaaaaaaaaaaaaaaaaaaaaa&$expand=instanceView
Sample response
{
"value": [
{
"properties": {
"vmId": "{vmId}",
"availabilitySet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"hardwareProfile": {
"vmSize": "Standard_A0",
"vmSizeProperties": {
"vCPUsAvailable": 7,
"vCPUsPerCore": 14
}
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-R2-Datacenter",
"version": "4.127.20170406",
"exactVersion": "aaaaaaaaaaaaa",
"sharedGalleryImageId": "aaaaaaaaaaaaaaa",
"communityGalleryImageId": "aaaa",
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"osDisk": {
"osType": "Windows",
"name": "test",
"createOption": "FromImage",
"vhd": {
"uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"
},
"caching": "None",
"diskSizeGB": 127,
"encryptionSettings": {
"diskEncryptionKey": {
"secretUrl": "aaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"keyEncryptionKey": {
"keyUrl": "aaaaaaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"enabled": true
},
"image": {
"uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"
},
"writeAcceleratorEnabled": true,
"diffDiskSettings": {
"option": "Local",
"placement": "CacheDisk"
},
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"securityProfile": {
"securityEncryptionType": "VMGuestStateOnly",
"diskEncryptionSet": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
},
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f"
},
"deleteOption": "Delete"
},
"dataDisks": []
},
"osProfile": {
"computerName": "Test",
"adminUsername": "Foo12",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"timeZone": "aaaaaaaaaaaaaaaaaaaaaa",
"additionalUnattendContent": [
{
"passName": "OobeSystem",
"componentName": "Microsoft-Windows-Shell-Setup",
"settingName": "AutoLogon",
"content": "aaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"patchSettings": {
"patchMode": "Manual",
"enableHotpatching": true,
"assessmentMode": "ImageDefault"
},
"winRM": {
"listeners": [
{
"protocol": "Http",
"certificateUrl": "aaaaaaaaaaaaaaaaaaaaa"
}
]
}
},
"secrets": [],
"allowExtensionOperations": true,
"customData": "aaaa",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "aaaaaaaaaaaaaaaaaaaaaa",
"keyData": "aaa"
}
]
},
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "ImageDefault",
"assessmentMode": "ImageDefault"
}
},
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}",
"properties": {
"primary": true,
"deleteOption": "Delete"
}
}
],
"networkApiVersion": "2022-05-01",
"networkInterfaceConfigurations": [
{
"name": "aaaaaaaa",
"properties": {
"primary": true,
"deleteOption": "Delete",
"enableAcceleratedNetworking": true,
"disableTcpStateTracking": true,
"enableFpga": true,
"enableIPForwarding": true,
"networkSecurityGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"dnsSettings": {
"dnsServers": [
"aaaaaaaaaaaaaaaaaaaaaaaa"
]
},
"ipConfigurations": [
{
"name": "aaaaaaaa",
"properties": {
"subnet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"primary": true,
"publicIPAddressConfiguration": {
"name": "aaaaaaaaaaaaaaaaaa",
"properties": {
"idleTimeoutInMinutes": 23,
"deleteOption": "Delete",
"dnsSettings": {
"domainNameLabel": "aaaaa"
},
"ipTags": [
{
"ipTagType": "aaaaa",
"tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"firstPartyServiceTagId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firstPartyServiceTags/{firstPartyServiceTagName}"
}
],
"publicIPPrefix": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Dynamic"
},
"sku": {
"name": "Basic",
"tier": "Regional"
}
},
"privateIPAddressVersion": "IPv4",
"applicationSecurityGroups": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
],
"applicationGatewayBackendAddressPools": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
],
"loadBalancerBackendAddressPools": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
]
}
}
],
"dscpConfiguration": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
}
}
]
},
"provisioningState": "Succeeded",
"additionalCapabilities": {
"ultraSSDEnabled": true,
"hibernationEnabled": true
},
"securityProfile": {
"uefiSettings": {
"secureBootEnabled": true,
"vTpmEnabled": true
},
"encryptionAtHost": true,
"securityType": "TrustedLaunch"
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "aaaaaaaaaaaaaaaaaaaaa"
}
},
"virtualMachineScaleSet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"proximityPlacementGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"priority": "Regular",
"evictionPolicy": "Deallocate",
"billingProfile": {
"maxPrice": 26
},
"host": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"hostGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"licenseType": "aaaaaaaaaaaaaaa",
"extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"platformFaultDomain": 8,
"scheduledEventsProfile": {
"terminateNotificationProfile": {
"notBeforeTimeout": "PT10M",
"enable": true
},
"osImageNotificationProfile": {
"notBeforeTimeout": "PT15M",
"enable": true
}
},
"userData": "aaa",
"capacityReservation": {
"capacityReservationGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"applicationProfile": {
"galleryApplications": [
{
"tags": "aaaaa",
"order": 4,
"packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa",
"configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
]
},
"timeCreated": "2022-01-14T16:43:41.683Z"
},
"type": "Microsoft.Compute/virtualMachines",
"location": "eastus",
"tags": {},
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}",
"name": "{virtualMachineName}",
"plan": {
"name": "aaaaaaaaaaaaaaaaaa",
"publisher": "aaaaaaaaaaaaaaaaa",
"product": "aaaaaaaaaaaaaaaaaaaaaa",
"promotionCode": "aaaaaaaaaaaaaa"
},
"resources": [
{
"properties": {
"forceUpdateTag": "aaaaaaaaaaaaaaa",
"publisher": "aaaaaaaaaaaaaaaa",
"type": "aaaaaaaa",
"typeHandlerVersion": "aaaaaaaaaaaa",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true,
"settings": {},
"protectedSettings": {},
"provisioningState": "aaa",
"instanceView": {
"name": "aaaaaaaaaaaaaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeHandlerVersion": "aaaaaa",
"substatuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
],
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
},
"suppressFailures": true,
"protectedSettingsFromKeyVault": {
"sourceVault": {
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
},
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
}
},
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "aaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"location": "aaaaaaaaaaaaaaaa",
"tags": {
"key9428": "aaaaaaa"
}
}
],
"identity": {
"principalId": "aaaaaaaaaaaaaaaa",
"tenantId": "aaaaa",
"type": "SystemAssigned",
"userAssignedIdentities": {
"key5688": {
"principalId": "aaaaaaaaaaaaaaa",
"clientId": "aaaaaaaaaaa"
}
}
},
"zones": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaa"
],
"extendedLocation": {
"name": "aaaa",
"type": "EdgeZone"
}
},
{
"properties": {
"vmId": "{vmId}",
"availabilitySet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"hardwareProfile": {
"vmSize": "Standard_A0",
"vmSizeProperties": {
"vCPUsAvailable": 7,
"vCPUsPerCore": 14
}
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-R2-Datacenter",
"version": "4.127.20170406",
"exactVersion": "aa",
"sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaa",
"communityGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"id": "aaaaaaaa"
},
"osDisk": {
"osType": "Windows",
"name": "test",
"createOption": "FromImage",
"vhd": {
"uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"
},
"caching": "None",
"diskSizeGB": 127,
"encryptionSettings": {
"diskEncryptionKey": {
"secretUrl": "aaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"keyEncryptionKey": {
"keyUrl": "aaaaaaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"enabled": true
},
"image": {
"uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"
},
"writeAcceleratorEnabled": true,
"diffDiskSettings": {
"option": "Local",
"placement": "CacheDisk"
},
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"securityProfile": {
"securityEncryptionType": "VMGuestStateOnly",
"diskEncryptionSet": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
},
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f"
},
"deleteOption": "Delete"
},
"dataDisks": []
},
"osProfile": {
"computerName": "Test",
"adminUsername": "Foo12",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"timeZone": "aaaaaaaaaaaaaaaaaaaa",
"additionalUnattendContent": [
{
"passName": "OobeSystem",
"componentName": "Microsoft-Windows-Shell-Setup",
"settingName": "AutoLogon",
"content": "aaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"patchSettings": {
"patchMode": "Manual",
"enableHotpatching": true,
"assessmentMode": "ImageDefault"
},
"winRM": {
"listeners": [
{
"protocol": "Http",
"certificateUrl": "aaaaaaaaaaaaaaaaaaaaa"
}
]
}
},
"secrets": [],
"allowExtensionOperations": true,
"customData": "aaaaaaaaaaaaaaaaaaaaaaa",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "aaaaaaaaaaaaaaaaaaaaaa",
"keyData": "aaa"
}
]
},
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "ImageDefault",
"assessmentMode": "ImageDefault"
}
},
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}",
"properties": {
"primary": true,
"deleteOption": "Delete"
}
}
],
"networkApiVersion": "2022-05-01",
"networkInterfaceConfigurations": [
{
"name": "aaaaaaaa",
"properties": {
"primary": true,
"deleteOption": "Delete",
"enableAcceleratedNetworking": true,
"disableTcpStateTracking": true,
"enableFpga": true,
"enableIPForwarding": true,
"networkSecurityGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"dnsSettings": {
"dnsServers": [
"aaaaaaaaaaaaaaaaaaaaaaaa"
]
},
"ipConfigurations": [
{
"name": "aaaaaaaa",
"properties": {
"subnet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"primary": true,
"publicIPAddressConfiguration": {
"name": "aaaaaaaaaaaaaaaaaa",
"properties": {
"idleTimeoutInMinutes": 23,
"deleteOption": "Delete",
"dnsSettings": {
"domainNameLabel": "aaaaa"
},
"ipTags": [
{
"ipTagType": "aaaaa",
"tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"publicIPPrefix": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Dynamic"
},
"sku": {
"name": "Basic",
"tier": "Regional"
}
},
"privateIPAddressVersion": "IPv4",
"applicationSecurityGroups": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
],
"applicationGatewayBackendAddressPools": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
],
"loadBalancerBackendAddressPools": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
]
}
}
],
"dscpConfiguration": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
}
}
]
},
"provisioningState": "Succeeded",
"additionalCapabilities": {
"ultraSSDEnabled": true,
"hibernationEnabled": true
},
"securityProfile": {
"uefiSettings": {
"secureBootEnabled": true,
"vTpmEnabled": true
},
"encryptionAtHost": true,
"securityType": "TrustedLaunch"
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "aaaaaaaaaaaaaaaaaaaaa"
}
},
"virtualMachineScaleSet": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"proximityPlacementGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"priority": "Regular",
"evictionPolicy": "Deallocate",
"billingProfile": {
"maxPrice": 26
},
"host": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"hostGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
},
"instanceView": {
"platformUpdateDomain": 1,
"platformFaultDomain": 29,
"computerName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"osName": "aaaaaaaaaaa",
"osVersion": "aaaaaaaaaaaaaa",
"hyperVGeneration": "V1",
"rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaa",
"vmAgent": {
"vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"extensionHandlers": [
{
"type": "aaaaa",
"typeHandlerVersion": "aaaaaaaaaaaaaaaaaaa",
"status": {
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
}
],
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
},
"maintenanceRedeployStatus": {
"isCustomerInitiatedMaintenanceAllowed": true,
"preMaintenanceWindowStartTime": "2022-01-14T16:43:41.682Z",
"preMaintenanceWindowEndTime": "2022-01-14T16:43:41.682Z",
"maintenanceWindowStartTime": "2022-01-14T16:43:41.682Z",
"maintenanceWindowEndTime": "2022-01-14T16:43:41.682Z",
"lastOperationResultCode": "None",
"lastOperationMessage": "aa"
},
"disks": [
{
"name": "a",
"encryptionSettings": [
{
"diskEncryptionKey": {
"secretUrl": "aaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"keyEncryptionKey": {
"keyUrl": "aaaaaaaaaaaaa",
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"enabled": true
}
],
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
}
],
"extensions": [
{
"name": "aaaaaaaaaaaaaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeHandlerVersion": "aaaaaa",
"substatuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
],
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
}
],
"vmHealth": {
"status": {
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
},
"bootDiagnostics": {
"consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaa",
"serialConsoleLogBlobUri": "aaaaaaaaaaaaaaaaaaa",
"status": {
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
},
"assignedHost": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
],
"patchStatus": {
"availablePatchSummary": {
"status": "Unknown",
"assessmentActivityId": "aaaaaaaaaaaaaaaaaaa",
"rebootPending": true,
"criticalAndSecurityPatchCount": 22,
"otherPatchCount": 25,
"startTime": "2022-01-14T16:43:41.682Z",
"lastModifiedTime": "2022-01-14T16:43:41.683Z",
"error": {
"details": [
{
"code": "aaaaaaaaaaaaaaaaaaaaa",
"target": "aaaaaa",
"message": "aaaaaaaaaaaaa"
}
],
"innererror": {
"exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"code": "aaaaaa",
"target": "aaaaaaaaa",
"message": "aaa"
}
},
"lastPatchInstallationSummary": {
"status": "Unknown",
"installationActivityId": "aaaaaa",
"maintenanceWindowExceeded": true,
"notSelectedPatchCount": 20,
"excludedPatchCount": 1,
"pendingPatchCount": 2,
"installedPatchCount": 28,
"failedPatchCount": 30,
"startTime": "2022-01-14T16:43:41.683Z",
"lastModifiedTime": "2022-01-14T16:43:41.683Z",
"error": {
"details": [
{
"code": "aaaaaaaaaaaaaaaaaaaaa",
"target": "aaaaaa",
"message": "aaaaaaaaaaaaa"
}
],
"innererror": {
"exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"code": "aaaaaa",
"target": "aaaaaaaaa",
"message": "aaa"
}
},
"configurationStatuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
},
"isVMInStandbyPool": false
},
"licenseType": "aaaaaaaaaaaaaa",
"extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaa",
"platformFaultDomain": 11,
"scheduledEventsProfile": {
"terminateNotificationProfile": {
"notBeforeTimeout": "PT10M",
"enable": true
},
"osImageNotificationProfile": {
"notBeforeTimeout": "PT15M",
"enable": true
}
},
"userData": "aaaaaaaaaaaaaaaaaaa",
"capacityReservation": {
"capacityReservationGroup": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
}
},
"applicationProfile": {
"galleryApplications": [
{
"tags": "aaaaa",
"order": 4,
"packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa",
"configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
]
},
"timeCreated": "2022-01-14T16:43:41.685Z"
},
"type": "Microsoft.Compute/virtualMachines",
"location": "eastus",
"tags": {},
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}",
"name": "{virtualMachineName}",
"plan": {
"name": "aaaaaaaaaaaaaaaaaa",
"publisher": "aaaaaaaaaaaaaaaaa",
"product": "aaaaaaaaaaaaaaaaaaaaaa",
"promotionCode": "aaaaaaaaaaaaaa"
},
"resources": [
{
"properties": {
"forceUpdateTag": "aaaaaaaaaaaaaaa",
"publisher": "aaaaaaaaaaaaaaaa",
"type": "aaaaaaaa",
"typeHandlerVersion": "aaaaaaaaaaaa",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true,
"settings": {},
"protectedSettings": {},
"provisioningState": "aaa",
"instanceView": {
"name": "aaaaaaaaaaaaaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeHandlerVersion": "aaaaaa",
"substatuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
],
"statuses": [
{
"code": "aaa",
"level": "Info",
"displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa",
"message": "aaaaaaaaaaaaaaaaaaa",
"time": "2022-01-14T16:43:41.657Z"
}
]
},
"suppressFailures": true,
"protectedSettingsFromKeyVault": {
"sourceVault": {
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
},
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
}
},
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "aaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"location": "aaaaaaaaaaaaaaaa",
"tags": {
"key9428": "aaaaaaa"
}
}
],
"identity": {
"principalId": "aaaaaaaaaaaaaaaa",
"tenantId": "aaaaa",
"type": "SystemAssigned",
"userAssignedIdentities": {
"key5688": {
"principalId": "aaaaaaaaaaaaaaa",
"clientId": "aaaaaaaaaaa"
}
}
},
"zones": [
"aaaaaa"
],
"extendedLocation": {
"name": "aaaa",
"type": "EdgeZone"
}
}
],
"nextLink": "a://example.com/a"
}
VirtualMachine_List_MinimumSet_Gen
Sample request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines?api-version=2026-04-01&$expand=instanceView
Sample response
{
"value": [
{
"location": "eastus",
"id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}"
},
{
"location": "eastus",
"id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}"
}
]
}
Definitions
| Name | Description |
|---|---|
|
Additional |
Enables or disables a capability on the virtual machine or virtual machine scale set. |
|
Additional |
Specifies additional properties for a managed disk that can be set at the time of implicit creation of the disk. |
|
Additional |
Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. |
|
All |
Specifies if Scheduled Events should be auto-approved when all instances are down. |
|
Api |
The API entity reference. |
|
Api |
Api error. |
|
Api |
Api error base. |
|
Application |
Contains the list of gallery applications that should be made available to the VM/VMSS |
|
Availability |
Determines how to handle disks with slow I/O. |
|
Available |
Describes the properties of an virtual machine instance view for available patch summary. |
|
Billing |
Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01. |
|
Boot |
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. |
|
Boot |
The instance view of a virtual machine boot diagnostics. |
|
Caching |
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage |
|
Capacity |
The parameters of a capacity reservation Profile. |
|
Capacity |
Specifies which type of capacity reservation the virtual machine will consume capacity from if eligible or whether it is explicitly opted out from being associated and consuming capacity from any reserved capacity available in the subscription. Minimum api-version: 2026-04-01. |
|
Cloud |
An error response from the Compute service. |
|
Common. |
|
|
Component |
|
|
created |
The type of identity that created the resource. |
|
Data |
Describes a data disk. |
|
Delete |
Specify what happens to the network interface when the VM is deleted |
|
Diagnostics |
Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. |
|
Diff |
Specifies the ephemeral disk option for operating system disk. |
|
Diff |
Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk, resource disk or nvme disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Minimum api-version for NvmeDisk: 2024-03-01. |
|
Diff |
Describes the parameters of ephemeral disk settings that can be specified for operating system disk. Note: The ephemeral disk settings can only be specified for managed disk. |
|
Disk |
Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD. |
|
Disk |
In the case of an availability or connectivity issue with the disk, specify the behavior of your VM. |
|
Disk |
Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes. |
|
Disk |
Specifies how the virtual machine disk should be created. Possible values are Attach: This value is used when you are using a specialized disk to create the virtual machine. FromImage: This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. Empty: This value is used when creating an empty data disk. Copy: This value is used to create a data disk from a snapshot or another disk. Restore: This value is used to create a data disk from a disk restore point. |
|
Disk |
Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: Delete. If this value is used, the managed disk is deleted when VM gets deleted. Detach. If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01. |
|
Disk |
Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: ForceDetach. detachOption: ForceDetach is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. This feature is still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. |
|
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. |
|
Disk |
Describes a Encryption Settings for a Disk |
|
Disk |
The instance view of the disk. |
|
Domain |
The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created |
|
Encryption |
Specifies the Managed Identity used by ADE to get access token for keyvault operations. |
|
Event |
Specifies eventGridAndResourceGraph related Scheduled Event related configurations. |
|
Expand |
|
|
Extended |
The complex type of the extended location. |
|
Extended |
The type of the extended location. |
|
Hardware |
Specifies the hardware settings for the virtual machine. |
|
Host |
Specifies particular host endpoint settings. |
|
Hyper |
Specifies the HyperVGeneration Type associated with a resource |
|
Image |
Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. |
|
Inner |
Inner error details. |
|
Instance |
Instance view status. |
|
Interconnect |
The parameters of an Interconnect Block Profile. |
|
Interconnect |
Specifies the interconnect group profile for a virtual machine, used to associate the VM with an interconnect group and subgroups. |
|
Interconnect |
The Interconnect Block instance view details for a Virtual Machine or Scale Set VM instance. |
| IPVersions |
Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. |
|
Key |
Describes a reference to Key Vault Key |
|
Key |