You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -371,6 +371,9 @@ The limitations of Python runbooks are:
371
371
372
372
---
373
373
374
+
> [!NOTE]
375
+
> Using a webhook to start a Python runbook is not supported.
376
+
374
377
### Multiple Python versions
375
378
376
379
It's applicable for Windows Hybrid workers. For a Windows Runbook Worker, when running a Python 2 runbook it looks for the environment variable `PYTHON_2_PATH` first and validates whether it points to a valid executable file. For example, if the installation folder is `C:\Python2`, it would check if `C:\Python2\python.exe` is a valid path. If not found, then it looks for the `PATH` environment variable to do a similar check.
@@ -90,7 +90,10 @@ Consider the following strategies:
90
90
## Create a webhook
91
91
92
92
> [!NOTE]
93
-
> When you use the webhook with PowerShell 7 runbook, it auto-converts the webhook input parameter to an invalid JSON. For more information, see [Known issues - PowerShell 7.1 (preview)](./automation-runbook-types.md#limitations-and-known-issues). We recommend that you use the webhook with PowerShell 5 runbook.
93
+
> * When you use the webhook with PowerShell 7 runbook, it auto-converts the webhook input parameter to an invalid JSON. For more information, see [Known issues - PowerShell 7.1 (preview)](./automation-runbook-types.md#limitations-and-known-issues). We recommend that you use the webhook with PowerShell 5 runbook.
94
+
> * Using a webhook to start a Python runbook is not supported.
95
+
96
+
To create a webhook, follow these steps:
94
97
95
98
1. Create PowerShell runbook with the following code:
96
99
@@ -127,6 +130,8 @@ Consider the following strategies:
127
130
128
131
# [Azure portal](#tab/portal)
129
132
133
+
To create a webhook using the Azure portal, do the following:
134
+
130
135
1. Sign in to the [Azure portal](https://portal.azure.com/).
131
136
132
137
1. In the Azure portal, navigate to your Automation account.
@@ -145,7 +150,7 @@ Consider the following strategies:
145
150
146
151
1. Enter in the **Name** for the webhook. The expiration date for the field **Expires** defaults to one year from the current date.
147
152
148
-
1. Click the copy icon or press <kbd>Ctrl + C</kbd> copy the URL of the webhook. Then save the URL to a secure location.
153
+
1. Select the copy icon or press <kbd>Ctrl + C</kbd> copy the URL of the webhook. Then, save the URL to a secure location.
149
154
150
155
:::image type="content" source="media/automation-webhooks/create-new-webhook.png" alt-text="Create webhook page with URL highlighted.":::
151
156
@@ -164,6 +169,8 @@ Consider the following strategies:
164
169
165
170
# [PowerShell](#tab/powershell)
166
171
172
+
To create a webhook using PowerShell, do the following:
173
+
167
174
1. Verify you have the latest version of the PowerShell [Az Module](/powershell/azure/new-azureps-module-az) installed.
168
175
169
176
1. Sign in to Azure interactively using the [Connect-AzAccount](/powershell/module/Az.Accounts/Connect-AzAccount) cmdlet and follow the instructions.
@@ -214,6 +221,8 @@ Consider the following strategies:
214
221
215
222
# [REST API](#tab/rest)
216
223
224
+
To create a webhook using REST API, do the following:
225
+
217
226
The PUT command is documented at [Webhook - Create Or Update](/rest/api/automation/webhook/create-or-update). This example uses the PowerShell cmdlet [Invoke-RestMethod](/powershell/module/microsoft.powershell.utility/invoke-restmethod) to send the PUT request.
218
227
219
228
1. Create a file called `webhook.json` and then paste the following code:
@@ -302,6 +311,8 @@ Consider the following strategies:
302
311
303
312
This example uses the PowerShell cmdlet [Invoke-WebRequest](/powershell/module/microsoft.powershell.utility/invoke-webrequest) to send the POST request to your new webhook.
304
313
314
+
To use a webhook, follow these steps:
315
+
305
316
1. Prepare values to pass to the runbook as the body for the webhook call. For relatively simple values, you could script the values as follows:
306
317
307
318
```powershell
@@ -380,7 +391,7 @@ This example uses the PowerShell cmdlet [Invoke-WebRequest](/powershell/module/m
380
391
381
392
## Update a webhook
382
393
383
-
When a webhook is created, it has a validity time period of 10 years, after which it automatically expires. Once a webhook has expired, you can't reactivate it. You can only remove and then recreate it. You can extend a webhook that hasn't reached its expiration time. To extend a webhook, perform the following steps.
394
+
When a webhook is created, it has a validity time period of 10 years, after which it automatically expires. Once a webhook has expired, you can't reactivate it. You can only remove and then recreate it. You can extend a webhook that hasn't reached its expiration time. To extend a webhook, perform the following steps:
384
395
385
396
1. Navigate to the runbook that contains the webhook.
386
397
1. Under **Resources**, select **Webhooks**, and then the webhook that you want to extend.
@@ -413,6 +424,8 @@ Here are examples of removing a webhook from an Automation runbook.
413
424
414
425
Automation webhooks can also be created using [Azure Resource Manager](../azure-resource-manager/templates/overview.md) templates. This sample template creates an Automation account, four runbooks, and a webhook for the named runbook.
415
426
427
+
To create a webhook using an ARM template, follow these steps:
428
+
416
429
1. Create a file named `webhook_deploy.json` and then paste the following code:
0 commit comments