Skip to main content

virtual_machine_images

Creates, updates, deletes, gets or lists a virtual_machine_images resource.

Overview

Namevirtual_machine_images
TypeResource
Idazure.compute.virtual_machine_images

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the resource.
extendedLocationobjectThe extended location of the Virtual Machine.
locationstringThe supported Azure location of the resource.
propertiesobjectDescribes the properties of a Virtual Machine Image.
tagsobjectSpecifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize your Azure resources.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlocation, publisherName, offer, skus, version, subscriptionIdGets a virtual machine image.
list_by_edge_zoneselectlocation, edgeZone, subscriptionIdGets a list of all virtual machine image versions for the specified edge zone
listexeclocation, publisherName, offer, skus, subscriptionId$expand, $top, $orderbyGets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
edgeZonestringThe name of the edge zone.
locationstringThe name of a supported Azure region.
offerstringA valid image publisher offer.
publisherNamestringA valid image publisher.
skusstringA valid image SKU.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
versionstringA valid image SKU version.
$expandstringThe expand expression to apply on the operation.
$orderbystring
$topinteger (int32)

SELECT examples

Gets a virtual machine image.

SELECT
name,
extendedLocation,
location,
properties,
tags
FROM azure.compute.virtual_machine_images
WHERE location = '{{ location }}' -- required
AND publisherName = '{{ publisherName }}' -- required
AND offer = '{{ offer }}' -- required
AND skus = '{{ skus }}' -- required
AND version = '{{ version }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

Lifecycle Methods

Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.

EXEC azure.compute.virtual_machine_images.list 
@location='{{ location }}' --required,
@publisherName='{{ publisherName }}' --required,
@offer='{{ offer }}' --required,
@skus='{{ skus }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@$expand='{{ $expand }}',
@$top='{{ $top }}',
@$orderby='{{ $orderby }}'
;