Skip to content

Commit f46f279

Browse files
Merge pull request #113381 from BethWilke/branch128
Finalizing changes for 1708447
2 parents 87ca8c7 + b1b3dc9 commit f46f279

File tree

6 files changed

+85
-91
lines changed

6 files changed

+85
-91
lines changed

articles/automation/automation-connections.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ An Azure Automation connection asset contains the information listed below. This
1515
* Information needed for authentication, such as user name and password
1616
* Connection information, such as URL or port
1717

18-
The connection asset keeps all properties for connecting to a particular application together, making it unnecessary to create multiple variables. You 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 runbook or configuration accesses the properties for a connection using the internal `Get-AutomationConnection` cmdlet.
18+
The connection asset keeps together all properties for connecting to a particular application, making it unnecessary to create multiple variables. You 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 runbook or configuration accesses the properties for a connection using the internal `Get-AutomationConnection` cmdlet.
1919

2020
When you create a connection, you must specify a connection type. The connection type is a template that defines a set of properties. You can add a connection type to Azure Automation using an integration module with a metadata file. It's also possible to create a connection type using 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.
2121

@@ -27,17 +27,17 @@ When you create a connection, you must specify a connection type. The connection
2727
2828
## Connection types
2929

30-
Azure Automation makes the following built-in connections available:
30+
Azure Automation makes the following built-in connection types available:
3131

32-
* `Azure` - This connection can be used to manage classic resources.
33-
* `AzureServicePrincipal` - This connection is used by the Azure Run As account.
34-
* `AzureClassicCertificate` - This connection is used by the classic Azure Run As account.
32+
* `Azure` - Represents a connection used to manage classic resources.
33+
* `AzureServicePrincipal` - Represents a connection used by the Azure Run As account.
34+
* `AzureClassicCertificate` - Represents a connection used by the classic Azure Run As account.
3535

3636
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).
3737

38-
## Windows PowerShell cmdlets
38+
## Windows PowerShell cmdlets to access connections
3939

