Skip to main content

runbook_draft

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

Overview

Namerunbook_draft
TypeResource
Idazure.automation.runbook_draft

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
getselectresource_group_name, automation_account_name, runbook_name, subscription_idRetrieve the runbook draft identified by runbook name.
get_contentexecresource_group_name, automation_account_name, runbook_name, subscription_idRetrieve the content of runbook draft identified by runbook name.
replace_contentexecresource_group_name, automation_account_name, runbook_name, subscription_idReplaces the runbook draft content.
undo_editexecresource_group_name, automation_account_name, runbook_name, subscription_idUndo 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
automation_account_namestringThe name of the automation account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
runbook_namestringThe runbook name. Required.
subscription_idstring

SELECT examples

Retrieve the runbook draft identified by runbook name.

SELECT
creationTime,
draftContentLink,
inEdit,
lastModifiedTime,
outputTypes,
parameters
FROM azure.automation.runbook_draft
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND runbook_name = '{{ runbook_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Retrieve the content of runbook draft identified by runbook name.

EXEC azure.automation.runbook_draft.get_content 
@resource_group_name='{{ resource_group_name }}' --required,
@automation_account_name='{{ automation_account_name }}' --required,
@runbook_name='{{ runbook_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;