Skip to content

Commit 31eb71f

Browse files
authored
Merge pull request #111293 from BethWilke/branch114
Changing AzureRm to Az
2 parents 3bffe06 + ada13a0 commit 31eb71f

6 files changed

+50
-45
lines changed

articles/automation/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
href: automation-use-azure-ad.md
2323
- name: Manage Office 365 services
2424
href: manage-office-365.md
25-
- name: Configure authentication with AWS
25+
- name: Authenticate Azure Automation runbooks with Amazon Web Services
2626
href: automation-config-aws-account.md
2727
- name: Encrypt secure assets in Azure Automation
2828
href: automation-secure-asset-encryption.md

articles/automation/automation-alert-metric.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Sign in to Azure at https://portal.azure.com
1717

1818
Alerts allow you to define a condition to monitor for and an action to take when that condition is met.
1919

20-
In the Azure portal, navigate to your Automation Account. Under **Monitoring**, select **Alerts** and click **+ New Alert Rule**. The scope for the target is already defined to your Automation Account.
20+
In the Azure portal, navigate to your Automation account. Under **Monitoring**, select **Alerts** and click **+ New Alert Rule**. The scope for the target is already defined to your Automation account.
2121

2222
### Configure alert criteria
2323

@@ -71,7 +71,7 @@ Once the metric is no longer outside of the threshold defined, the alert is deac
7171

7272
## Next steps
7373

74-
Continue to the following article to learn about other ways that you can integrate alertings into your Automation Account.
74+
Continue to the following article to learn about other ways that you can integrate alertings into your Automation account.
7575

7676
> [!div class="nextstepaction"]
7777
> [Use an alert to trigger an Azure Automation runbook](automation-create-alert-triggered-runbook.md)

articles/automation/automation-config-aws-account.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Configure Authentication with Amazon Web Services
2+
title: Authenticate Azure Automation runbooks with Amazon Web Services
33
description: This article describes how to create and validate an AWS credential for runbooks in Azure Automation managing AWS resources.
44
keywords: aws authentication, configure aws
55
services: automation
66
ms.subservice: process-automation
77
ms.date: 04/17/2018
88
ms.topic: conceptual
99
---
10-
# Authenticate Runbooks with Amazon Web Services
10+
# Authenticate Azure Automation runbooks with Amazon Web Services
1111

1212
Automating common tasks with resources in Amazon Web Services (AWS) can be accomplished with Automation runbooks in Azure. You can automate many tasks in AWS using Automation runbooks just like you can with resources in Azure. All that is required are two things:
1313

articles/automation/automation-connections.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ ms.topic: conceptual
99

1010
# Connection assets in Azure Automation
1111

12-
An Automation connection asset contains the information required to connect to an external service or application from a runbook or DSC configuration. This may include information required for authentication such as a username and password in addition to connection information such as a URL or a port. The value of a connection is keeping all of the properties for connecting to a particular application in one asset as opposed to creating multiple variables. The user can edit the values for a connection in one place, and you can pass the name of a connection to a runbook or DSC configuration in a single parameter. The properties for a connection can be accessed in the runbook or DSC configuration with the **Get-AutomationConnection** activity.
12+
An Automation connection asset contains the information required to connect to an external service or application from a runbook or DSC configuration. This may include information required for authentication such as a username and password in addition to connection information such as a URL or a port. The value of a connection is keeping all of the properties for connecting to a particular application in one asset as opposed to creating multiple variables. The user can edit the values for a connection in one place, and you can pass the name of a connection to a runbook or DSC configuration in a single parameter. The properties for a connection can be accessed in the runbook or DSC configuration with the `Get-AutomationConnection` activity.
1313

