Skip to main content

images

Creates, updates, deletes, gets or lists an images resource.

Overview

Nameimages
TypeResource
Idazure.compute.images

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource Id
namestringResource name
extendedLocationobjectThe extended location of the Image.
locationstringResource location
propertiesobjectDescribes the properties of an Image.
tagsobjectResource tags
typestringResource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, imageName, subscriptionId$expandGets an image.
list_by_resource_groupselectresourceGroupName, subscriptionIdGets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
listselectsubscriptionIdGets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
create_or_updateinsertresourceGroupName, imageName, subscriptionIdCreate or update an image.
updateupdateresourceGroupName, imageName, subscriptionIdUpdate an image.
deletedeleteresourceGroupName, imageName, subscriptionIdDeletes an Image.

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
imageNamestringThe name of the image.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
$expandstringThe expand expression to apply on the operation.

SELECT examples

Gets an image.

SELECT
id,
name,
extendedLocation,
location,
properties,
tags,
type
FROM azure.compute.images
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND imageName = '{{ imageName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or update an image.

INSERT INTO azure.compute.images (
data__properties,
data__extendedLocation,
data__location,
data__tags,
resourceGroupName,
imageName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ extendedLocation }}',
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ imageName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
tags,
type
;

UPDATE examples

Update an image.

UPDATE azure.compute.images
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND imageName = '{{ imageName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
tags,
type;

DELETE examples

Deletes an Image.

DELETE FROM azure.compute.images
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND imageName = '{{ imageName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;