| Description | : Gets all the virtual machines under the specified subscription for the specified location. |
| Reference | : Link ¶ |
⚶ Changes
{
"#id": "VirtualMachines_ListByLocation",
"$responses": {
"200": {
"$properties": {
"value": {
"$properties": {
"properties": [
{
"storageProfile": [
{
"dataDisks": {
"$properties": [
{
"#name": "diskIOPSReadWrite",
"Description": {
"new": "Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS.",
"old": "Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set."
}
},
{
"#name": "diskMBpsReadWrite",
"Description": {
"new": "Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS.",
"old": "Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set."
}
}
]
}
}
]
}
]
}
}
}
}
}
}
⚼ Request
GET:
/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines
{
api-version:
string
,
subscriptionId:
string
,
location:
string
,
}
⚐ Response (200)
{
value:
[
]
,
{
,
properties:
{
,
hardwareProfile:
{
,
vmSize:
enum
,
vmSizeProperties:
}
{
,
vCPUsAvailable:
integer
,
vCPUsPerCore:
integer
,
}
scheduledEventsPolicy:
{
,
userInitiatedRedeploy:
{
,
automaticallyApprove:
boolean
,
}
userInitiatedReboot:
{
,
automaticallyApprove:
boolean
,
}
scheduledEventsAdditionalPublishingTargets:
{
,
eventGridAndResourceGraph:
}
{
,
enable:
boolean
,
scheduledEventsApiVersion:
string
,
}
allInstancesDown:
}
{
,
automaticallyApprove:
boolean
,
}
storageProfile:
{
,
imageReference:
{
,
publisher:
string
,
offer:
string
,
sku:
string
,
version:
string
,
exactVersion:
string
,
sharedGalleryImageId:
string
,
communityGalleryImageId:
string
,
}
osDisk:
{
,
osType:
enum
,
encryptionSettings:
{
,
diskEncryptionKey:
{
,
secretUrl:
string
,
sourceVault:
}
{
,
id:
string
,
}
keyEncryptionKey:
{
,
keyUrl:
string
,
sourceVault:
}
{
,
id:
string
,
}
enabled:
boolean
,
}
name:
string
,
vhd:
{
,
uri:
string
,
}
image:
{
,
uri:
string
,
}
caching:
enum
,
writeAcceleratorEnabled:
boolean
,
diffDiskSettings:
{
,
option:
enum
,
placement:
enum
,
}
createOption:
enum
,
diskSizeGB:
integer
,
managedDisk:
{
,
storageAccountType:
enum
,
diskEncryptionSet:
object
,
securityProfile:
}
{
,
securityEncryptionType:
enum
,
diskEncryptionSet:
object
,
}
deleteOption:
enum
,
}
dataDisks:
[
]
,
{
,
lun:
integer
,
name:
string
,
vhd:
{
,
uri:
string
,
}
image:
{
,
uri:
string
,
}
caching:
enum
,
writeAcceleratorEnabled:
boolean
,
createOption:
enum
,
diskSizeGB:
integer
,
managedDisk:
{
,
storageAccountType:
enum
,
diskEncryptionSet:
object
,
securityProfile:
}
{
,
securityEncryptionType:
enum
,
diskEncryptionSet:
object
,
}
sourceResource:
{
,
id:
string
,
}
toBeDetached:
boolean
,
diskIOPSReadWrite:
integer
,
diskMBpsReadWrite:
integer
,
detachOption:
enum
,
deleteOption:
enum
,
}
diskControllerType:
enum
,
alignRegionalDisksToVMZone:
boolean
,
}
additionalCapabilities:
{
,
ultraSSDEnabled:
boolean
,
hibernationEnabled:
boolean
,
enableFips1403Encryption:
boolean
,
}
osProfile:
{
,
computerName:
string
,
adminUsername:
string
,
adminPassword:
string
,
customData:
string
,
windowsConfiguration:
{
,
provisionVMAgent:
boolean
,
enableAutomaticUpdates:
boolean
,
timeZone:
string
,
additionalUnattendContent:
[
]
,
{
,
passName:
enum
,
componentName:
enum
,
settingName:
enum
,
content:
string
,
}
patchSettings:
{
,
patchMode:
enum
,
enableHotpatching:
boolean
,
assessmentMode:
enum
,
automaticByPlatformSettings:
}
{
,
rebootSetting:
enum
,
bypassPlatformSafetyChecksOnUserSchedule:
boolean
,
}
winRM:
{
,
listeners:
}
[
]
,
{
,
protocol:
enum
,
certificateUrl:
string
,
}
enableVMAgentPlatformUpdates:
boolean
,
}
linuxConfiguration:
{
,
disablePasswordAuthentication:
boolean
,
ssh:
{
,
publicKeys:
}
[
]
,
{
,
path:
string
,
keyData:
string
,
}
provisionVMAgent:
boolean
,
patchSettings:
{
,
patchMode:
enum
,
assessmentMode:
enum
,
automaticByPlatformSettings:
}
{
,
rebootSetting:
enum
,
bypassPlatformSafetyChecksOnUserSchedule:
boolean
,
}
enableVMAgentPlatformUpdates:
boolean
,
}
secrets:
[
]
,
{
,
sourceVault:
{
,
id:
string
,
}
vaultCertificates:
}
[
]
,
{
,
certificateUrl:
string
,
certificateStore:
string
,
}
allowExtensionOperations:
boolean
,
requireGuestProvisionSignal:
boolean
,
}
networkProfile:
{
,
networkInterfaces:
[
]
,
{
,
properties:
}
{
,
primary:
boolean
,
deleteOption:
enum
,
}
networkApiVersion:
enum
,
networkInterfaceConfigurations:
}
[
]
,
{
,
name:
string
,
properties:
{
,
primary:
boolean
,
deleteOption:
enum
,
enableAcceleratedNetworking:
boolean
,
disableTcpStateTracking:
boolean
,
enableFpga:
boolean
,
enableIPForwarding:
boolean
,
networkSecurityGroup:
{
,
id:
string
,
}
dnsSettings:
{
,
dnsServers:
}
[
,
string
,
]
ipConfigurations:
[
]
,
{
,
name:
string
,
properties:
}
{
,
subnet:
{
,
id:
string
,
}
primary:
boolean
,
publicIPAddressConfiguration:
{
,
name:
string
,
properties:
{
,
idleTimeoutInMinutes:
integer
,
deleteOption:
enum
,
dnsSettings:
{
,
domainNameLabel:
string
,
domainNameLabelScope:
enum
,
}
ipTags:
[
]
,
{
,
ipTagType:
string
,
tag:
string
,
}
publicIPPrefix:
{
,
id:
string
,
}
publicIPAddressVersion:
enum
,
publicIPAllocationMethod:
enum
,
}
sku:
{
,
name:
enum
,
tier:
enum
,
}
tags:
object
,
}
privateIPAddressVersion:
enum
,
applicationSecurityGroups:
[
]
,
{
,
id:
string
,
}
applicationGatewayBackendAddressPools:
[
]
,
{
,
id:
string
,
}
loadBalancerBackendAddressPools:
}
[
]
,
{
,
id:
string
,
}
dscpConfiguration:
{
,
id:
string
,
}
auxiliaryMode:
enum
,
auxiliarySku:
enum
,
}
tags:
object
,
}
securityProfile:
{
,
uefiSettings:
{
,
secureBootEnabled:
boolean
,
vTpmEnabled:
boolean
,
}
encryptionAtHost:
boolean
,
securityType:
enum
,
encryptionIdentity:
{
,
userAssignedIdentityResourceId:
string
,
}
proxyAgentSettings:
}
{
,
enabled:
boolean
,
mode:
enum
,
keyIncarnationId:
integer
,
wireServer:
{
,
mode:
enum
,
inVMAccessControlProfileReferenceId:
string
,
}
imds:
{
,
mode:
enum
,
inVMAccessControlProfileReferenceId:
string
,
}
addProxyAgentExtension:
boolean
,
}
diagnosticsProfile:
{
,
bootDiagnostics:
}
{
,
enabled:
boolean
,
storageUri:
string
,
}
availabilitySet:
{
,
id:
string
,
}
virtualMachineScaleSet:
{
,
id:
string
,
}
proximityPlacementGroup:
{
,
id:
string
,
}
priority:
enum
,
evictionPolicy:
enum
,
billingProfile:
{
,
maxPrice:
number
,
}
host:
{
,
id:
string
,
}
hostGroup:
{
,
id:
string
,
}
provisioningState:
string
,
instanceView:
{
,
platformUpdateDomain:
integer
,
platformFaultDomain:
integer
,
computerName:
string
,
osName:
string
,
osVersion:
string
,
hyperVGeneration:
enum
,
rdpThumbPrint:
string
,
vmAgent:
{
,
vmAgentVersion:
string
,
extensionHandlers:
[
]
,
{
,
type:
string
,
typeHandlerVersion:
string
,
status:
}
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
statuses:
}
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
maintenanceRedeployStatus:
{
,
isCustomerInitiatedMaintenanceAllowed:
boolean
,
preMaintenanceWindowStartTime:
string
,
preMaintenanceWindowEndTime:
string
,
maintenanceWindowStartTime:
string
,
maintenanceWindowEndTime:
string
,
lastOperationResultCode:
enum
,
lastOperationMessage:
string
,
}
disks:
[
]
,
{
,
name:
string
,
encryptionSettings:
[
]
,
{
,
diskEncryptionKey:
{
,
secretUrl:
string
,
sourceVault:
}
{
,
id:
string
,
}
keyEncryptionKey:
{
,
keyUrl:
string
,
sourceVault:
}
{
,
id:
string
,
}
enabled:
boolean
,
}
statuses:
}
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
extensions:
[
]
,
{
,
name:
string
,
type:
string
,
typeHandlerVersion:
string
,
substatuses:
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
statuses:
}
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
vmHealth:
{
,
status:
}
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
bootDiagnostics:
{
,
consoleScreenshotBlobUri:
string
,
serialConsoleLogBlobUri:
string
,
status:
}
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
assignedHost:
string
,
statuses:
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
patchStatus:
{
,
availablePatchSummary:
{
,
status:
enum
,
assessmentActivityId:
string
,
rebootPending:
boolean
,
criticalAndSecurityPatchCount:
integer
,
otherPatchCount:
integer
,
startTime:
string
,
lastModifiedTime:
string
,
error:
}
{
,
details:
[
]
,
{
,
code:
string
,
target:
string
,
message:
string
,
}
innererror:
{
,
exceptiontype:
string
,
errordetail:
string
,
}
code:
string
,
target:
string
,
message:
string
,
}
lastPatchInstallationSummary:
{
,
status:
enum
,
installationActivityId:
string
,
maintenanceWindowExceeded:
boolean
,
notSelectedPatchCount:
integer
,
excludedPatchCount:
integer
,
pendingPatchCount:
integer
,
installedPatchCount:
integer
,
failedPatchCount:
integer
,
startTime:
string
,
lastModifiedTime:
string
,
error:
}
{
,
details:
[
]
,
{
,
code:
string
,
target:
string
,
message:
string
,
}
innererror:
{
,
exceptiontype:
string
,
errordetail:
string
,
}
code:
string
,
target:
string
,
message:
string
,
}
configurationStatuses:
}
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
isVMInStandbyPool:
boolean
,
}
licenseType:
string
,
vmId:
string
,
extensionsTimeBudget:
string
,
platformFaultDomain:
integer
,
scheduledEventsProfile:
{
,
terminateNotificationProfile:
{
,
notBeforeTimeout:
string
,
enable:
boolean
,
}
osImageNotificationProfile:
}
{
,
notBeforeTimeout:
string
,
enable:
boolean
,
}
userData:
string
,
capacityReservation:
{
,
capacityReservationGroup:
}
{
,
id:
string
,
}
applicationProfile:
{
,
galleryApplications:
}
[
]
,
{
,
tags:
string
,
order:
integer
,
packageReferenceId:
string
,
configurationReference:
string
,
treatFailureAsDeploymentFailure:
boolean
,
enableAutomaticUpgrade:
boolean
,
}
timeCreated:
string
,
}
plan:
{
,
name:
string
,
publisher:
string
,
product:
string
,
promotionCode:
string
,
}
resources:
[
]
,
{
,
properties:
}
{
,
forceUpdateTag:
string
,
publisher:
string
,
type:
string
,
typeHandlerVersion:
string
,
autoUpgradeMinorVersion:
boolean
,
enableAutomaticUpgrade:
boolean
,
settings:
string
,
protectedSettings:
string
,
provisioningState:
string
,
instanceView:
{
,
name:
string
,
type:
string
,
typeHandlerVersion:
string
,
substatuses:
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
statuses:
}
[
]
,
{
,
code:
string
,
level:
enum
,
displayStatus:
string
,
message:
string
,
time:
string
,
}
suppressFailures:
boolean
,
protectedSettingsFromKeyVault:
{
,
secretUrl:
string
,
sourceVault:
}
{
,
id:
string
,
}
provisionAfterExtensions:
}
[
,
string
,
]
identity:
{
,
principalId:
string
,
tenantId:
string
,
type:
enum
,
userAssignedIdentities:
object
,
}
zones:
[
,
string
,
]
extendedLocation:
{
,
name:
string
,
type:
enum
,
}
managedBy:
string
,
etag:
string
,
placement:
}
{
,
zonePlacementPolicy:
enum
,
includeZones:
[
,
string
,
]
excludeZones:
}
[
,
string
,
]
nextLink:
string
,
}
⚐ Response (default)
{
error:
}
{
,
details:
[
]
,
{
,
code:
string
,
target:
string
,
message:
string
,
}
innererror:
{
,
exceptiontype:
string
,
errordetail:
string
,
}
code:
string
,
target:
string
,
message:
string
,
}