14-
When you create a connection, you must specify a *connection type*. The connection type is a template that defines a set of properties. The connection defines values for each property defined in its connection type. Connection types are added to Azure Automation in integration modules or created with the [Azure Automation API](/previous-versions/azure/reference/mt163818(v=azure.100)) if the integration module includes a connection type and is imported into your Automation account. Otherwise, you will need to create a metadata file to specify an Automation connection type. For more information regarding this, see [Integration Modules](automation-integration-modules.md).
14+
When you create a connection, you must specify a *connection type*. The connection type is a template that defines a set of properties. The connection defines values for each property defined in its connection type. Connection types are added to Azure Automation in integration modules or created with the [Azure Automation API](/previous-versions/azure/reference/mt163818(v=azure.100)) if the integration module includes a connection type and is imported into your Automation account. Otherwise, you must create a metadata file to specify an Automation connection type. For more information regarding this, see [Integration Modules](automation-integration-modules.md).
1515

1616
>[!NOTE]
17-
>Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. These assets are encrypted and stored in Azure Automation using a unique key that is generated for each automation account. This key is stored in a system managed Key Vault. Before storing a secure asset, the key is loaded from Key Vault and then used to encrypt the asset. This process is managed by Azure Automation.
17+
>Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. These assets are encrypted and stored in Azure Automation using a unique key that is generated for each Automation account. This key is stored in a system managed Key Vault. Before storing a secure asset, the key is loaded from Key Vault and then used to encrypt the asset. This process is managed by Azure Automation.
18+
19+
>[!NOTE]
20+
>This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell Module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version using [How to update Azure PowerShell modules in Azure Automation](automation-update-azure-modules.md).
1821
1922
## Connection types
2023

@@ -24,95 +27,94 @@ There are three types of built-in connections available in Azure Automation:
2427
* **AzureClassicCertificate** - This connection is used by the **AzureClassicRunAs** account.
2528
* **AzureServicePrincipal** - This connection is used by the **AzureRunAs** account.
2629

27-
In most cases, you don't need to create a connection resource because it is created when you create a [RunAs account](manage-runas-account.md).
30+
In most cases, you don't need to create a connection resource because it is created when you create a [Run As account](manage-runas-account.md).
2831

29-
## Windows PowerShell Cmdlets
32+
## Windows PowerShell cmdlets
3033

