Skip to content

Commit 3cfb2c7

Browse files
authored
Merge pull request #191896 from SGSneha/16Mar-HRW-RESTAPI
edited the steps in HRW-RESTAPI procedure
2 parents fc72caf + 87d9bc6 commit 3cfb2c7

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

articles/automation/extension-based-hybrid-runbook-worker-install.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy an extension-based Windows or Linux User Hybrid Runbook Worker in
33
description: This article tells how to deploy an extension-based Windows or Linux Hybrid Runbook Worker that you can use to run runbooks on Windows-based machines in your local datacenter or cloud environment.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 09/28/2021
6+
ms.date: 03/17/2021
77
ms.topic: how-to
88
#Customer intent: As a developer, I want to learn about extension so that I can efficiently deploy Hybrid Runbook Workers.
99
---
@@ -571,7 +571,6 @@ To install and use Hybrid Worker extension using REST API, follow these steps. T
571571
{
572572
"properties": {"vmResourceId": "{VmResourceId}"}
573573
}
574-
575574
```
576575

577576
Response of PUT call confirms if the Hybrid worker is created or not. To reconfirm, you would have to make another GET call on Hybrid worker as follows.
@@ -592,49 +591,54 @@ To install and use Hybrid Worker extension using REST API, follow these steps. T
592591

593592
The API call will provide the value with the key: `AutomationHybridServiceUrl`. Use the URL in the next step to enable extension on the VM.
594593

595-
1. Install the Hybrid Worker Extension on the VM by running the following PowerShell cmdlet
596-
`(Required module: Az.Compute)`. Use the *properties.automationHybridServiceUrl* provided by the above API call.
597-
```azurepowershell-interactive
594+
1. Install the Hybrid Worker Extension on Azure VM by using the following API call.
595+
596+
```http
597+
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}?api-version=2021-11-01
598598
599-
$settings = @{
600-
"AutomationAccountURL" = <AutomationHybridServiceUrl>;
601-
};
602-
Set-AzVMExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType <HybridWorkerForWindows/HybridWorkerForLinux> -TypeHandlerVersion 0.1 -Settings $settings
603-
```
599+
```
600+
601+
The request body should contain the following information:
604602
605-
For ARC VMs, use the below cmdlet for enabling the extension.
603+
```json
604+
{
605+
"location": "<VMLocation>",
606+
"properties": {
607+
"publisher": "Microsoft.Azure.Automation.HybridWorker",
608+
"type": "<HybridWorkerForWindows/HybridWorkerForLinux>",
609+
"typeHandlerVersion": <version>,
610+
"settings": {
611+
"AutomationAccountURL" = "<AutomationHybridServiceUrl>"
612+
}
613+
}
614+
}
606615
607-
```azurepowershell-interactive
608-
New-AzConnectedMachineExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType <HybridWorkerForWindows/HybridWorkerForLinux> -TypeHandlerVersion 0.1 -Settings $settings
609-
```
610-
The Output of the above commands will confirm if the extension is successfully installed or not on the targeted VM. You can also go to the VM in the Azure portal, and check status of extensions installed on the target VM under **Extensions** tab.
616+
```
617+
618+
For ARC VMs, use the below API call for enabling the extension:
611619
612-
1. Go to the **Portal** page of the VM and in the **Extensions** tab, you can check the status of the Hybrid Worker Extension installation.
613-
614-
1. Run the below API call to start executing jobs on the new Hybrid worker.
615-
616-
```http
617-
PUT
618-
https://westcentralus.management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}?api-version=2017-05-15-preview
619-
620-
```
620+
```http
621+
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}?api-version=2021-05-20
621622
623+
```
624+
622625
The request body should contain the following information:
623626
624-
```
625-
{
626-
"properties": {
627-
"runbook": {
628-
"name": "{RunbookName}"
629-
},
630-
"parameters": {
631-
"key01": "value01",
632-
"key02": "value02"
633-
},
634-
"runOn": "{hybridRunbookWorkerGroupName}"
627+
```json
628+
{
629+
"location": "<VMLocation>",
630+
"properties": {
631+
"publisher": "Microsoft.Azure.Automation.HybridWorker",
632+
"type": "<HybridWorkerForWindows/HybridWorkerForLinux>",
633+
"typeHandlerVersion": <version>,
634+
"settings": {
635+
"AutomationAccountURL" = "<AutomationHybridServiceUrl>"
636+
}
635637
}
636-
}
637-
```
638+
}
639+
```
640+
Response of the *PUT* call will confirm if the extension is successfully installed or not on the targeted VM. You can also go to the VM in the Azure portal, and check status of extensions installed on the target VM under **Extensions** tab.
641+
638642
639643
## Manage Role permissions for Hybrid Worker Groups and Hybrid Workers
640644

0 commit comments

Comments
 (0)