40-
The cmdlets in the following table are used to create and manage Automation connections with Windows PowerShell. They ship as part of the Az module. See [Manage modules in Azure Automation](shared-resources/modules.md).
40+
The cmdlets in the following table create and manage Automation connections with Windows PowerShell. They ship as part of the [Az modules](shared-resources/modules.md#az-modules).
4141

4242
|Cmdlet|Description|
4343
|---|---|
@@ -46,18 +46,18 @@ The cmdlets in the following table are used to create and manage Automation conn
4646
|[Remove-AzAutomationConnection](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationConnection?view=azps-3.7.0)|Removes an existing connection.|
4747
|[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.|
4848

49-
## Internal cmdlets
49+
## Internal cmdlets to access connections
5050

5151
The internal cmdlet in the following table is used to access connections in your runbooks and DSC configurations. This cmdlet comes with the global module `Orchestrator.AssetManagement.Cmdlets`. For more information, see [Internal cmdlets](shared-resources/modules.md#internal-cmdlets).
5252

5353
|Internal Cmdlet|Description|
5454
|---|---|
55-
|`Get-AutomationConnection` | 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.|
55+
|`Get-AutomationConnection` | Retrieves the values of the different fields in the connection and returns them as a [hashtable](https://go.microsoft.com/fwlink/?LinkID=324844). You can then use this hashtable with the appropriate commands in the runbook or DSC configuration.|
5656

5757
>[!NOTE]
58-
>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.
58+
>Avoid using variables with the `Name` parameter of `Get-AutomationConnection`. Use of variables in this case can complicate discovery of dependencies between runbooks or DSC configurations and connection assets at design time.
5959
60-
## Python 2 functions
60+
## Python 2 functions to access connections
6161

6262
The function in the following table is used to access connections in a Python 2 runbook.
6363

@@ -68,7 +68,7 @@ The function in the following table is used to access connections in a Python 2
6868
> [!NOTE]
6969
> You must import the `automationassets` module at the top of your Python runbook to access the asset functions.
7070
71-
## Creating a new connection
71+
## Create a new connection
7272

7373
### Create a new connection with the Azure portal
7474

@@ -91,13 +91,13 @@ $ConnectionFieldValues = @{"ApplicationId" = $Application.ApplicationId; "Tenant
9191
New-AzAutomationConnection -ResourceGroupName $ResourceGroup -AutomationAccountName $AutomationAccountName -Name $ConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $ConnectionFieldValues
9292
```
9393

94-
When you create your Automation account, it includes several global modules by default, along with the connection type `AzureServicePrincipal` to create the `AzureRunAsConnection` connection asset. If you try to create a new connection asset to connect to a service or application with a different authentication method, the operation fails because the connection type is not already defined in your Automation account. For more information on creating your own connection type for a custom module, see [Adding a connection type](#adding-a-connection-type).
94+
When you create your Automation account, it includes several global modules by default, along with the connection type `AzureServicePrincipal` to create the `AzureRunAsConnection` connection asset. If you try to create a new connection asset to connect to a service or application with a different authentication method, the operation fails because the connection type is not already defined in your Automation account. For more information on creating your own connection type for a custom module, see [Add a connection type](#add-a-connection-type).
9595

96-
## Adding a connection type
96+
## Add a connection type
9797

98-
If your runbook or DSC configuration connects to an external service, you must define a connection type in a [custom module](shared-resources/modules.md#custom-modules), called an integration module. This file specifies connection type properties and is named **<ModuleName>-Automation.json**, located in the module folder of your compressed **.zip** file. This file contains the fields of a connection that are required to connect to the system or service the module represents. Using this file, you can set the field names, data types, encryption status, and optional status for the connection type.
98+
If your runbook or DSC configuration connects to an external service, you must define a connection type in a [custom module](shared-resources/modules.md#custom-modules) called an integration module. This module includes a metadata file that specifies connection type properties and is named **<ModuleName>-Automation.json**, located in the module folder of your compressed **.zip** file. This file contains the fields of a connection that are required to connect to the system or service that the module represents. Using this file, you can set the field names, data types, encryption status, and optional status for the connection type.
9999

100-
The following example is a template in the **.json** file format that defines user name and password properties for a custom connection type:
100+
The following example is a template in the **.json** file format that defines user name and password properties for a custom connection type called `MyModuleConnection`:
101101

102102
```json
103103
{
@@ -120,32 +120,32 @@ The following example is a template in the **.json** file format that defines us
120120
}
121121
```
122122

123-
## Using a connection in a runbook or DSC configuration
123+
## Get a connection in a runbook or DSC configuration
124124

125-
Retrieve a connection in a runbook or DSC configuration with the internal `Get-AutomationConnection` cmdlet. This cmdlet is preferred over the `Get-AzAutomationConnection` cmdlet. See [Internal cmdlets](shared-resources/modules.md#internal-cmdlets).
125+
Retrieve a connection in a runbook or DSC configuration with the internal `Get-AutomationConnection` cmdlet. This cmdlet is preferred over the `Get-AzAutomationConnection` cmdlet, as it retrieves the connection values instead of information about the connection.
126126

127-
### Textual runbook sample
127+
### Textual runbook example
128128

129-
The following sample commands show how to use the Run As account 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.
129+
The following example shows how to use the Run As account to authenticate with Azure Resource Manager resources in your runbook. It uses a connection asset representing the Run As account, which references the certificate-based service principal.
130130

131131
```powershell
132132
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
133133
Connect-AzAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
134134
```
135135

136-
### Graphical runbook samples
136+
### Graphical runbook examples
137137

138-
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**.
138+
You can add an activity for the internal `Get-AutomationConnection` cmdlet to a graphical runbook. Right-click the connection in the Library pane of the graphical editor and select **Add to canvas**.
139139

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

142-
The following image shows an example of using a connection in a graphical 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.
142+
The following image shows an example of using a connection object in a graphical runbook. This example uses the `Constant value` data set for the `Get RunAs Connection` activity, which 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.
143143

144144
![get connections](media/automation-connections/automation-get-connection-object.png)
145145

146-
### Python 2 runbook sample
146+
### Python 2 runbook example
147147

148-
The following sample shows how to authenticate using the Run As connection in a Python 2 runbook.
148+
The following example shows how to authenticate using the Run As connection in a Python 2 runbook.
149149

150150
```python
151151
""" Tutorial to show how to authenticate against Azure resource manager resources """
@@ -190,6 +190,6 @@ azure_credential = get_automation_runas_credential(runas_connection)
190190

191191
## Next steps
192192

193-
- Review [Links in graphical authoring](automation-graphical-authoring-intro.md#links-and-workflow) to understand how to direct and control the flow of logic in your runbooks.
194-
* For a PowerShell cmdlet reference, see [Az.Automation](https://docs.microsoft.com/powershell/module/az.automation/?view=azps-3.7.0#automation
195-
).
193+
* To learn more about the cmdlets used to access connections, see [Manage modules in Azure Automation](shared-resources/modules.md).
194+
* For general information about runbooks, see [Runbook execution in Azure Automation](automation-runbook-execution.md).
195+
* For details of DSC configurations, see [State Configuration overview](automation-dsc-overview.md).

articles/automation/shared-resources/certificates.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ Certificates are stored securely in Azure Automation for access by runbooks and
2121
>[!NOTE]
2222
>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).
2323
24-
## Az PowerShell cmdlets
24+
## Windows PowerShell cmdlets to access certificates
2525

26-
For Az, the cmdlets in the following table are used to create and manage automation credential assets with Windows PowerShell. They ship as part of the [Az.Automation module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
26+
The cmdlets in the following table create and manage Automation certificates with Windows PowerShell. They ship as part of the [Az modules](modules.md#az-modules).
2727

2828
|Cmdlet |Description|
2929
| --- | ---|
30-
|[Add-AzureCertificate](/powershell/module/servicemanagement/azure/add-azurecertificate)|Uploads a service certificate for the specified cloud service.|
3130
|[Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0)|Retrieves information about a certificate to use in a runbook or DSC configuration. You can only retrieve the certificate itself using the internal `Get-AutomationCertificate` cmdlet.|
3231
|[New-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/New-AzAutomationCertificate?view=azps-3.7.0)|Creates a new certificate in Azure Automation.|
3332
|[Remove-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationCertificate?view=azps-3.7.0)|Removes a certificate from Azure Automation.|
3433
|[Set-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationCertificate?view=azps-3.7.0)|Sets the properties for an existing certificate including uploading the certificate file and setting the password for a **.pfx** file.|
3534

36-
## Internal cmdlets
35+
The [Add-AzureCertificate](/powershell/module/servicemanagement/azure/add-azurecertificate) cmdlet can also be used to upload a service certificate for the specified cloud service.
36+
37+
## Internal cmdlets to access certificates
3738

3839
The internal cmdlet in the following table is used to access certificates in your runbooks. This cmdlet comes with the global module `Orchestrator.AssetManagement.Cmdlets`. For more information, see [Internal cmdlets](modules.md#internal-cmdlets).
3940

@@ -44,7 +45,7 @@ The internal cmdlet in the following table is used to access certificates in you
4445
> [!NOTE]
4546
> You should avoid using variables in the `Name` parameter of `Get-AutomationCertificate` in a runbook or DSC configuration. Use of variables in this parameter can complicate discovery of dependencies between runbooks or DSC configurations and Automation variables at design time.
4647
47-
## Python 2 functions
48+
## Python 2 functions to access certificates
4849

4950
The function in the following table is used to access certificates in a Python 2 runbook.
5051

@@ -55,7 +56,7 @@ The function in the following table is used to access certificates in a Python 2
5556
> [!NOTE]
5657
> You must import the `automationassets` module at the beginning of your Python runbook to access the asset functions.
5758
58-
## Creating a new certificate
59+
## Create a new certificate
5960

6061
When you create a new certificate, you upload a .cer or .pfx file to Azure Automation. If you mark the certificate as exportable, then you can transfer it out of the Azure Automation certificate store. If it isn't exportable, then it can only be used for signing within the runbook or DSC configuration. Azure Automation requires the certificate to have the provider **Microsoft Enhanced RSA and AES Cryptographic Provider**.
6162

@@ -124,7 +125,7 @@ $json | out-file .\template.json
124125
New-AzResourceGroupDeployment -Name NewCert -ResourceGroupName TestAzureAuto -TemplateFile .\template.json
125126
```
126127

127-
## Using a certificate
128+
## Get a certificate
128129

129130
To retrieve a certificate, use the internal `Get-AutomationCertificate` cmdlet. You can't use the [Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0) cmdlet, since it returns information about the certificate asset but not the certificate itself.
130131

@@ -164,4 +165,6 @@ print cert
164165

165166
## Next steps
166167

167-
- To learn more about working with links to control the logical flow of activities in your graphical runbook, see [Links in graphical authoring](../automation-graphical-authoring-intro.md#links-and-workflow).
168+
* To learn more about the cmdlets used to access certificates, see [Manage modules in Azure Automation](modules.md).
169+
* For general information about runbooks, see [Runbook execution in Azure Automation](../automation-runbook-execution.md).
170+
* For details of DSC configurations, see [State Configuration overview](../automation-dsc-overview.md).

0 commit comments

Comments
 (0)