0
votes

I searched in the Azure REST API documentation but I didn't find something.

I created several virtual machines using an image and I want to retrieve all this virtual machines with REST API Azure.

I'm wondering if there is an URI I can call to get all instances of a Virtual Machine image ?

1
if you do mind Virtual Machine Image please update your question and be more specific! Also describe what you have tried and where you hit issues. Stack Overflow is not place to ask where to find tutorial or other online resource.astaykov
Post updated ! I searched in the documentation but I didn't find any URI to do that. Where do you see I'm asking a tutorial ? I just want to know if I can retrieve this informations and if it's possible what is the URI to called.JGeo

1 Answers

0
votes

ListDisks Operation will give you all the Azure Disks that are present in your account.

The result set contains objects with properties like AttachedTo which you can use to identify a VM (if any) to which this disk is attached, or SourceImageName which you can use to identify the source image.

There is no direct API call to identify which images are in use. You have to make two calls - first one to get all disks and second one get all images. Then mix and match. (Or try out filtering the images only based on names, which you are interested in, but I am not sure whether the REST API supports filtering).