Skip to main content

virtual_machine_image_templates

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

Overview

Namevirtual_machine_image_templates
TypeResource
Idazure.image_builder.virtual_machine_image_templates

Fields

NameDatatypeDescription
auto_runtextfield from the properties object
build_timeout_in_minutestextfield from the properties object
customizetextfield from the properties object
distributetextfield from the properties object
error_handlingtextfield from the properties object
exact_staging_resource_grouptextfield from the properties object
identitytextIdentity for the image template.
imageTemplateNametextfield from the properties object
last_run_statustextfield from the properties object
locationtextThe geo-location where the resource lives
managed_resource_tagstextfield from the properties object
optimizetextfield from the properties object
provisioning_errortextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
sourcetextfield from the properties object
staging_resource_grouptextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
validatetextfield from the properties object
vm_profiletextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTimageTemplateName, resourceGroupName, subscriptionIdGet information about a virtual machine image template
listSELECTsubscriptionIdGets information about the VM image templates associated with the subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets information about the VM image templates associated with the specified resource group.
create_or_updateINSERTimageTemplateName, resourceGroupName, subscriptionId, data__identityCreate or update a virtual machine image template
deleteDELETEimageTemplateName, resourceGroupName, subscriptionIdDelete a virtual machine image template
updateUPDATEimageTemplateName, resourceGroupName, subscriptionIdUpdate the tags for this Virtual Machine Image Template
cancelEXECimageTemplateName, resourceGroupName, subscriptionIdCancel the long running image build based on the image template
runEXECimageTemplateName, resourceGroupName, subscriptionIdCreate artifacts from a existing image template

SELECT examples

Gets information about the VM image templates associated with the subscription.

SELECT
auto_run,
build_timeout_in_minutes,
customize,
distribute,
error_handling,
exact_staging_resource_group,
identity,
imageTemplateName,
last_run_status,
location,
managed_resource_tags,
optimize,
provisioning_error,
provisioning_state,
resourceGroupName,
source,
staging_resource_group,
subscriptionId,
tags,
validate,
vm_profile
FROM azure.image_builder.vw_virtual_machine_image_templates
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.image_builder.virtual_machine_image_templates (
imageTemplateName,
resourceGroupName,
subscriptionId,
data__identity,
properties,
identity,
tags,
location
)
SELECT
'{{ imageTemplateName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__identity }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a virtual_machine_image_templates resource.

/*+ update */
UPDATE azure.image_builder.virtual_machine_image_templates
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
imageTemplateName = '{{ imageTemplateName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified virtual_machine_image_templates resource.

/*+ delete */
DELETE FROM azure.image_builder.virtual_machine_image_templates
WHERE imageTemplateName = '{{ imageTemplateName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';