runbooks
Creates, updates, deletes, gets or lists a runbooks
resource.
Overview
Name | runbooks |
Type | Resource |
Id | azure.automation.runbooks |
Fields
- vw_runbooks
- runbooks
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
automationAccountName | text | field from the properties object |
creation_time | text | field from the properties object |
draft | text | field from the properties object |
etag | text | Gets or sets the etag of the resource. |
job_count | text | field from the properties object |
last_modified_by | text | field from the properties object |
last_modified_time | text | field from the properties object |
location | text | The geo-location where the resource lives |
log_activity_trace | text | field from the properties object |
log_progress | text | field from the properties object |
log_verbose | text | field from the properties object |
output_types | text | field from the properties object |
parameters | text | field from the properties object |
provisioning_state | text | field from the properties object |
publish_content_link | text | field from the properties object |
resourceGroupName | text | field from the properties object |
runbookName | text | field from the properties object |
runbook_type | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
etag | string | Gets or sets the etag of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Definition of the runbook property type. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | automationAccountName, resourceGroupName, runbookName, subscriptionId | Retrieve the runbook identified by runbook name. |
list_by_automation_account | SELECT | automationAccountName, resourceGroupName, subscriptionId | Retrieve a list of runbooks. |
create_or_update | INSERT | automationAccountName, resourceGroupName, runbookName, subscriptionId, data__properties | Create the runbook identified by runbook name. |
delete | DELETE | automationAccountName, resourceGroupName, runbookName, subscriptionId | Delete the runbook by name. |
update | UPDATE | automationAccountName, resourceGroupName, runbookName, subscriptionId | Update the runbook identified by runbook name. |
publish | EXEC | automationAccountName, resourceGroupName, runbookName, subscriptionId | Publish runbook draft. |
SELECT
examples
Retrieve a list of runbooks.
- vw_runbooks
- 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 }}';
SELECT
etag,
location,
properties,
tags
FROM azure.automation.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: logVerbose
value: boolean
- name: logProgress
value: boolean
- name: runbookType
value: string
- name: draft
value:
- name: inEdit
value: boolean
- name: draftContentLink
value:
- name: uri
value: string
- name: contentHash
value:
- name: algorithm
value: string
- name: value
value: string
- name: version
value: string
- name: creationTime
value: string
- name: lastModifiedTime
value: string
- name: parameters
value: object
- name: outputTypes
value:
- string
- name: description
value: string
- name: logActivityTrace
value: integer
- name: name
value: string
- name: location
value: string
- name: tags
value: object
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 }}';