Runbook - List By Automation Account

Retrieve a list of runbooks.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks?api-version=2023-11-01

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

RunbookListResult

OK

Other Status Codes

ErrorResponse

Automation error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

List runbooks by automation account

Sample request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks?api-version=2023-11-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/ASR-AddPublicIp",
      "location": "East US 2",
      "name": "ASR-AddPublicIp",
      "type": "Microsoft.Automation/AutomationAccounts/Runbooks",
      "properties": {
        "runbookType": "PowerShell",
        "state": "Published",
        "logVerbose": true,
        "logProgress": true,
        "logActivityTrace": 1,
        "creationTime": "2017-03-28T21:32:25.78+00:00",
        "lastModifiedTime": "2017-03-28T21:32:25.81+00:00"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/AutoExport",
      "location": "East US 2",
      "name": "AutoExport",
      "type": "Microsoft.Automation/AutomationAccounts/Runbooks",
      "properties": {
        "runbookType": "PowerShell",
        "state": "Published",
        "logVerbose": true,
        "logProgress": true,
        "logActivityTrace": 1,
        "creationTime": "2017-03-28T21:32:27.327+00:00",
        "lastModifiedTime": "2017-03-28T21:32:27.327+00:00"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial",
      "location": "East US 2",
      "name": "Get-AzureVMTutorial",
      "type": "Microsoft.Automation/AutomationAccounts/Runbooks",
      "properties": {
        "runbookType": "PowerShellWorkflow",
        "state": "Published",
        "logVerbose": false,
        "logProgress": true,
        "logActivityTrace": 1,
        "creationTime": "2017-03-28T21:32:23.75+00:00",
        "lastModifiedTime": "2017-03-28T21:32:23.75+00:00"
      }
    }
  ]
}

Definitions

Name Description
ContentHash

Definition of the runbook property type.

ContentLink

Definition of the content link.

ErrorResponse

Error response of an operation failure

Runbook

Definition of the runbook type.

RunbookDraft
RunbookListResult

The response model for the list runbook operation.

RunbookParameter

Definition of the runbook parameter type.

RunbookProvisioningState

Gets or sets the provisioning state of the runbook.

RunbookState

Gets or sets the state of the runbook.

RunbookTypeEnum

Gets or sets the type of the runbook.

ContentHash

Definition of the runbook property type.

Name Type Description
algorithm

string

Gets or sets the content hash algorithm used to hash the content.

value

string

Gets or sets expected hash value of the content.

Definition of the content link.

Name Type Description
contentHash

ContentHash

Sets the hash.

uri

string

Sets the uri of the content.

version

string

Sets the version of the content.

ErrorResponse

Error response of an operation failure

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

Runbook

Definition of the runbook type.

Name Type Description
etag

string

Gets or sets the etag of the resource.

id

string

Fully qualified resource Id for the resource

location

string

The Azure Region where the resource lives

name

string

The name of the resource

properties.creationTime

string

Gets or sets the creation time.

properties.description

string

Gets or sets the description.

properties.draft

RunbookDraft

Gets or sets the draft runbook properties.

properties.jobCount

integer

Gets or sets the job count of the runbook.

properties.lastModifiedBy

string

Gets or sets the last modified by.

properties.lastModifiedTime

string

Gets or sets the last modified time.

properties.logActivityTrace

integer

Gets or sets the option to log activity trace of the runbook.

properties.logProgress

boolean

Gets or sets progress log option.

properties.logVerbose

boolean

Gets or sets verbose log option.

properties.outputTypes

string[]

Gets or sets the runbook output types.

properties.parameters

<string,  RunbookParameter>

Gets or sets the runbook parameters.

properties.provisioningState

RunbookProvisioningState

Gets or sets the provisioning state of the runbook.

properties.publishContentLink

ContentLink

Gets or sets the published runbook content link.

properties.runbookType

RunbookTypeEnum

Gets or sets the type of the runbook.

properties.state

RunbookState

Gets or sets the state of the runbook.

tags

object

Resource tags.

type

string

The type of the resource.

RunbookDraft

Name Type Description
creationTime

string

Gets or sets the creation time of the runbook draft.

draftContentLink

ContentLink

Gets or sets the draft runbook content link.

inEdit

boolean

Gets or sets whether runbook is in edit mode.

lastModifiedTime

string

Gets or sets the last modified time of the runbook draft.

outputTypes

string[]

Gets or sets the runbook output types.

parameters

<string,  RunbookParameter>

Gets or sets the runbook draft parameters.

RunbookListResult

The response model for the list runbook operation.

Name Type Description
nextLink

string

Gets or sets the next link.

value

Runbook[]

Gets or sets a list of runbooks.

RunbookParameter

Definition of the runbook parameter type.

Name Type Description
defaultValue

string

Gets or sets the default value of parameter.

isMandatory

boolean

Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.

position

integer

Get or sets the position of the parameter.

type

string

Gets or sets the type of the parameter.

RunbookProvisioningState

Gets or sets the provisioning state of the runbook.

Name Type Description
Succeeded

string

RunbookState

Gets or sets the state of the runbook.

Name Type Description
Edit

string

New

string

Published

string

RunbookTypeEnum

Gets or sets the type of the runbook.

Name Type Description
Graph

string

GraphPowerShell

string

GraphPowerShellWorkflow

string

PowerShell

string

PowerShell72

string

PowerShellWorkflow

string

Python2

string

Python3

string

Script

string