Skip to main content

runbook_drafts

Creates, updates, deletes, gets or lists a runbook_drafts resource.

Overview

Namerunbook_drafts
TypeResource
Idazure.automation.runbook_drafts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creationTimestring (date-time)Gets or sets the creation time of the runbook draft.
draftContentLinkobjectGets or sets the draft runbook content link.
inEditbooleanGets or sets whether runbook is in edit mode.
lastModifiedTimestring (date-time)Gets or sets the last modified time of the runbook draft.
outputTypesarrayGets or sets the runbook output types.
parametersobjectGets or sets the runbook draft parameters.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, automationAccountName, runbookNameRetrieve the runbook draft identified by runbook name.
undo_editexecsubscriptionId, resourceGroupName, automationAccountName, runbookNameUndo draft edit to last known published state identified by runbook name.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
automationAccountNamestringThe name of the automation account.
resourceGroupNamestringName of an Azure Resource group.
runbookNamestringThe runbook name.
subscriptionIdstringGets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

SELECT examples

Retrieve the runbook draft identified by runbook name.

SELECT
creationTime,
draftContentLink,
inEdit,
lastModifiedTime,
outputTypes,
parameters
FROM azure.automation.runbook_drafts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationAccountName = '{{ automationAccountName }}' -- required
AND runbookName = '{{ runbookName }}' -- required
;

Lifecycle Methods

Undo draft edit to last known published state identified by runbook name.

EXEC azure.automation.runbook_drafts.undo_edit 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@runbookName='{{ runbookName }}' --required
;