webhook
Creates, updates, deletes, gets or lists a webhook resource.
Overview
| Name | webhook |
| Type | Resource |
| Id | azure.automation.webhook |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_automation_account
| 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 resource. |
creationTime | string (date-time) | Gets or sets the creation time. |
description | string | Gets or sets the description. |
expiryTime | string (date-time) | Gets or sets the expiry time. |
isEnabled | boolean | Gets or sets the value of the enabled flag of the webhook. |
lastInvokedTime | string (date-time) | Gets or sets the last invoked time. |
lastModifiedBy | string | Details of the user who last modified the Webhook. |
lastModifiedTime | string (date-time) | Gets or sets the last modified time. |
parameters | object | Gets or sets the parameters of the job that is created when the webhook calls the runbook it is associated with. |
runOn | string | Gets or sets the name of the hybrid worker group the webhook job will run on. |
runbook | object | Gets or sets the runbook the webhook is associated with. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uri | string | Gets or sets the webhook uri. |
| 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 resource. |
creationTime | string (date-time) | Gets or sets the creation time. |
description | string | Gets or sets the description. |
expiryTime | string (date-time) | Gets or sets the expiry time. |
isEnabled | boolean | Gets or sets the value of the enabled flag of the webhook. |
lastInvokedTime | string (date-time) | Gets or sets the last invoked time. |
lastModifiedBy | string | Details of the user who last modified the Webhook. |
lastModifiedTime | string (date-time) | Gets or sets the last modified time. |
parameters | object | Gets or sets the parameters of the job that is created when the webhook calls the runbook it is associated with. |
runOn | string | Gets or sets the name of the hybrid worker group the webhook job will run on. |
runbook | object | Gets or sets the runbook the webhook is associated with. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uri | string | Gets or sets the webhook uri. |
Methods
The following methods are available for this resource:
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 |
|---|---|---|
automation_account_name | string | The name of the automation account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
webhook_name | string | The webhook name. Required. |
$filter | string | The filter to apply on the operation. Default value is None. |
SELECT examples
- get
- list_by_automation_account
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
;
Retrieve a list of webhooks.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: webhook
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the webhook resource.
- name: automation_account_name
value: "{{ automation_account_name }}"
description: Required parameter for the webhook resource.
- name: webhook_name
value: "{{ webhook_name }}"
description: Required parameter for the webhook resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the webhook resource.
- name: name
value: "{{ name }}"
description: |
Gets or sets the name of the webhook. Required.
- name: properties
description: |
Gets or sets the properties of the webhook. Required.
value:
isEnabled: {{ isEnabled }}
uri: "{{ uri }}"
expiryTime: "{{ expiryTime }}"
parameters: "{{ parameters }}"
runbook:
name: "{{ name }}"
runOn: "{{ runOn }}"
UPDATE examples
- update
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_or_update
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
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
- generate_uri
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
;