Skip to main content

webhooks

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

Overview

Namewebhooks
TypeResource
Idazure.container_registry.webhooks

Fields

The following fields are returned by SELECT queries:

The request was successful; the request was well-formed and received properly.

NameDatatypeDescription
idstringThe resource ID.
namestringThe name of the resource.
locationstringThe location of the resource. This cannot be changed after the resource is created.
propertiesobjectThe properties of the webhook.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectThe tags of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, registryName, webhookNameGets the properties of the specified webhook.
listselectsubscriptionId, resourceGroupName, registryNameLists all the webhooks for the specified container registry.
createinsertsubscriptionId, resourceGroupName, registryName, webhookName, data__locationCreates a webhook for a container registry with the specified parameters.
updateupdatesubscriptionId, resourceGroupName, registryName, webhookNameUpdates a webhook with the specified parameters.
deletedeletesubscriptionId, resourceGroupName, registryName, webhookNameDeletes a webhook from a container registry.
pingexecsubscriptionId, resourceGroupName, registryName, webhookNameTriggers a ping event to be sent to the webhook.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
registryNamestringThe name of the container registry.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
webhookNamestringThe name of the webhook.

SELECT examples

Gets the properties of the specified webhook.

SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure.container_registry.webhooks
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND registryName = '{{ registryName }}' -- required
AND webhookName = '{{ webhookName }}' -- required
;

INSERT examples

Creates a webhook for a container registry with the specified parameters.

INSERT INTO azure.container_registry.webhooks (
data__tags,
data__location,
data__properties,
subscriptionId,
resourceGroupName,
registryName,
webhookName
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ registryName }}',
'{{ webhookName }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a webhook with the specified parameters.

UPDATE azure.container_registry.webhooks
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND registryName = '{{ registryName }}' --required
AND webhookName = '{{ webhookName }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a webhook from a container registry.

DELETE FROM azure.container_registry.webhooks
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND registryName = '{{ registryName }}' --required
AND webhookName = '{{ webhookName }}' --required
;

Lifecycle Methods

Triggers a ping event to be sent to the webhook.

EXEC azure.container_registry.webhooks.ping 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@registryName='{{ registryName }}' --required,
@webhookName='{{ webhookName }}' --required
;