Azure Automation Connector 1.0.0.0

The Azure Automation Connector lets you list, import, and submit runbooks in Azure Automation.

Prerequisites

Note: This Connector supports Azure Connection configuration options.

Contents

Object Type Name
Application GLOBAL.Redwood.REDWOOD.AzureAutomation
Constraint REDWOOD.Redwood_AzureAutomationRunbookConstraint
Process Definition REDWOOD.Redwood_Azure_Automation_ImportRunbooks
Process Definition REDWOOD.Redwood_Azure_Automation_ListRunbooks
Process Definition REDWOOD.Redwood_Azure_Automation_SubmitRunbookTemplate
Process Definition Type REDWOOD.Redwood_AzureAutomation
Library REDWOOD.Redwood_AzureAutomation

Setup

To install the Azure Automation Connector and connect to Microsoft Entra (Azure AD):

  1. To install the Azure Automation Connector, click its tile in the Catalog, select the version you want, and then click Install <version number>.

  2. Create an Azure Subscription and an appropriate resource group.

  3. Create an Microsoft Entra (Azure AD) Connection.

Note: This Connector supports Azure Connection configuration options.

Process Definitions

Redwood_Azure_Automation_ListRunbooks

Lists available Azure Automation runbooks in RTX format.

Note: This Process Definition lists all runbooks, regardless of whether they have ever been published.

Parameters

Tab Name Description Documentation Data Type Direction Default Expression Values
Parameters connection Connection The Microsoft Entra (Azure AD) Connection to use. String In

 

 

Parameters accountName Account Name The name of the Azure Automation account to connect to. String In

 

 

Parameters resourceGroup Resource Group The name of the Resource Group for listing. String In

 

 

Parameters nameFilter Name Filter Lets you filter runbooks by name. Wildcards * and ? are supported. String In

 

 

Parameters typeFilter Type Filter Lets you filter runbooks by type. String In

 

Graph, GraphPowerShell, GraphPowerShellWorkflow, PowerShell, PowerShell7, PowerShell72, PowerShellWorkflow, Python2, Python3, Script
Parameters runbooks Runbooks List containing filtered runbooks in RTX format. Table Out

 

 

Redwood_Azure_Automation_ImportRunbooks

Lets you import runbooks from Azure Automation. An imported runbook Process Definition includes the following:

  • A list of Parameters based on the runbook's parameters.

  • JSON of the request that will be sent to Azure during submit. For example:

    {
      "properties" : {
        "parameters" : {
          "FullName" : "\"${FullName}\""
        },
        "runbook" : {
          "name" : "${runbook}"
        }
      }
    } 

Note: For PowerShell runbooks, you can edit imported runbook Process Definitions if necessary by adding additional Parameters and incorporating them into the Source JSON.

Note: Also, Redwood recommends removing any PowerShell Parameters you do NOT intend to ever change during submit from the Source JSON of the imported runbook Process Definition. In other words, it is a best practice to submit the runbook with only Parameters that you want to set on the Azure Automation job in runtime and let the remaining parameters on the PowerShell script use their default values.

Parameters

Tab Name Description Documentation Data Type Direction Default Expression Values
Parameters connection Connection The Microsoft Entra (Azure AD) Connection to use. String In

 

 

Parameters accountName Account Name The name of the Azure Automation account to connect to. String In

 

 

Parameters resourceGroup Resource Group The name of the Resource Group for listing. String In

 

 

Parameters nameFilter Name Filter Lets you filter runbooks by name. Wildcards * and ? are supported. String In

 

 

Parameters typeFilter Type Filter Lets you filter runbooks by type. String In

 

Graph, GraphPowerShell, GraphPowerShellWorkflow, PowerShell, PowerShell7, PowerShell72, PowerShellWorkflow, Python2, Python3, Script
Generation Settings overwrite Overwrite Existing Definition

When set to Y, if a Process Definition with the same Business Key already exists, it will be overwritten by the import.

When set to N, if a Process Definition with the same Business Key already exists, the import will be skipped.

String In N Y=Yes, N=No
Generation Settings targetPartition Partition The Partition to create the new Process Definitions in. String In

 

QueryFilter:User.Redwood System.Partition.Partition%2e;all
Generation Settings targetApplication Application The Application to create the new Process Definitions in. String In

 

QueryFilter:User.Redwood System.Application.Application%2e;all
Generation Settings defaultQueue Default Queue The default Queue to assign to the generated Process Definitions. String In

 

QueryFilter:User.Redwood System.Queue.Queue%2e;all
Generation Settings targetPrefix Definition Name Prefix The prefix to add onto the name of the imported Azure Runbook to create the corresponding Process Definition name. String In

 

 

Generation Settings downloadLogs Download Logs Indicates whether Runbook job logs should be downloaded. String In No Yes, No

Redwood_Azure_Automation_SubmitRunbookTemplate

Template for submitting an Azure Automation runbook.

Note: Rather than creating Process Definitions from this template manually, it may be more efficient to import the runbook first using the Redwood_Azure_Automation_ImportRunbooks Process Definition to get all the parameters. For Python runbooks, this is all you need. But, for PowerShell runbooks, you can add/remove parameters from the Source JSON depending on what you want to send in the request. For more information about the parameters RunMyJobs automatically import for PowerShell runbooks, see Runbook Parameters.

Note: You can only submit runbooks that have been published at least once. If you try to submit a runbook that has not been published, the job will fail with "Runbook not found" when you submit the Process Definition.

Parameters

Tab Name Description Documentation Data Type Direction Default Expression Values
Parameters connection Connection The Microsoft Entra (Azure AD) connection to use. String In

 

 

Parameters accountName Account Name The name of the Azure Automation account to connect to. String In

 

 

Parameters resourceGroup Resource Group The name of the Resource Group for listing. String In

 

 

Parameters runbook Runbook Defines the Runbook that will be submitted. String In

 

 

Parameters jobName Job Name The unique name that will be used for the job. If left blank, a GUID will be automatically generated for the job name. String In

 

 

Parameters downloadLogs Download Logs Indicates whether job logs should be downloaded. String In `No` Yes,No

Runbook Parameters

Generated Process Definitions for different types of imported runbooks have different Parameters in addition to the standard set listed above. This section describes the available Parameter types for Python and PowerShell runbooks.

Python Runbook Parameters

Python runbook Process Definitions have a single Python Arguments Parameter that takes an array. The values in this array are then supplied as the runbook's argv arguments, in the order they are set on the Parameter.

PowerShell Runbook Parameters

PowerShell Process Definitions include a Parameter Group that displays as the Runbook Parameters tab. This tab lists any parameters associated with the runbook. The data types RunMyJobs automatically imports from the runbook are:

  • System.String

  • System.Int32

  • System.Int64

  • System.Decimal

  • System.Boolean

  • System.Management.Automation.SwitchParameter

  • System.DateTime

  • PSCredential

  • System.String[]

  • System.Int32[]

  • System.Boolean[]

  • System.Array (see note below)

Note: The System.Array type lets you combine values of multiple data types (String, Number, Boolean, etc.) into a single array. If you want a value in a System.Array to be handled as a String, enclose it in single or double quotation marks.