Test Job - Get

Retrieve the test job for the specified runbook.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob?api-version=2023-11-01

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

runbookName
path True

string

The runbook name.

Regex pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$

subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

TestJob

OK

Other Status Codes

ErrorResponse

Automation error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get test job

Sample Request

GET https://management.azure.com/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial/draft/testJob?api-version=2023-11-01

Sample Response

{
  "creationTime": "2018-02-09T05:52:00.9344172+00:00",
  "status": "Completed",
  "statusDetails": "None",
  "startTime": "2018-02-09T05:55:10.8344743+00:00",
  "endTime": "2018-02-09T05:55:16.7827254+00:00",
  "lastModifiedTime": "2018-02-09T05:55:16.7827254+00:00",
  "lastStatusModifiedTime": "2018-02-09T05:55:16.7827254+00:00",
  "exception": null,
  "parameters": {},
  "runOn": null,
  "logActivityTrace": null
}

Definitions

Name Description
ErrorResponse

Error response of an operation failure

TestJob

Definition of the test job.

ErrorResponse

Error response of an operation failure

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

TestJob

Definition of the test job.

Name Type Description
creationTime

string

Gets or sets the creation time of the test job.

endTime

string

Gets or sets the end time of the test job.

exception

string

Gets or sets the exception of the test job.

lastModifiedTime

string

Gets or sets the last modified time of the test job.

lastStatusModifiedTime

string

Gets or sets the last status modified time of the test job.

logActivityTrace

integer

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

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.