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
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
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

ExpandTypeForListVMs

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

VirtualMachineListResult

The request has succeeded.

Other Status Codes

CloudError

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

VirtualMachine_List_MaximumSet_Gen
VirtualMachine_List_MinimumSet_Gen

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
AdditionalCapabilities

Enables or disables a capability on the virtual machine or virtual machine scale set.

AdditionalDiskProperties

Specifies additional properties for a managed disk that can be set at the time of implicit creation of the disk.

AdditionalUnattendContent

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.

AllInstancesDown

Specifies if Scheduled Events should be auto-approved when all instances are down.

ApiEntityReference

The API entity reference.

ApiError

Api error.

ApiErrorBase

Api error base.

ApplicationProfile

Contains the list of gallery applications that should be made available to the VM/VMSS

AvailabilityPolicyDiskDelay

Determines how to handle disks with slow I/O.

AvailablePatchSummary

Describes the properties of an virtual machine instance view for available patch summary.

BillingProfile

Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.

BootDiagnostics

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.

BootDiagnosticsInstanceView

The instance view of a virtual machine boot diagnostics.

CachingTypes

Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage

CapacityReservationProfile

The parameters of a capacity reservation Profile.

CapacityReservationType

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.

CloudError

An error response from the Compute service.

Common.UserAssignedIdentitiesValue
ComponentNames
createdByType

The type of identity that created the resource.

DataDisk

Describes a data disk.

DeleteOptions

Specify what happens to the network interface when the VM is deleted

DiagnosticsProfile

Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

DiffDiskOptions

Specifies the ephemeral disk option for operating system disk.

DiffDiskPlacement

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.

DiffDiskSettings

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.

DiskApiVersion

Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD.

DiskAvailabilityPolicy

In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.

DiskControllerTypes

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.

DiskCreateOptionTypes

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.

DiskDeleteOptionTypes

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.

DiskDetachOptionTypes

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'.

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.

DiskEncryptionSettings

Describes a Encryption Settings for a Disk

DiskInstanceView

The instance view of the disk.

DomainNameLabelScopeTypes

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

EncryptionIdentity

Specifies the Managed Identity used by ADE to get access token for keyvault operations.

EventGridAndResourceGraph

Specifies eventGridAndResourceGraph related Scheduled Event related configurations.

ExpandTypeForListVMs
ExtendedLocation

The complex type of the extended location.

ExtendedLocationTypes

The type of the extended location.

HardwareProfile

Specifies the hardware settings for the virtual machine.

HostEndpointSettings

Specifies particular host endpoint settings.

HyperVGenerationType

Specifies the HyperVGeneration Type associated with a resource

ImageReference

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.

InnerError

Inner error details.

InstanceViewStatus

Instance view status.

InterconnectBlockProfile

The parameters of an Interconnect Block Profile.

InterconnectGroupProfile

Specifies the interconnect group profile for a virtual machine, used to associate the VM with an interconnect group and subgroups.

InterconnectInstanceView

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'.

KeyVaultKeyReference

Describes a reference to Key Vault Key

KeyVault