Created
December 1, 2017 18:51
-
-
Save kenazk/ec47a75a6831a285e3382846b155bd41 to your computer and use it in GitHub Desktop.
Azure VM API description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are two API responses associated with an Azure VM: model view and instance view. | |
Documentation | |
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-get | |
Model view example: | |
{ | |
"id":"/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", | |
"vmId": "{vm-id}", | |
"name":"virtualMachineName”, | |
"type":"Microsoft.Compute/virtualMachines", | |
"location":"westus", | |
"tags":{ | |
"department":"finance" | |
}, | |
"properties":{ | |
"licenseType": "Windows_Server", | |
"availabilitySet":{ | |
"id":"/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAVSet" | |
}, | |
"hardwareProfile":{ | |
"vmSize":"Standard_A0" | |
}, | |
"storageProfile":{ | |
"imageReference":{ | |
"publisher":"MicrosoftWindowsServerEssentials", | |
"offer":"WindowsServerEssentials", | |
"sku":"WindowsServerEssentials", | |
"version":"1.0.131018", | |
"id": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServerEssentials/artifactype/vmimage/offers/WindowsServerEssentials/skus/WindowsServerEssentials/versions/latest" | |
}, | |
"osDisk":{ | |
"osType":"Windows", | |
"name":"osName-osDisk", | |
"managedDisk": { | |
"Id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk", | |
"storageAccountType": "Standard_LRS" | |
} | |
"vhd":{ | |
"uri":"http://mystorage.blob.core.windows.net/vhds/osDisk.vhd" | |
}, | |
"caching":"ReadWrite", | |
"createOption":"FromImage" | |
}, | |
"dataDisks":[ | |
] | |
}, | |
"osProfile":{ | |
"computerName":"virtualMachineName", | |
"adminUsername":"username", | |
"adminPassword":"password", | |
"customData":"", | |
"windowsConfiguration":{ | |
"provisionVMAgent":true, | |
"winRM": { | |
"listeners":[{ | |
"protocol": "https", | |
"certificateUrl": "[parameters('certificateUrl')]" | |
}] | |
}, | |
“additionalUnattendContent”:[ | |
{ | |
“pass”:“oobesystem”, | |
“component”:“Microsoft-Windows-Shell-Setup”, | |
“settingName”:“FirstLogonCommands|AutoLogon”, | |
“content”:“<XML unattend content>” | |
} "enableAutomaticUpdates":true | |
}, | |
"secrets":[ | |
] | |
}, | |
"networkProfile":{ | |
"networkInterfaces":[ | |
{ | |
"id":"/subscriptions/########-####-####-####-############/resourceGroups/CloudDep/providers/Microsoft.Network/networkInterfaces/myNic" | |
} | |
] | |
}, | |
"provisioningState":"succeeded" | |
} | |
} | |
Instance view example: | |
{ | |
"platformUpdateDomain": 0, | |
"platformFaultDomain": 0, | |
"vmAgent": { | |
"vmAgentVersion": "2.5.1198.709", | |
"statuses": [ | |
{ | |
"code": "ProvisioningState/succeeded", | |
"level": "Info", | |
"displayStatus": "Ready", | |
"message": "GuestAgent is running and accepting new configurations.", | |
"time": "2015-04-21T11:42:44-07:00" | |
} | |
] | |
}, | |
"disks": [ | |
{ | |
"name": "myosdisk", | |
"statuses": [ | |
{ | |
"code": "ProvisioningState/succeeded", | |
"level": "Info", | |
"displayStatus": "Provisioning succeeded", | |
"time": "2015-04-10T12:44:10.4562812-07:00" | |
} | |
] | |
} | |
], | |
"statuses": [ | |
{ | |
"code": "ProvisioningState/succeeded", | |
"level": "Info", | |
"displayStatus": "Provisioning succeeded", | |
"time": "2015-04-10T12:50:09.0031588-07:00" | |
}, | |
{ | |
"code": "PowerState/running", | |
"level": "Info", | |
"displayStatus": "VM running" | |
} | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment