Skip to content

Commit c917095

Browse files
committed
Finalizing changes for 1708447
1 parent cd3e122 commit c917095

File tree

6 files changed

+83
-89
lines changed

6 files changed

+83
-89
lines changed

articles/automation/automation-connections.md

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

17-
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.
17+
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.
1818

1919
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.
2020

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

29-
Azure Automation makes the following built-in connections available:
29+
Azure Automation makes the following built-in connection types available:
3030

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

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

37-
## Windows PowerShell cmdlets
37+
## Windows PowerShell cmdlets to access connections
3838

39-
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).
39+
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).
4040

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

48-
## Internal cmdlets
48+
## Internal cmdlets to access connections
4949

5050
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).
5151

5252
|Internal Cmdlet|Description|
5353
|---|---|
54-
|`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.|
54+
|`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.|
5555

5656
>[!NOTE]
57-
>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.
57+
>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.
5858
59-
## Python 2 functions
59+
## Python 2 functions to access connections
6060

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

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

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

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

93-
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).
93+
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).
9494

95-
## Adding a connection type
95+
## Add a connection type
9696

97-
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.
97+
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.
9898

99-
The following example is a template in the **.json** file format that defines user name and password properties for a custom connection type:
99+
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`:
100100

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

122-
## Using a connection in a runbook or DSC configuration
122+
## Get a connection in a runbook or DSC configuration
123123

124-
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).
124+
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.
125125

126-
### Textual runbook sample
126+
### Textual runbook example
127127

128-
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.
128+
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.
129129

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

135-
### Graphical runbook samples
135+
### Graphical runbook examples
136136

137-
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**.
137+
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**.
138138

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

141-
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.
141+
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.
142142

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

145-
### Python 2 runbook sample
145+
### Python 2 runbook example
146146

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

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

190190
## Next steps
191191

192-
- 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.
193-
* For a PowerShell cmdlet reference, see [Az.Automation](https://docs.microsoft.com/powershell/module/az.automation/?view=azps-3.7.0#automation
194-
).
192+
* To learn more about the cmdlets used to access connections, see [Manage modules in Azure Automation](modules.md).
193+
* For general information about runbooks, see [Runbook execution in Azure Automation](automation-runbook-execution.md).
194+
* 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](shared-resources/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)