webhooks
Creates, updates, deletes, gets or lists a webhooks
resource.
Overview
Name | webhooks |
Type | Resource |
Id | azure.container_registry.webhooks |
Fields
- vw_webhooks
- webhooks
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | text | The name of the resource |
actions | text | field from the properties object |
provisioning_state | text | field from the properties object |
registryName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
scope | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
webhookName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | The properties of a webhook. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | registryName, resourceGroupName, subscriptionId, webhookName | Gets the properties of the specified webhook. |
list | SELECT | registryName, resourceGroupName, subscriptionId | Lists all the webhooks for the specified container registry. |
create | INSERT | registryName, resourceGroupName, subscriptionId, webhookName, data__location | Creates a webhook for a container registry with the specified parameters. |
delete | DELETE | registryName, resourceGroupName, subscriptionId, webhookName | Deletes a webhook from a container registry. |
update | UPDATE | registryName, resourceGroupName, subscriptionId, webhookName | Updates a webhook with the specified parameters. |
ping | EXEC | registryName, resourceGroupName, subscriptionId, webhookName | Triggers a ping event to be sent to the webhook. |
SELECT
examples
Lists all the webhooks for the specified container registry.
- vw_webhooks
- webhooks
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 }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.container_registry.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: tags
value: object
- name: location
value: string
- name: properties
value:
- name: serviceUri
value: string
- name: customHeaders
value: object
- name: status
value: string
- name: scope
value: string
- name: actions
value:
- string
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 }}';