Skip to main content

runbooks

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

Overview

Namerunbooks
TypeResource
Idazure.automation.runbooks

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
automationAccountNametextfield from the properties object
creation_timetextfield from the properties object
drafttextfield from the properties object
etagtextGets or sets the etag of the resource.
job_counttextfield from the properties object
last_modified_bytextfield from the properties object
last_modified_timetextfield from the properties object
locationtextThe geo-location where the resource lives
log_activity_tracetextfield from the properties object
log_progresstextfield from the properties object
log_verbosetextfield from the properties object
output_typestextfield from the properties object
parameterstextfield from the properties object
provisioning_statetextfield from the properties object
publish_content_linktextfield from the properties object
resourceGroupNametextfield from the properties object
runbookNametextfield from the properties object
runbook_typetextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, resourceGroupName, runbookName, subscriptionIdRetrieve the runbook identified by runbook name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of runbooks.
create_or_updateINSERTautomationAccountName, resourceGroupName, runbookName, subscriptionId, data__propertiesCreate the runbook identified by runbook name.
deleteDELETEautomationAccountName, resourceGroupName, runbookName, subscriptionIdDelete the runbook by name.
updateUPDATEautomationAccountName, resourceGroupName, runbookName, subscriptionIdUpdate the runbook identified by runbook name.
publishEXECautomationAccountName, resourceGroupName, runbookName, subscriptionIdPublish runbook draft.

SELECT examples

Retrieve a list of runbooks.

SELECT
description,
automationAccountName,
creation_time,
draft,
etag,
job_count,
last_modified_by,
last_modified_time,
location,
log_activity_trace,
log_progress,
log_verbose,
output_types,
parameters,
provisioning_state,
publish_content_link,
resourceGroupName,
runbookName,
runbook_type,
state,
subscriptionId,
tags
FROM azure.automation.vw_runbooks
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new runbooks resource.

/*+ create */
INSERT INTO azure.automation.runbooks (
automationAccountName,
resourceGroupName,
runbookName,
subscriptionId,
data__properties,
properties,
name,
location,
tags
)
SELECT
'{{ automationAccountName }}',
'{{ resourceGroupName }}',
'{{ runbookName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ name }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a runbooks resource.

/*+ update */
UPDATE azure.automation.runbooks
SET
properties = '{{ properties }}',
name = '{{ name }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND runbookName = '{{ runbookName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified runbooks resource.

/*+ delete */
DELETE FROM azure.automation.runbooks
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND runbookName = '{{ runbookName }}'
AND subscriptionId = '{{ subscriptionId }}';