3134
The cmdlets in the following table are used to create and manage Automation connections with Windows PowerShell. They ship as part of the [Azure PowerShell module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
3235

3336
|Cmdlet|Description|
34-
|:---|:---|
35-
|[Get-AzureRmAutomationConnection](/powershell/module/azurerm.automation/get-azurermautomationconnection)|Retrieves a connection. Includes a hash table with the values of the connection’s fields.|
36-
|[New-AzureRmAutomationConnection](/powershell/module/azurerm.automation/new-azurermautomationconnection)|Creates a new connection.|
37-
|[Remove-AzureRmAutomationConnection](/powershell/module/azurerm.automation/remove-azurermautomationconnection)|Remove an existing connection.|
38-
|[Set-AzureRmAutomationConnectionFieldValue](/powershell/module/azurerm.automation/set-azurermautomationconnectionfieldvalue)|Sets the value of a particular field for an existing connection.|
37+
|---|---|
38+
|[Get-AzAutomationConnection](https://docs.microsoft.com/powershell/module/az.automation/get-azautomationconnection?view=azps-3.7.0)|Retrieves a connection. Includes a hashtable with the values of the connection fields.|
39+
|[New-AzAutomationConnection](https://docs.microsoft.com/powershell/module/az.automation/new-azautomationconnection?view=azps-3.7.0)|Creates a new connection.|
40+
|[Remove-AzAutomationConnection](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationConnection?view=azps-3.7.0)|Removes an existing connection.|
41+
|[Set-AzAutomationConnectionFieldValue](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationConnectionFieldValue?view=azps-3.7.0)|Sets the value of a particular field for an existing connection.|
3942

4043
## Activities
4144

4245
The activities in the following table are used to access connections in a runbook or DSC configuration.
4346

4447
|Activities|Description|
4548
|---|---|
46-
|Get-AutomationConnection | Gets a connection to use. Returns a hash table with the properties of the connection.|
49+
|`Get-AutomationConnection` | Gets a connection to use. Returns a hashtable with the properties of the connection.|
4750

4851
>[!NOTE]
49-
>You should avoid using variables with the –Name parameter of **Get-AutomationConnection** since this can complicate discovering dependencies between runbooks or DSC configurations, and connection assets at design time.
50-
52+
>Avoid using variables with the `Name` parameter of `Get-AutomationConnection`. Use of this parameter can complicate discovery of dependencies between runbooks or DSC configurations, and connection assets at design time.
5153
52-
## Python2 functions
54+
## Python 2 functions
5355

54-
The function in the following table is used to access connections in a Python2 runbook.
56+
The function in the following table is used to access connections in a Python 2 runbook.
5557

5658
| Function | Description |
5759
|:---|:---|
58-
| automationassets.get_automation_connection | Retrieves a connection. Returns a dictionary with the properties of the connection. |
60+
| `automationassets.get_automation_connection` | Retrieves a connection. Returns a dictionary with the properties of the connection. |
5961

6062
> [!NOTE]
61-
> You must import the "automationassets" module at the top of your Python runbook in order to access the asset functions.
63+
> You must import the `automationassets` module at the top of your Python runbook to access the asset functions.
6264
63-
## Creating a New Connection
65+
## Creating a new connection
6466

6567
### To create a new connection with the Azure portal
6668

67-
1. From your automation account, click the **Assets** part to open the **Assets** blade.
69+
1. From your Automation account, click the **Assets** part to open the **Assets** blade.
6870
2. Click the **Connections** part to open the **Connections** blade.
6971
3. Click **Add a connection** at the top of the blade.
7072
4. In the **Type** dropdown, select the type of connection you want to create. The form will present the properties for that particular type.
7173
5. Complete the form and click **Create** to save the new connection.
7274

7375
### To create a new connection with Windows PowerShell
7476

75-
Create a new connection with Windows PowerShell using the [New-AzureRmAutomationConnection](/powershell/module/azurerm.automation/new-azurermautomationconnection) cmdlet. This cmdlet has a parameter named **ConnectionFieldValues** that expects a [hash table](https://technet.microsoft.com/library/hh847780.aspx) defining values for each of the properties defined by the connection type.
77+
Create a new connection with Windows PowerShell using the `New-AzAutomationConnection` cmdlet. This cmdlet has a parameter named `ConnectionFieldValues` that expects a [hashtable](https://technet.microsoft.com/library/hh847780.aspx) defining values for each of the properties defined by the connection type.
7678

77-
If you are familiar with the Automation [Run As account](automation-sec-configure-azure-runas-account.md) to authenticate runbooks using the service principal, the PowerShell script, provided as an alternative to creating the Run As account from the portal, creates a new connection asset using the following sample commands.
79+
You can use the following example commands as an alternative to creating the Run As account from the portal to create a new connection asset.
7880

7981
```powershell
8082
$ConnectionAssetName = "AzureRunAsConnection"
8183
$ConnectionFieldValues = @{"ApplicationId" = $Application.ApplicationId; "TenantId" = $TenantID.TenantId; "CertificateThumbprint" = $Cert.Thumbprint; "SubscriptionId" = $SubscriptionId}
82-
New-AzureRmAutomationConnection -ResourceGroupName $ResourceGroup -AutomationAccountName $AutomationAccountName -Name $ConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $ConnectionFieldValues
84+
New-AzAutomationConnection -ResourceGroupName $ResourceGroup -AutomationAccountName $AutomationAccountName -Name $ConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $ConnectionFieldValues
8385
```
8486

85-
You are able to use the script to create the connection asset because when you create your Automation account, it automatically includes several global modules by default along with the connection type **AzureServicePrincipal** to create the **AzureRunAsConnection** connection asset. This is important to keep in mind, because if you attempt to create a new connection asset to connect to a service or application with a different authentication method, it will fail because the connection type is not already defined in your Automation account. For more information on how to create your own connection type for your custom or module from the [PowerShell Gallery](https://www.powershellgallery.com), see [Integration Modules](automation-integration-modules.md)
87+
You are able to use the script to create the connection asset because when you create your Automation account, it automatically includes several global modules by default along with the connection type `AzureServicePrincipal` to create the `AzureRunAsConnection` connection asset. This is important to keep in mind, because if you attempt to create a new connection asset to connect to a service or application with a different authentication method, it will fail because the connection type is not already defined in your Automation account. For more information on how to create your own connection type for your custom or module from the [PowerShell Gallery](https://www.powershellgallery.com), see [Integration Modules](automation-integration-modules.md)
8688

8789
## Using a connection in a runbook or DSC configuration
8890

89-
You retrieve a connection in a runbook or DSC configuration with the **Get-AutomationConnection** cmdlet. You cannot use the [Get-AzureRmAutomationConnection](/powershell/module/azurerm.automation/get-azurermautomationconnection) activity. This activity retrieves the values of the different fields in the connection and returns them as a [hash table](https://go.microsoft.com/fwlink/?LinkID=324844), which can then be used with the appropriate commands in the runbook or DSC configuration.
91+
Retrieve a connection in a runbook or DSC configuration with the `Get-AutomationConnection` cmdlet. You can't use the `Get-AzAutomationConnection` activity. This activity retrieves the values of the different fields in the connection and returns them as a [hashtable](https://go.microsoft.com/fwlink/?LinkID=324844). This hashtable can then be used with the appropriate commands in the runbook or DSC configuration.
9092

9193
### Textual runbook sample
9294

9395
The following sample commands show how to use the Run As account mentioned earlier, to authenticate with Azure Resource Manager resources in your runbook. It uses the connection asset representing the Run As account, which references the certificate-based service principal, not credentials.
9496

9597
```powershell
9698
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
97-
Connect-AzureRmAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
99+
Connect-AzAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
98100
```
99101

100-
> [!IMPORTANT]
101-
> **Add-AzureRmAccount** is now an alias for **Connect-AzureRMAccount**. When searching your library items, if you do not see **Connect-AzureRMAccount**, you can use **Add-AzureRmAccount**, or you can update your modules in your Automation Account.
102+
> [!NOTE]
103+
> For non-graphical PowerShell runbooks, `Add-AzAccount` and `Add-AzureRMAccount` are aliases for [Connect-AzAccount](https://docs.microsoft.com/powershell/module/az.accounts/connect-azaccount?view=azps-3.5.0). You can use these cmdlets or you can [update your modules](automation-update-azure-modules.md) in your Automation account to the latest versions. You might need to update your modules even if you have just created a new Automation account.
102104
103105
### Graphical runbook samples
104106

105-
You add a **Get-AutomationConnection** activity to a graphical runbook by right-clicking on the connection in the **Library** pane of the graphical editor and selecting **Add to canvas**.
107+
You add a `Get-AutomationConnection` activity to a graphical runbook by right-clicking on the connection in the Library pane of the graphical editor and selecting **Add to canvas**.
106108

107109
![add to canvas](media/automation-connections/connection-add-canvas.png)
108110

109-
The following image shows an example of using a connection in a graphical runbook. This is the same example shown above for authenticating using the Run As account with a textual runbook. This example uses the **Constant value** data set for the **Get RunAs Connection** activity that uses a connection object for authentication. A [pipeline link](automation-graphical-authoring-intro.md#links-and-workflow) is used here since the ServicePrincipalCertificate parameter set is expecting a single object.
111+
The following image shows an example of using a connection in a graphical runbook. This is the same example shown above for authenticating using the Run As account with a textual runbook. This example uses the `Constant value` data set for the `Get RunAs Connection` activity that uses a connection object for authentication. A [pipeline link](automation-graphical-authoring-intro.md#links-and-workflow) is used here since the `ServicePrincipalCertificate` parameter set is expecting a single object.
110112

111113
![get connections](media/automation-connections/automation-get-connection-object.png)
112114

113-
### Python2 runbook sample
115+
### Python 2 runbook sample
114116

115-
The following sample shows how to authenticate using the Run As connection in a Python2 runbook.
117+
The following sample shows how to authenticate using the Run As connection in a Python 2 runbook.
116118

117119
```python
118120
""" Tutorial to show how to authenticate against Azure resource manager resources """

0 commit comments

Comments
 (0)