-
Notifications
You must be signed in to change notification settings - Fork 5.8k
AzAutomation Swagger for job & runbook #2466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7c7b8af
Added swagger spec for job
najams 9445334
fixed unintentional update to
najams 7eae734
Examples
najams 367adc8
Fixed job schema & examples
najams 6a5bdc2
Fixed description and schema
najams 587fb2d
Merge https://github.com/Azure/azure-rest-api-specs
najams e0d334c
Fixed runbook and test job and their examples.
najams fd6288f
Merge https://github.com/Azure/azure-rest-api-specs
najams e6d92ce
Added x-ms-mutability to job and testJob
najams 6a3f6df
Merge https://github.com/Azure/azure-rest-api-specs
najams 638780c
Fixed build failures
najams ab79730
Merge https://github.com/Azure/azure-rest-api-specs
najams b963841
Merge https://github.com/Azure/azure-rest-api-specs
najams 610916a
Addressed review comments: 1. make properties read-only 2. Define enu…
najams 3ee5a3b
Fixed examples
najams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,121 @@ | |
| }, | ||
| "paths": {}, | ||
| "definitions": { | ||
| "Job": { | ||
| "description": "Definition of the job.", | ||
| "x-ms-mutability": [ | ||
| "read", | ||
| "create" | ||
| ], | ||
| "properties": { | ||
| "properties": { | ||
| "$ref": "../../stable/2015-10-31/definitions.json#/definitions/JobProperties", | ||
| "x-ms-client-flatten": true, | ||
| "description": "The properties of the job." | ||
| } | ||
| }, | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../stable/2015-10-31/definitions.json#/definitions/ProxyResource" | ||
| } | ||
| ] | ||
| }, | ||
| "jobCollectionItem": { | ||
| "description": "Job collection item properties.", | ||
| "type": "object", | ||
| "properties": { | ||
| "properties": { | ||
| "x-ms-client-flatten": true, | ||
| "description": "Job properties.", | ||
| "$ref": "#/definitions/jobCollectionItemProperties" | ||
| } | ||
| }, | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../stable/2015-10-31/definitions.json#/definitions/ProxyResource" | ||
| } | ||
| ], | ||
| "required": [ | ||
| "properties" | ||
| ] | ||
| }, | ||
| "jobCollectionItemProperties": { | ||
| "description": "Job collection item properties.", | ||
| "properties": { | ||
| "runbook": { | ||
| "$ref": "../../stable/2015-10-31/definitions.json#/definitions/RunbookAssociationProperty", | ||
| "description": "The runbook association." | ||
| }, | ||
| "jobId": { | ||
| "type": "string", | ||
| "format": "uuid", | ||
| "description": "The id of the job." | ||
| }, | ||
| "creationTime": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "The creation time of the job." | ||
| }, | ||
| "status": { | ||
| "type": "string", | ||
| "description": "The status of the job.", | ||
| "enum": [ | ||
| "New", | ||
| "Activating", | ||
| "Running", | ||
| "Completed", | ||
| "Failed", | ||
| "Stopped", | ||
| "Blocked", | ||
| "Suspended", | ||
| "Disconnected", | ||
| "Suspending", | ||
| "Stopping", | ||
| "Resuming", | ||
| "Removing" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "JobStatus", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| "startTime": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "The start time of the job." | ||
| }, | ||
| "endTime": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "The end time of the job." | ||
| }, | ||
| "lastModifiedTime": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. read only |
||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "The last modified time of the job." | ||
| }, | ||
| "provisioningState": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. read only |
||
| "$ref": "../../stable/2015-10-31/definitions.json#/definitions/ProvisioningStateProperty", | ||
| "description": "The current provisioning state of the job." | ||
| } | ||
| } | ||
| }, | ||
| "JobListResultV2": { | ||
| "properties": { | ||
| "value": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "./definitions.json#/definitions/jobCollectionItem" | ||
| }, | ||
| "description": "List of jobs." | ||
| }, | ||
| "nextLink": { | ||
| "type": "string", | ||
| "description": "The link to the next page." | ||
| } | ||
| }, | ||
| "description": "The response model for the list job operation." | ||
| }, | ||
| "softwareUpdateConfigurationProperties": { | ||
| "description": "Software update configuration properties.", | ||
| "properties": { | ||
|
|
||
51 changes: 51 additions & 0 deletions
51
...ource-manager/Microsoft.Automation/preview/2017-05-15-preview/examples/job/createJob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview", | ||
| "parameters": { | ||
| "properties": { | ||
| "runbook": { | ||
| "name": "TestRunbook" | ||
| }, | ||
| "parameters": { | ||
| "key01": "value01", | ||
| "key02": "value02" | ||
| }, | ||
| "runOn": "" | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName", | ||
| "name": "foo", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Jobs", | ||
| "properties": { | ||
| "jobId": "5b8a3960-e8ab-45f6-bec6-567df8467d1a", | ||
| "runbook": { | ||
| "name": "TestRunbook" | ||
| }, | ||
| "provisioningState": "Processing", | ||
| "creationTime": "2018-02-01T05:53:30.243+00:00", | ||
| "endTime": null, | ||
| "exception": null, | ||
| "lastModifiedTime": "2018-02-01T05:53:30.243+00:00", | ||
| "lastStatusModifiedTime": "2018-02-01T05:53:30.243+00:00", | ||
| "startTime": null, | ||
| "status": "New", | ||
| "statusDetails": "None", | ||
| "parameters": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "runOn": "" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
39 changes: 39 additions & 0 deletions
39
...resource-manager/Microsoft.Automation/preview/2017-05-15-preview/examples/job/getJob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName", | ||
| "name": "foo", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Jobs", | ||
| "properties": { | ||
| "jobId": "5b8a3960-e8ab-45f6-bec6-567df8467d1a", | ||
| "runbook": { | ||
| "name": "TestRunbook" | ||
| }, | ||
| "provisioningState": "Processing", | ||
| "creationTime": "2018-02-01T05:53:30.243+00:00", | ||
| "endTime": null, | ||
| "exception": null, | ||
| "lastModifiedTime": "2018-02-01T05:53:30.243+00:00", | ||
| "lastStatusModifiedTime": "2018-02-01T05:53:30.243+00:00", | ||
| "startTime": null, | ||
| "status": "New", | ||
| "statusDetails": "None", | ||
| "parameters": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "runOn": "" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...ce-manager/Microsoft.Automation/preview/2017-05-15-preview/examples/job/getJobOutput.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": { | ||
| "Content-Type": "text/plain" | ||
| }, | ||
| "body": "Wednesday, February 7, 2018 3:47:17 PM" | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...er/Microsoft.Automation/preview/2017-05-15-preview/examples/job/getJobRunbookContent.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": { | ||
| "Content-Type": "text/powershell" | ||
| }, | ||
| "body": "get-date" | ||
| } | ||
| } | ||
| } |
27 changes: 27 additions & 0 deletions
27
...ce-manager/Microsoft.Automation/preview/2017-05-15-preview/examples/job/getJobStream.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "jobStreamId": "851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001", | ||
| "properties": { | ||
| "jobStreamId": "851b2101-686f-40e2-8a4b-5b8df08afbd1:00636535684910693884:00000000000000000001", | ||
| "summary": null, | ||
| "time": "2018-02-07T02:48:11.0693884+00:00", | ||
| "streamType": "Output", | ||
| "streamText": "", | ||
| "value": { | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
37 changes: 37 additions & 0 deletions
37
...ger/Microsoft.Automation/preview/2017-05-15-preview/examples/job/listJobStreamsByJob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "value": [ | ||
| { | ||
| "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001", | ||
| "properties": { | ||
| "jobStreamId": "24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001", | ||
| "summary": null, | ||
| "time": "2018-02-07T02:33:18.1232703+00:00", | ||
| "streamType": "Output" | ||
| } | ||
| }, | ||
| { | ||
| "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002", | ||
| "properties": { | ||
| "jobStreamId": "24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002", | ||
| "summary": null, | ||
| "time": "2018-02-07T02:33:18.469135+00:00", | ||
| "streamType": "Output" | ||
| } | ||
| } | ||
| ], | ||
| "nextLink": "" | ||
| } | ||
| } | ||
| } | ||
| } |
53 changes: 53 additions & 0 deletions
53
...osoft.Automation/preview/2017-05-15-preview/examples/job/listJobsByAutomationAccount.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "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": "" | ||
| } | ||
| } | ||
| } | ||
| } |
12 changes: 12 additions & 0 deletions
12
...ource-manager/Microsoft.Automation/preview/2017-05-15-preview/examples/job/resumeJob.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "jobName": "foo", | ||
| "api-version": "2017-05-15-preview" | ||
| }, | ||
| "responses": { | ||
| "200": {} | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read only