Skip to content

Commit 1d9ac00

Browse files
committed
New feedback incorporated, added tabs for Quickstart cli, updated cli version
1 parent 9ffa8d1 commit 1d9ac00

4 files changed

+64
-15
lines changed

articles/automation/manage-runtime-environment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Manage Runtime environment and associated runbooks in Azure Automation
33
description: This article tells how to manage runbooks in Runtime environment and associated runbooks Azure Automation
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 01/16/2024
6+
ms.date: 01/17/2024
77
ms.topic: conceptual
88
ms.custom: references_regions
99
---
@@ -68,7 +68,7 @@ An Azure Automation account in supported public region (except Central India, Ge
6868
:::image type="content" source="./media/manage-runtime-environment/packages-runtime-environment.png" alt-text="Screenshot shows the selections in packages tab of create runtime environment.":::
6969

7070
> [!NOTE]
71-
> Azure CLI commands are supported (preview) in runbooks associated with PowerShell 7.2 Runtime environment. Azure CLI commands version 2.52.0 are available as a default package in PowerShell 7.2 Runtime environment.
71+
> Azure CLI commands are supported (preview) in runbooks associated with PowerShell 7.2 Runtime environment. Azure CLI commands version 2.56.0 are available as a default package in PowerShell 7.2 Runtime environment.
7272
7373
1. To upload more Packages required during runbook execution. Select **Add a file** to add the file(s) stored locally on your computer or select **Add from gallery** to upload packages from PowerShell gallery.
7474

@@ -264,7 +264,7 @@ https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<reso
264264
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"
265265
}
266266
},
267-
location”: “East US
267+
"location": "East US"
268268
}
269269
```
270270
> [!NOTE]
@@ -301,7 +301,7 @@ PATCH
301301
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Automation/automationAccounts/<accountName>/runbooks/<runbookName>?api-version=2023-05-15-preview
302302
{
303303
"properties": {
304-
type”: “PowerShell
304+
"type": "PowerShell"
305305
"runtimeEnvironment": "<runtimeEnvironmentName>"
306306
}
307307
}

articles/automation/quickstart-cli-support-powershell-runbook-runtime-environment.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Add support for Azure CLI in PowerShell 7.2 runbooks in Runtime environme
33
titleSuffix: Azure Automation
44
description: This article shows how to add support for Azure CLI in PowerShell 7.2 runbooks in Runtime environment.
55
services: automation
6-
ms.date: 01/16/2024
6+
ms.date: 01/17/2024
77
ms.topic: conceptual
88
ms.custom: references_regions
99
---
@@ -13,7 +13,7 @@ ms.custom: references_regions
1313
You can run Azure CLI commands in runbooks linked with PowerShell 7.2 Runtime environment.
1414

1515
> [!NOTE]
16-
> Azure CLI commands version 2.52.0 are available as a default package in PowerShell 7.2 Runtime environment.
16+
> Azure CLI commands version 2.56.0 are available as a default package in PowerShell 7.2 Runtime environment.
1717
1818
## Prerequisites
1919

@@ -25,24 +25,50 @@ You can run Azure CLI commands in runbooks linked with PowerShell 7.2 Runtime en
2525
> [!NOTE]
2626
> Instead of creating a new PowerShell 7.2 Runtime environment, you can use the System-generated PowerShell 7.2 Runtime environment.
2727
28+
#### [Azure portal](#tab/create-runtime-env-portal)
29+
2830
1. Sign in to the Azure [portal](https://portal.azure.com) and select your Automation account.
2931
1. Under **Process Automation**, select **Runtime Environments (preview)** and then select **Create**.
3032
1. On **Basics** tab, provide the following details:
3133
1. Provide **Name** for the Runtime environment. It must begin with alphabet and can contain only alphabets, numbers, underscores, and dashes.
3234
1. From the **Language** dropdown list, select **PowerShell**.
3335
1. In **Runtime version** for scripting language, select 7.2
3436
1. Provide appropriate **Description**.
35-
1. On **Packages** tab, in the **Package version** dropdown list, you would see **Az version 8.3** and **Azure CLI version 2.52.0** already present.
37+
1. On **Packages** tab, in the **Package version** dropdown list, you would see **Az version 8.3** and **Azure CLI version 2.56.0** already present.
3638
1. Select **+Add from gallery** to add more packages from gallery and select **Next**.
3739
1. On **Review + create** tab, review the entries and select **Create**.
3840

3941
A notification appears to confirm that a Runtime environment is successfully created.
4042

4143
:::image type="content" source="./media/quickstart-cli-support-powershell-runbook-runtime-environment/create-runtime-environment.png" alt-text="Screenshot shows how to create a runtime environment." lightbox="./media/quickstart-cli-support-powershell-runbook-runtime-environment/create-runtime-environment.png":::
4244

45+
#### [REST API](#tab/create-runtime-env-rest)
46+
47+
Azure CLI version 2.56.0 is available only for PowerShell 7.2 Runtime environment.
48+
49+
```rest
50+
PUT
51+
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Automation/automationAccounts/<accountName>/runtimeEnvironments/<runtimeEnvironmentName>?api-version=2023-05-15-preview
52+
{
53+
"properties": {
54+
"runtime": {
55+
"language": "PowerShell",
56+
"version": "7.2"
57+
},
58+
"defaultPackages": {
59+
"Az": "8.3.0",
60+
"Azure CLI": "2.56.0"
61+
}
62+
},
63+
"name": "<runtimeEnvironmentName>"
64+
}
65+
```
66+
---
4367

4468
## Create Runbook
4569

70+
#### [Azure portal](#tab/create-runbook-portal)
71+
4672
You can create a new PowerShell runbook that supports Azure CLI commands and is associated with PowerShell 7.2 Runtime environment.
4773

4874
To create a runbook, follow these steps:
@@ -60,6 +86,29 @@ In your Automation account, under **Process Automation**, select **Runbooks**.
6086
1. Add runbook code on the **Edit Runbook page** and select **Save**.
6187

6288
1. **Test** runbook execution in Test pane. After you confirm the results, select **Publish** to publish the runbook and execute it.
63-
89+
90+
#### [REST API](#tab/create-runbook-rest)
91+
92+
You can create runbooks and link with PowerShell 7.2 Runtime environment.
93+
94+
```rest
95+
96+
PUT
97+
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Automation/automationAccounts/<accountName>/runbooks/<runbookName>?api-version=2023-05-15-preview
98+
99+
100+
{
101+
"properties": {
102+
"runbookType": "PowerShell",
103+
"runtimeEnvironment": <runtimeEnvironmentName>,
104+
"publishContentLink": {
105+
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"
106+
}
107+
},
108+
"location": "East US"
109+
}
110+
```
111+
---
112+
64113
## Next steps
65114
- See [Manage Runtime environment](manage-runtime-environment.md) to view the various operations through portal and REST API.

articles/automation/quickstart-update-runbook-in-runtime-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Using the Runtime environment, you can upgrade a runbook from one Runtime versio
3333
1. From the **Language** dropdown list, select **PowerShell**.
3434
1. In **Runtime version** for scripting language, select 7.2.
3535
1. Provide appropriate **Description**.
36-
1. On **Packages** tab, in the **Package version** dropdown list, you would see **Az version 8.3.0** and **Azure CLI version 2.52.0** packages already present.
36+
1. On **Packages** tab, in the **Package version** dropdown list, you would see **Az version 8.3.0** and **Azure CLI version 2.56.0** packages already present.
3737
1. Select **+Add from gallery** to add more packages from gallery and select **Next**.
3838
1. On **Review + create** tab, review the entries and select **Create**.
3939

articles/automation/runtime-environment-overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Runtime environment in Azure Automation
33
description: This article provides an overview on Runtime environment in Azure Automation.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 01/16/2024
6+
ms.date: 01/17/2024
77
ms.topic: conceptual
88
ms.custom: references_regions
99
---
@@ -35,11 +35,11 @@ Runtime environment captures the following details about the job execution envir
3535

3636
|**Package Types** | **Description** |
3737
|---------|---------|
38-
|**Default packages** | The packages enable you to manage Azure resources. For example, Az PowerShell 8.0.0, Azure CLI 2.52.0|
38+
|**Default packages** | The packages enable you to manage Azure resources. For example, Az PowerShell 8.0.0, Azure CLI 2.56.0|
3939
|**Customer-provided packages** | These are custom packages that are required by runbooks during execution. The packages can be from: </br> - Public gallery: PSGallery, pypi </br> - Self-authored. |
4040

4141
> [!NOTE]
42-
> Azure CLI commands are supported (public preview) in runbooks associated with PowerShell 7.2 Runtime environment. Azure CLI commands version 2.52.0 is available as a default package in PowerShell 7.2 Runtime environment.
42+
> Azure CLI commands are supported (public preview) in runbooks associated with PowerShell 7.2 Runtime environment. Azure CLI commands version 2.56.0 is available as a default package in PowerShell 7.2 Runtime environment.
4343
4444
## Azure CLI package in Runtime environment
4545

@@ -58,14 +58,14 @@ Azure Automation creates system-generated Runtime environments based on the Runt
5858
- Python-3.8
5959
- Python-3.10
6060

61-
:::image type="content" source="./media/runtime-environment-overview/system-generated.png" alt-text="Screenshot shows the system generated Runtime environment." lightbox="./media/runtime-environment-overview/system-generated.png":::
62-
6361
You can't edit these Runtime environments. However, any changes that are made in Modules/Packages for the Automation account are automatically reflected in these system-generated Runtime environments.
6462

63+
:::image type="content" source="./media/runtime-environment-overview/system-generated.png" alt-text="Screenshot shows the system generated Runtime environment." lightbox="./media/runtime-environment-overview/system-generated.png":::
64+
6565
> [!NOTE]
6666
> Packages present in System-generated Runtime environments are unique to your Azure Automation account and might vary across different accounts.
6767
68-
## Key Benefits
68+
## Key benefits
6969

7070
- **Granular control** - enables you to configure the script execution environment by choosing the Runtime language, its version, and dependent modules.
7171
- **Runbook update** - allows easy portability of runbooks across different runtime versions by updating runtime environment of runbooks to keep pace with the latest PowerShell and Python releases. You can test updates before publishing them to production.

0 commit comments

Comments
 (0)