Skip to main content

webhook

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

Overview

Namewebhook
TypeResource
Idazure.automation.webhook

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
creationTimestring (date-time)Gets or sets the creation time.
descriptionstringGets or sets the description.
expiryTimestring (date-time)Gets or sets the expiry time.
isEnabledbooleanGets or sets the value of the enabled flag of the webhook.
lastInvokedTimestring (date-time)Gets or sets the last invoked time.
lastModifiedBystringDetails of the user who last modified the Webhook.
lastModifiedTimestring (date-time)Gets or sets the last modified time.
parametersobjectGets or sets the parameters of the job that is created when the webhook calls the runbook it is associated with.
runOnstringGets or sets the name of the hybrid worker group the webhook job will run on.
runbookobjectGets or sets the runbook the webhook is associated with.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uristringGets or sets the webhook uri.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, automation_account_name, webhook_name, subscription_idRetrieve the webhook identified by webhook name.
list_by_automation_accountselectresource_group_name, automation_account_name, subscription_id$filterRetrieve a list of webhooks.
create_or_updateinsertresource_group_name, automation_account_name, webhook_name, subscription_id, name, propertiesCreate the webhook identified by webhook name.
updateupdateresource_group_name, automation_account_name, webhook_name, subscription_idUpdate the webhook identified by webhook name.
create_or_updatereplaceresource_group_name, automation_account_name, webhook_name, subscription_id, name, propertiesCreate the webhook identified by webhook name.
deletedeleteresource_group_name, automation_account_name, webhook_name, subscription_idDelete the webhook by name.
generate_uriexecresource_group_name, automation_account_name, subscription_idGenerates 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
automation_account_namestringThe name of the automation account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
webhook_namestringThe webhook name. Required.
$filterstringThe filter to apply on the operation. Default value is None.

SELECT examples

Retrieve the webhook identified by webhook name.

SELECT
id,
name,
creationTime,
description,
expiryTime,
isEnabled,
lastInvokedTime,
lastModifiedBy,
lastModifiedTime,
parameters,
runOn,
runbook,
systemData,
type,
uri
FROM azure.automation.webhook
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND webhook_name = '{{ webhook_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create the webhook identified by webhook name.

INSERT INTO azure.automation.webhook (
name,
properties,
resource_group_name,
automation_account_name,
webhook_name,
subscription_id
)
SELECT
'{{ name }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ webhook_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Update the webhook identified by webhook name.

UPDATE azure.automation.webhook
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND webhook_name = '{{ webhook_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Create the webhook identified by webhook name.

REPLACE azure.automation.webhook
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND webhook_name = '{{ webhook_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND name = '{{ name }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete the webhook by name.

DELETE FROM azure.automation.webhook
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND webhook_name = '{{ webhook_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Generates a Uri for use in creating a webhook.

EXEC azure.automation.webhook.generate_uri 
@resource_group_name='{{ resource_group_name }}' --required,
@automation_account_name='{{ automation_account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;