Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idazure.automation.jobs

Fields

NameDatatypeDescription
automationAccountNametextfield from the properties object
creation_timetextfield from the properties object
end_timetextfield from the properties object
exceptiontextfield from the properties object
jobNametextfield from the properties object
job_idtextfield from the properties object
last_modified_timetextfield from the properties object
last_status_modified_timetextfield from the properties object
parameterstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
run_ontextfield from the properties object
runbooktextfield from the properties object
start_timetextfield from the properties object
started_bytextfield from the properties object
statustextfield from the properties object
status_detailstextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, jobName, resourceGroupName, subscriptionIdRetrieve the job identified by job name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of jobs.
createINSERTautomationAccountName, jobName, resourceGroupName, subscriptionId, data__propertiesCreate a job of the runbook.
resumeEXECautomationAccountName, jobName, resourceGroupName, subscriptionIdResume the job identified by jobName.
stopEXECautomationAccountName, jobName, resourceGroupName, subscriptionIdStop the job identified by jobName.
suspendEXECautomationAccountName, jobName, resourceGroupName, subscriptionIdSuspend the job identified by job name.

SELECT examples

Retrieve a list of jobs.

SELECT
automationAccountName,
creation_time,
end_time,
exception,
jobName,
job_id,
last_modified_time,
last_status_modified_time,
parameters,
provisioning_state,
resourceGroupName,
run_on,
runbook,
start_time,
started_by,
status,
status_details,
subscriptionId
FROM azure.automation.vw_jobs
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.automation.jobs (
automationAccountName,
jobName,
resourceGroupName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ automationAccountName }}',
'{{ jobName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;