You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/automation-connections.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ An Azure Automation connection asset contains the information listed below. This
15
15
* Information needed for authentication, such as user name and password
16
16
* Connection information, such as URL or port
17
17
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.
19
19
20
20
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.
21
21
@@ -27,17 +27,17 @@ When you create a connection, you must specify a connection type. The connection
27
27
28
28
## Connection types
29
29
30
-
Azure Automation makes the following built-in connections available:
30
+
Azure Automation makes the following built-in connection types available:
31
31
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.
35
35
36
36
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).
37
37
38
-
## Windows PowerShell cmdlets
38
+
## Windows PowerShell cmdlets to access connections
39
39
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).
41
41
42
42
|Cmdlet|Description|
43
43
|---|---|
@@ -46,18 +46,18 @@ The cmdlets in the following table are used to create and manage Automation conn
46
46
|[Remove-AzAutomationConnection](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationConnection?view=azps-3.7.0)|Removes an existing connection.|
47
47
|[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.|
48
48
49
-
## Internal cmdlets
49
+
## Internal cmdlets to access connections
50
50
51
51
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).
52
52
53
53
|Internal Cmdlet|Description|
54
54
|---|---|
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.|
56
56
57
57
>[!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.
59
59
60
-
## Python 2 functions
60
+
## Python 2 functions to access connections
61
61
62
62
The function in the following table is used to access connections in a Python 2 runbook.
63
63
@@ -68,7 +68,7 @@ The function in the following table is used to access connections in a Python 2
68
68
> [!NOTE]
69
69
> You must import the `automationassets` module at the top of your Python runbook to access the asset functions.
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).
95
95
96
-
## Adding a connection type
96
+
## Add a connection type
97
97
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.
99
99
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`:
101
101
102
102
```json
103
103
{
@@ -120,32 +120,32 @@ The following example is a template in the **.json** file format that defines us
120
120
}
121
121
```
122
122
123
-
## Using a connection in a runbook or DSC configuration
123
+
## Get a connection in a runbook or DSC configuration
124
124
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.
126
126
127
-
### Textual runbook sample
127
+
### Textual runbook example
128
128
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.
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**.
139
139
140
140

141
141
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.
- 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).
Copy file name to clipboardExpand all lines: articles/automation/shared-resources/certificates.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,19 +21,20 @@ Certificates are stored securely in Azure Automation for access by runbooks and
21
21
>[!NOTE]
22
22
>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).
23
23
24
-
## Az PowerShell cmdlets
24
+
## Windows PowerShell cmdlets to access certificates
25
25
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).
27
27
28
28
|Cmdlet |Description|
29
29
| --- | ---|
30
-
|[Add-AzureCertificate](/powershell/module/servicemanagement/azure/add-azurecertificate)|Uploads a service certificate for the specified cloud service.|
31
30
|[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.|
32
31
|[New-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/New-AzAutomationCertificate?view=azps-3.7.0)|Creates a new certificate in Azure Automation.|
33
32
|[Remove-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationCertificate?view=azps-3.7.0)|Removes a certificate from Azure Automation.|
34
33
|[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.|
35
34
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
37
38
38
39
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).
39
40
@@ -44,7 +45,7 @@ The internal cmdlet in the following table is used to access certificates in you
44
45
> [!NOTE]
45
46
> 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.
46
47
47
-
## Python 2 functions
48
+
## Python 2 functions to access certificates
48
49
49
50
The function in the following table is used to access certificates in a Python 2 runbook.
50
51
@@ -55,7 +56,7 @@ The function in the following table is used to access certificates in a Python 2
55
56
> [!NOTE]
56
57
> You must import the `automationassets` module at the beginning of your Python runbook to access the asset functions.
57
58
58
-
## Creating a new certificate
59
+
## Create a new certificate
59
60
60
61
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**.
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.
130
131
@@ -164,4 +165,6 @@ print cert
164
165
165
166
## Next steps
166
167
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