Skip to main content

images

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

Overview

Nameimages
TypeResource
Idazure.compute.images

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
extended_locationtextfield from the properties object
hyper_v_generationtextfield from the properties object
imageNametextfield from the properties object
locationtextResource location
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
source_virtual_machinetextfield from the properties object
storage_profiletextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTimageName, resourceGroupName, subscriptionIdGets an image.
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.
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.
create_or_updateINSERTimageName, resourceGroupName, subscriptionIdCreate or update an image.
deleteDELETEimageName, resourceGroupName, subscriptionIdDeletes an Image.
updateUPDATEimageName, resourceGroupName, subscriptionIdUpdate an image.

SELECT examples

Gets 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.

SELECT
id,
name,
extended_location,
hyper_v_generation,
imageName,
location,
provisioning_state,
resourceGroupName,
source_virtual_machine,
storage_profile,
subscriptionId,
tags,
type
FROM azure.compute.vw_images
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new images resource.

/*+ create */
INSERT INTO azure.compute.images (
imageName,
resourceGroupName,
subscriptionId,
properties,
extendedLocation,
location,
tags
)
SELECT
'{{ imageName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a images resource.

/*+ update */
UPDATE azure.compute.images
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
imageName = '{{ imageName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified images resource.

/*+ delete */
DELETE FROM azure.compute.images
WHERE imageName = '{{ imageName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';