Skip to main content

triggers

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

Overview

Nametriggers
TypeResource
Idazure.image_builder.triggers

Fields

NameDatatypeDescription
imageTemplateNametextfield from the properties object
kindtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
triggerNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTimageTemplateName, resourceGroupName, subscriptionId, triggerNameGet the specified trigger for the specified image template resource
list_by_image_templateSELECTimageTemplateName, resourceGroupName, subscriptionIdList all triggers for the specified Image Template resource
create_or_updateINSERTimageTemplateName, resourceGroupName, subscriptionId, triggerNameCreate or update a trigger for the specified virtual machine image template
deleteDELETEimageTemplateName, resourceGroupName, subscriptionId, triggerNameDelete a trigger for the specified virtual machine image template

SELECT examples

List all triggers for the specified Image Template resource

SELECT
imageTemplateName,
kind,
provisioning_state,
resourceGroupName,
status,
subscriptionId,
triggerName
FROM azure.image_builder.vw_triggers
WHERE imageTemplateName = '{{ imageTemplateName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.image_builder.triggers (
imageTemplateName,
resourceGroupName,
subscriptionId,
triggerName,
properties
)
SELECT
'{{ imageTemplateName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ triggerName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified triggers resource.

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