runbook_draft
Creates, updates, deletes, gets or lists a runbook_draft resource.
Overview
| Name | runbook_draft |
| Type | Resource |
| Id | azure.automation.runbook_draft |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
creationTime | string (date-time) | Gets or sets the creation time of the runbook draft. |
draftContentLink | object | Gets or sets the draft runbook content link. |
inEdit | boolean | Gets or sets whether runbook is in edit mode. |
lastModifiedTime | string (date-time) | Gets or sets the last modified time of the runbook draft. |
outputTypes | array | Gets or sets the runbook output types. |
parameters | object | Gets or sets the runbook draft parameters. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, automation_account_name, runbook_name, subscription_id | Retrieve the runbook draft identified by runbook name. | |
get_content | exec | resource_group_name, automation_account_name, runbook_name, subscription_id | Retrieve the content of runbook draft identified by runbook name. | |
replace_content | exec | resource_group_name, automation_account_name, runbook_name, subscription_id | Replaces the runbook draft content. | |
undo_edit | exec | resource_group_name, automation_account_name, runbook_name, subscription_id | Undo 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.
| Name | Datatype | Description |
|---|---|---|
automation_account_name | string | The name of the automation account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
runbook_name | string | The runbook name. Required. |
subscription_id | string |
SELECT examples
- get
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
- get_content
- replace_content
- undo_edit
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
;
Replaces the runbook draft content.
EXEC azure.automation.runbook_draft.replace_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
;
Undo draft edit to last known published state identified by runbook name.
EXEC azure.automation.runbook_draft.undo_edit
@resource_group_name='{{ resource_group_name }}' --required,
@automation_account_name='{{ automation_account_name }}' --required,
@runbook_name='{{ runbook_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;