Job - List By Automation Account
Retrieve a list of jobs.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs?api-version=2019-06-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs?$filter={$filter}&api-version=2019-06-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
automation
|
path | True |
|
The name of the automation account. |
|
resource
|
path | True |
|
Name of an Azure Resource group. Regex pattern: |
|
subscription
|
path | True |
|
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 |
|
Client Api Version. |
|
$filter
|
query |
|
The filter to apply on the operation. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| clientRequestId |
|
Identifies this specific client request. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
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
List jobs by automation account
Sample Request
Sample Response
{
"value": [
{
"id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job1",
"name": "job1",
"type": "Microsoft.Automation/AutomationAccounts/Jobs",
"properties": {
"jobId": "45203a94-a8cb-47c3-8ce4-4dcc3a5f7d23",
"runbook": {
"name": "TestRunbook"
},
"provisioningState": "Succeeded",
"status": "New",
"creationTime": "2017-03-30T05:53:30.243+00:00",
"startTime": null,
"lastModifiedTime": "2017-03-30T05:53:30.243+00:00",
"endTime": null
}
},
{
"id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job2",
"name": "job2",
"type": "Microsoft.Automation/AutomationAccounts/Jobs",
"properties": {
"jobId": "7584055f-5118-460a-a2dd-5176c9c8efe9",
"runbook": {
"name": "TestRunbook"
},
"provisioningState": "Succeeded",
"status": "Completed",
"creationTime": "2017-03-30T05:46:49.37+00:00",
"startTime": "2017-03-30T05:47:35.2+00:00",
"lastModifiedTime": "2017-03-30T05:48:38.857+00:00",
"endTime": "2017-03-30T05:48:38.857+00:00"
}
}
],
"nextLink": null
}
Definitions
|
Error |
Error response of an operation failure |
|
Job |
Job collection item properties. |
|
Job |
The response model for the list job operation. |
|
Job |
Gets or sets the status of the job. |
|
Runbook |
The runbook property associated with the entity. |
ErrorResponse
Error response of an operation failure
| Name | Type | Description |
|---|---|---|
| code |
|
Error code |
| message |
|
Error message indicating why the operation failed. |
JobCollectionItem
Job collection item properties.
| Name | Type | Description |
|---|---|---|
| id |
|
Fully qualified resource Id for the resource |
| name |
|
The name of the resource |
| properties.creationTime |
|
The creation time of the job. |
| properties.endTime |
|
The end time of the job. |
| properties.jobId |
|
The id of the job. |
| properties.lastModifiedTime |
|
The last modified time of the job. |
| properties.provisioningState |
|
The provisioning state of a resource. |
| properties.runOn |
|
Specifies the runOn group name where the job was executed. |
| properties.runbook |
The runbook association. |
|
| properties.startTime |
|
The start time of the job. |
| properties.status |
The status of the job. |
|
| type |
|
The type of the resource. |
JobListResultV2
The response model for the list job operation.
| Name | Type | Description |
|---|---|---|
| nextLink |
|
The link to the next page. |
| value |
List of jobs. |
JobStatus
Gets or sets the status of the job.
| Name | Type | Description |
|---|---|---|
| Activating |
|
|
| Blocked |
|
|
| Completed |
|
|
| Disconnected |
|
|
| Failed |
|
|
| New |
|
|
| Removing |
|
|
| Resuming |
|
|
| Running |
|
|
| Stopped |
|
|
| Stopping |
|
|
| Suspended |
|
|
| Suspending |
|
RunbookAssociationProperty
The runbook property associated with the entity.
| Name | Type | Description |
|---|---|---|
| name |
|
Gets or sets the name of the runbook. |