Skip to main content

webhooks

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

Overview

Namewebhooks
TypeResource
Idazure.container_registry.webhooks

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
nametextThe name of the resource
actionstextfield from the properties object
provisioning_statetextfield from the properties object
registryNametextfield from the properties object
resourceGroupNametextfield from the properties object
scopetextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
webhookNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTregistryName, resourceGroupName, subscriptionId, webhookNameGets the properties of the specified webhook.
listSELECTregistryName, resourceGroupName, subscriptionIdLists all the webhooks for the specified container registry.
createINSERTregistryName, resourceGroupName, subscriptionId, webhookName, data__locationCreates a webhook for a container registry with the specified parameters.
deleteDELETEregistryName, resourceGroupName, subscriptionId, webhookNameDeletes a webhook from a container registry.
updateUPDATEregistryName, resourceGroupName, subscriptionId, webhookNameUpdates a webhook with the specified parameters.
pingEXECregistryName, resourceGroupName, subscriptionId, webhookNameTriggers a ping event to be sent to the webhook.

SELECT examples

Lists all the webhooks for the specified container registry.

SELECT
id,
name,
actions,
provisioning_state,
registryName,
resourceGroupName,
scope,
status,
subscriptionId,
system_data,
type,
webhookName
FROM azure.container_registry.vw_webhooks
WHERE registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.container_registry.webhooks (
registryName,
resourceGroupName,
subscriptionId,
webhookName,
data__location,
tags,
location,
properties
)
SELECT
'{{ registryName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ webhookName }}',
'{{ data__location }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;

UPDATE example

Updates a webhooks resource.

/*+ update */
UPDATE azure.container_registry.webhooks
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND webhookName = '{{ webhookName }}';

DELETE example

Deletes the specified webhooks resource.

/*+ delete */
DELETE FROM azure.container_registry.webhooks
WHERE registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND webhookName = '{{ webhookName }}';