webhooks
Creates, updates, deletes, gets or lists a webhooks resource.
Overview
| Name | webhooks |
| Type | Resource |
| Id | azure.container_registry.webhooks |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the private link resource. |
actions | array | The list of actions that trigger the webhook to post notifications. Required. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | The provisioning state of the webhook at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
scope | string | The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. |
status | string | The status of the webhook at the time the operation was called. Known values are: "enabled" and "disabled". (enabled, disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the private link resource. |
actions | array | The list of actions that trigger the webhook to post notifications. Required. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | The provisioning state of the webhook at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
scope | string | The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. |
status | string | The status of the webhook at the time the operation was called. Known values are: "enabled" and "disabled". (enabled, disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, registry_name, webhook_name, subscription_id | Gets the properties of the specified webhook. | |
list | select | resource_group_name, registry_name, subscription_id | Lists all the webhooks for the specified container registry. | |
create | insert | resource_group_name, registry_name, webhook_name, subscription_id, location | Creates a webhook for a container registry with the specified parameters. | |
update | update | resource_group_name, registry_name, webhook_name, subscription_id | Updates a webhook with the specified parameters. | |
delete | delete | resource_group_name, registry_name, webhook_name, subscription_id | Deletes a webhook from a container registry. | |
list_events | exec | resource_group_name, registry_name, webhook_name, subscription_id | Lists recent events for the specified webhook. | |
get_callback_config | exec | resource_group_name, registry_name, webhook_name, subscription_id | Gets the configuration of service URI and custom headers for the webhook. | |
ping | exec | resource_group_name, registry_name, webhook_name, subscription_id | Triggers 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.
| Name | Datatype | Description |
|---|---|---|
registry_name | string | The name of the container registry. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
webhook_name | string | The name of the webhook. Required. |
SELECT examples
- get
- list
Gets the properties of the specified webhook.
SELECT
id,
name,
actions,
location,
provisioningState,
scope,
status,
systemData,
tags,
type
FROM azure.container_registry.webhooks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND webhook_name = '{{ webhook_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the webhooks for the specified container registry.
SELECT
id,
name,
actions,
location,
provisioningState,
scope,
status,
systemData,
tags,
type
FROM azure.container_registry.webhooks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates a webhook for a container registry with the specified parameters.
INSERT INTO azure.container_registry.webhooks (
tags,
location,
properties,
resource_group_name,
registry_name,
webhook_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ registry_name }}',
'{{ webhook_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: webhooks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the webhooks resource.
- name: registry_name
value: "{{ registry_name }}"
description: Required parameter for the webhooks resource.
- name: webhook_name
value: "{{ webhook_name }}"
description: Required parameter for the webhooks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the webhooks resource.
- name: tags
value: "{{ tags }}"
description: |
The tags for the webhook.
- name: location
value: "{{ location }}"
description: |
The location of the webhook. This cannot be changed after the resource is created. Required.
- name: properties
description: |
The properties that the webhook will be created with.
value:
serviceUri: "{{ serviceUri }}"
customHeaders: "{{ customHeaders }}"
status: "{{ status }}"
scope: "{{ scope }}"
actions:
- "{{ actions }}"
UPDATE examples
- update
Updates a webhook with the specified parameters.
UPDATE azure.container_registry.webhooks
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND webhook_name = '{{ webhook_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a webhook from a container registry.
DELETE FROM azure.container_registry.webhooks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND webhook_name = '{{ webhook_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_events
- get_callback_config
- ping
Lists recent events for the specified webhook.
EXEC azure.container_registry.webhooks.list_events
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@webhook_name='{{ webhook_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the configuration of service URI and custom headers for the webhook.
EXEC azure.container_registry.webhooks.get_callback_config
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@webhook_name='{{ webhook_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Triggers a ping event to be sent to the webhook.
EXEC azure.container_registry.webhooks.ping
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@webhook_name='{{ webhook_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;