test_jobs
Creates, updates, deletes, gets or lists a test_jobs
resource.
Overview
Name | test_jobs |
Type | Resource |
Id | azure.automation.test_jobs |
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 test job. |
endTime | string (date-time) | Gets or sets the end time of the test job. |
exception | string | Gets or sets the exception of the test job. |
lastModifiedTime | string (date-time) | Gets or sets the last modified time of the test job. |
lastStatusModifiedTime | string (date-time) | Gets or sets the last status modified time of the test job. |
logActivityTrace | integer (int32) | The activity-level tracing options of the runbook. |
parameters | object | Gets or sets the parameters of the test job. |
runOn | string | Gets or sets the runOn which specifies the group name where the job is to be executed. |
startTime | string (date-time) | Gets or sets the start time of the test job. |
status | string | Gets or sets the status of the test job. |
statusDetails | string | Gets or sets the status details of the test job. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , automationAccountName , runbookName | Retrieve the test job for the specified runbook. | |
create | insert | subscriptionId , resourceGroupName , automationAccountName , runbookName | Create a test job of the runbook. | |
resume | exec | subscriptionId , resourceGroupName , automationAccountName , runbookName | Resume the test job. | |
stop | exec | subscriptionId , resourceGroupName , automationAccountName , runbookName | Stop the test job. | |
suspend | exec | subscriptionId , resourceGroupName , automationAccountName , runbookName | Suspend the test job. |
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 |
---|---|---|
automationAccountName | string | The name of the automation account. |
resourceGroupName | string | Name of an Azure Resource group. |
runbookName | string | The runbook name. |
subscriptionId | string | Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
SELECT
examples
- get
Retrieve the test job for the specified runbook.
SELECT
creationTime,
endTime,
exception,
lastModifiedTime,
lastStatusModifiedTime,
logActivityTrace,
parameters,
runOn,
startTime,
status,
statusDetails
FROM azure.automation.test_jobs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationAccountName = '{{ automationAccountName }}' -- required
AND runbookName = '{{ runbookName }}' -- required
;
INSERT
examples
- create
- Manifest
Create a test job of the runbook.
INSERT INTO azure.automation.test_jobs (
data__parameters,
data__runOn,
subscriptionId,
resourceGroupName,
automationAccountName,
runbookName
)
SELECT
'{{ parameters }}',
'{{ runOn }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ automationAccountName }}',
'{{ runbookName }}'
RETURNING
creationTime,
endTime,
exception,
lastModifiedTime,
lastStatusModifiedTime,
logActivityTrace,
parameters,
runOn,
startTime,
status,
statusDetails
;
# Description fields are for documentation purposes
- name: test_jobs
props:
- name: subscriptionId
value: string
description: Required parameter for the test_jobs resource.
- name: resourceGroupName
value: string
description: Required parameter for the test_jobs resource.
- name: automationAccountName
value: string
description: Required parameter for the test_jobs resource.
- name: runbookName
value: string
description: Required parameter for the test_jobs resource.
- name: parameters
value: object
description: |
Gets or sets the parameters of the test job.
- name: runOn
value: string
description: |
Gets or sets the runOn which specifies the group name where the job is to be executed.
Lifecycle Methods
- resume
- stop
- suspend
Resume the test job.
EXEC azure.automation.test_jobs.resume
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@runbookName='{{ runbookName }}' --required
;
Stop the test job.
EXEC azure.automation.test_jobs.stop
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@runbookName='{{ runbookName }}' --required
;
Suspend the test job.
EXEC azure.automation.test_jobs.suspend
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationAccountName='{{ automationAccountName }}' --required,
@runbookName='{{ runbookName }}' --required
;