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
@@ -14,7 +14,7 @@ An Azure Automation connection asset contains the information listed below. This
14
14
* Information needed for authentication, such as user name and password
15
15
* Connection information, such as URL or port
16
16
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.
18
18
19
19
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.
20
20
@@ -26,17 +26,17 @@ When you create a connection, you must specify a connection type. The connection
26
26
27
27
## Connection types
28
28
29
-
Azure Automation makes the following built-in connections available:
29
+
Azure Automation makes the following built-in connection types available:
30
30
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.
34
34
35
35
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).
36
36
37
-
## Windows PowerShell cmdlets
37
+
## Windows PowerShell cmdlets to access connections
38
38
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).
40
40
41
41
|Cmdlet|Description|
42
42
|---|---|
@@ -45,18 +45,18 @@ The cmdlets in the following table are used to create and manage Automation conn
45
45
|[Remove-AzAutomationConnection](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationConnection?view=azps-3.7.0)|Removes an existing connection.|
46
46
|[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.|
47
47
48
-
## Internal cmdlets
48
+
## Internal cmdlets to access connections
49
49
50
50
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).
51
51
52
52
|Internal Cmdlet|Description|
53
53
|---|---|
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.|
55
55
56
56
>[!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.
58
58
59
-
## Python 2 functions
59
+
## Python 2 functions to access connections
60
60
61
61
The function in the following table is used to access connections in a Python 2 runbook.
62
62
@@ -67,7 +67,7 @@ The function in the following table is used to access connections in a Python 2
67
67
> [!NOTE]
68
68
> 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).
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).
94
94
95
-
## Adding a connection type
95
+
## Add a connection type
96
96
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.
98
98
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`:
100
100
101
101
```json
102
102
{
@@ -119,32 +119,32 @@ The following example is a template in the **.json** file format that defines us
119
119
}
120
120
```
121
121
122
-
## Using a connection in a runbook or DSC configuration
122
+
## Get a connection in a runbook or DSC configuration
123
123
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.
125
125
126
-
### Textual runbook sample
126
+
### Textual runbook example
127
127
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.
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**.
138
138
139
139

140
140
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.
- 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).
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](shared-resources/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