Skip to main content

custom_images

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

Overview

Namecustom_images
TypeResource
Idazure.dev_test_labs.custom_images

Fields

NameDatatypeDescription
idtextThe identifier of the resource.
nametextThe name of the resource.
descriptiontextfield from the properties object
authortextfield from the properties object
creation_datetextfield from the properties object
custom_image_plantextfield from the properties object
data_disk_storage_infotextfield from the properties object
is_plan_authorizedtextfield from the properties object
labNametextfield from the properties object
locationtextThe location of the resource.
managed_image_idtextfield from the properties object
managed_snapshot_idtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextThe tags of the resource.
typetextThe type of the resource.
unique_identifiertextfield from the properties object
vhdtextfield from the properties object
vmtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, name, resourceGroupName, subscriptionIdGet custom image.
listSELECTlabName, resourceGroupName, subscriptionIdList custom images in a given lab.
create_or_updateINSERTlabName, name, resourceGroupName, subscriptionId, data__propertiesCreate or replace an existing custom image. This operation can take a while to complete.
deleteDELETElabName, name, resourceGroupName, subscriptionIdDelete custom image. This operation can take a while to complete.
updateUPDATElabName, name, resourceGroupName, subscriptionIdAllows modifying tags of custom images. All other properties will be ignored.

SELECT examples

List custom images in a given lab.

SELECT
id,
name,
description,
author,
creation_date,
custom_image_plan,
data_disk_storage_info,
is_plan_authorized,
labName,
location,
managed_image_id,
managed_snapshot_id,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type,
unique_identifier,
vhd,
vm
FROM azure.dev_test_labs.vw_custom_images
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.dev_test_labs.custom_images (
labName,
name,
resourceGroupName,
subscriptionId,
data__properties,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;

UPDATE example

Updates a custom_images resource.

/*+ update */
UPDATE azure.dev_test_labs.custom_images
SET
tags = '{{ tags }}'
WHERE
labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified custom_images resource.

/*+ delete */
DELETE FROM azure.dev_test_labs.custom_images
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';