Skip to main content

webhooks

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

Overview

Namewebhooks
TypeResource
Idazure.automation.webhooks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
propertiesobjectGets or sets the webhook properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, automationAccountName, webhookName, subscriptionIdRetrieve the webhook identified by webhook name.
list_by_automation_accountselectresourceGroupName, automationAccountName, subscriptionId$filterRetrieve a list of webhooks.
create_or_updateinsertresourceGroupName, automationAccountName, webhookName, subscriptionId, data__name, data__propertiesCreate the webhook identified by webhook name.
updateupdateresourceGroupName, automationAccountName, webhookName, subscriptionIdUpdate the webhook identified by webhook name.
deletedeleteresourceGroupName, automationAccountName, webhookName, subscriptionIdDelete the webhook by name.
generate_uriexecresourceGroupName, automationAccountName, subscriptionIdGenerates a Uri for use in creating a 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
automationAccountNamestringThe name of the automation account.
resourceGroupNamestringName of an Azure Resource group.
subscriptionIdstringGets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
webhookNamestringThe webhook name.
$filterstringThe filter to apply on the operation.

SELECT examples

Retrieve the webhook identified by webhook name.

SELECT
properties
FROM azure.automation.webhooks
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationAccountName = '{{ automationAccountName }}' -- required
AND webhookName = '{{ webhookName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create the webhook identified by webhook name.

INSERT INTO azure.automation.webhooks (
data__name,
data__properties,
resourceGroupName,
automationAccountName,
webhookName,
subscriptionId
)
SELECT
'{{ name }}' /* required */,
'{{ properties }}' /* required */,
'{{ resourceGroupName }}',
'{{ automationAccountName }}',
'{{ webhookName }}',
'{{ subscriptionId }}'
RETURNING
properties
;

UPDATE examples

Update the webhook identified by webhook name.

UPDATE azure.automation.webhooks
SET
data__name = '{{ name }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND automationAccountName = '{{ automationAccountName }}' --required
AND webhookName = '{{ webhookName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Delete the webhook by name.

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

Lifecycle Methods

Generates a Uri for use in creating a webhook.

EXEC azure.automation.webhooks.generate_uri 
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;