Runbook Draft - Get

Retrieve the runbook draft identified by runbook name.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft?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\._]+$

runbookName
path True

string

The runbook name.

Regex pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$

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

RunbookDraft

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

Get runbook draft

Sample Request

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

Sample Response

{
  "creationTime": "2018-02-09T03:25:59.11+00:00",
  "lastModifiedTime": "2018-02-09T04:48:56.43+00:00",
  "inEdit": true,
  "parameters": {},
  "outputTypes": []
}

Definitions

Name Description
ContentHash

Definition of the runbook property type.

ContentLink

Definition of the content link.

ErrorResponse

Error response of an operation failure

RunbookDraft
RunbookParameter

Definition of the runbook parameter type.

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.

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.

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.