-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Moved the Publish method from runbookDraft to Runbook. #3325
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8346c06
Moved the Publish method from runbookDraft to Runbook.
0fb7b0d
Adding the readme.md file. Missed in the first commit.
66a7120
Modelling enum values as strings.
ee9515b
Syncing dscNodeCounts.json to latest
db84936
Updating JobStreamProperties element
fa8e2eb
Syncing JobStreamProperties
7c85e8e
Changing JobStreamProperties to JSProperties to test
vrdmr 81e90de
Reverting the JS to jobStream
vrdmr 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
Next
Next commit
Moved the Publish method from runbookDraft to Runbook.
- Loading branch information
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 |
|---|---|---|
|
|
@@ -140,7 +140,8 @@ | |
| "x-ms-enum": { | ||
| "name": "CountType", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| "x-ms-parameter-location": "method" | ||
| } | ||
| } | ||
| } | ||
95 changes: 95 additions & 0 deletions
95
...source-manager/Microsoft.Automation/stable/2018-06-30/examples/createOrUpdateRunbook.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,95 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31", | ||
| "parameters": { | ||
| "properties": { | ||
| "logVerbose": false, | ||
| "logProgress": true, | ||
| "runbookType": "PowerShellWorkflow", | ||
| "publishContentLink": { | ||
| "uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1", | ||
| "contentHash": { | ||
| "algorithm": "SHA256", | ||
| "value": "115775B8FF2BE672D8A946BD0B489918C724DDE15A440373CA54461D53010A80" | ||
| } | ||
| }, | ||
| "description": "Description of the Runbook", | ||
| "logActivityTrace": 1 | ||
| }, | ||
| "name": "Get-AzureVMTutorial", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial", | ||
| "name": "Get-AzureVMTutorial", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Runbooks", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "etag": "\"636263318837230000\"", | ||
| "properties": { | ||
| "description": "Description of the Runbook", | ||
| "logVerbose": false, | ||
| "logProgress": true, | ||
| "logActivityTrace": 1, | ||
| "runbookType": "PowerShellWorkflow", | ||
| "parameters": {}, | ||
| "state": "Published", | ||
| "jobCount": 0, | ||
| "provisioningState": "Succeeded", | ||
| "outputTypes": [], | ||
| "creationTime": "2017-03-28T21:04:43.66+00:00", | ||
| "lastModifiedBy": "myEmaild@microsoft.com", | ||
| "lastModifiedTime": "2017-03-28T21:04:43.723+00:00" | ||
| } | ||
| } | ||
| }, | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial", | ||
| "name": "Get-AzureVMTutorial", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Runbooks", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "etag": "\"636263318866000000\"", | ||
| "properties": { | ||
| "description": "Description of the Runbook", | ||
| "logVerbose": true, | ||
| "logProgress": true, | ||
| "logActivityTrace": 1, | ||
| "runbookType": "PowerShellWorkflow", | ||
| "parameters": {}, | ||
| "state": "Published", | ||
| "jobCount": 0, | ||
| "provisioningState": "Succeeded", | ||
| "outputTypes": [], | ||
| "creationTime": "2017-03-28T21:04:43.66+00:00", | ||
| "lastModifiedBy": "myEmaild@microsoft.com", | ||
| "lastModifiedTime": "2017-03-28T21:04:46.6+00:00" | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "code": "BadRequest", | ||
| "message": "{\"Message\":\"Cannot specify the content link for a published runbook and draft at the same time.\"}" | ||
| } | ||
| } | ||
| } |
85 changes: 85 additions & 0 deletions
85
...esource-manager/Microsoft.Automation/stable/2018-06-30/examples/createRunbookAsDraft.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,85 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31", | ||
| "parameters": { | ||
| "properties": { | ||
| "logVerbose": false, | ||
| "logProgress": false, | ||
| "runbookType": "PowerShellWorkflow", | ||
| "description": "Description of the Runbook", | ||
| "draft": { } | ||
| }, | ||
| "name": "Get-AzureVMTutorial", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial", | ||
| "name": "Get-AzureVMTutorial", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Runbooks", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "etag": "\"636263318837230000\"", | ||
| "properties": { | ||
| "description": "Description of the Runbook", | ||
| "logVerbose": false, | ||
| "logProgress": false, | ||
| "logActivityTrace": 0, | ||
| "runbookType": "Script", | ||
| "parameters": {}, | ||
| "state": "New", | ||
| "jobCount": 0, | ||
| "provisioningState": "Succeeded", | ||
| "creationTime": "2018-02-09T03:25:59.097+00:00", | ||
| "lastModifiedTime": "2018-02-09T03:25:59.097+00:00", | ||
| "outputTypes": [] | ||
| } | ||
| } | ||
| }, | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial", | ||
| "name": "Get-AzureVMTutorial", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Runbooks", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "etag": "\"636263318866000000\"", | ||
| "properties": { | ||
| "description": "Description of the Runbook", | ||
| "logVerbose": false, | ||
| "logProgress": false, | ||
| "logActivityTrace": 0, | ||
| "runbookType": "Script", | ||
| "parameters": {}, | ||
| "state": "New", | ||
| "jobCount": 0, | ||
| "provisioningState": "Succeeded", | ||
| "creationTime": "2018-02-09T03:25:59.097+00:00", | ||
| "lastModifiedTime": "2018-02-09T03:25:59.097+00:00" | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "code": "BadRequest", | ||
| "message": "{\"Message\":\"Cannot specify the content link for a published runbook and draft at the same time.\"}" | ||
| } | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
...ation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createTestJob.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,34 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "51766542-3ed7-4a72-a187-0c8ab644ddab", | ||
| "resourceGroupName": "mygroup", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31", | ||
| "parameters": { | ||
| "parameters": { | ||
| "key01": "value01", | ||
| "key02": "value02" | ||
| }, | ||
| "runOn": "" | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "headers": {}, | ||
| "body": { | ||
| "creationTime": "2018-02-09T05:51:59.82+00:00", | ||
| "status": "New", | ||
| "statusDetails": "None", | ||
| "startTime": null, | ||
| "endTime": null, | ||
| "lastModifiedTime": "2018-02-09T05:51:59.82+00:00", | ||
| "lastStatusModifiedTime": "2018-02-09T05:51:59.82+00:00", | ||
| "exception": null, | ||
| "parameters": {}, | ||
| "runOn": null, | ||
| "logActivityTrace": null | ||
| } | ||
| } | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
...ation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/deleteRunbook.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,13 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": {}, | ||
| "204": {} | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
...tomation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.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,40 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial", | ||
| "name": "Get-AzureVMTutorial", | ||
| "type": "Microsoft.Automation/AutomationAccounts/Runbooks", | ||
| "location": "East US 2", | ||
| "tags": { | ||
| "tag01": "value01", | ||
| "tag02": "value02" | ||
| }, | ||
| "etag": "\"636263335437500000\"", | ||
| "properties": { | ||
| "description": "Description of the Runbook", | ||
| "logVerbose": false, | ||
| "logProgress": true, | ||
| "logActivityTrace": 1, | ||
| "runbookType": "PowerShellWorkflow", | ||
| "parameters": {}, | ||
| "state": "Published", | ||
| "jobCount": 0, | ||
| "provisioningState": "Succeeded", | ||
| "outputTypes": [], | ||
| "creationTime": "2017-03-28T21:32:23.75+00:00", | ||
| "lastModifiedBy": "myEmaild@microsoft.com", | ||
| "lastModifiedTime": "2017-03-28T21:32:23.75+00:00" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...n/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookContent.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": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": { | ||
| "Content-Type": "text/powershell" | ||
| }, | ||
| "body": "<#\r\n .DESCRIPTION\r\n An example runbook which prints out the first10 Azure VMs in your subscription (ordered alphabetically).\r\n For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http: \/\/aka.ms\/fxu3mn\r\n\r\n .NOTES\r\n AUTHOR: Azure Automation Team\r\n LASTEDIT: Mar27,\r\n 2015\r\n#>\r\nworkflow Get-AzureVMTutorial{\r\n #The name of the Automation Credential Asset this runbook will use to authenticate to Azure.\r\n $CredentialAssetName = 'DefaultAzureCredential'\r\n\r\n #Get the credential with the above name from the Automation Asset store\r\n $Cred = Get-AutomationPSCredential -Name $CredentialAssetName\r\n if(!$Cred){\r\n Throw\"Could not find an Automation Credential Asset named '${CredentialAssetName}'. Make sure you have created one in this Automation Account.\"\r\n }\r\n\r\n #Connect to your Azure Account\r\n $Account = Add-AzureAccount -Credential $Cred\r\n if(!$Account){\r\n Throw\"Could not authenticate to Azure using the credential asset '${CredentialAssetName}'. Make sure the user name and password are correct.\"\r\n }\r\n\r\n #TODO (optional): pick the right subscription to use. Without this line, the default subscription for your Azure Account will be used.\r\n #Select-AzureSubscription -SubscriptionName\"TODO: your Azure subscription name here\"\r\n \r\n #Get all the VMs you have in your Azure subscription\r\n $VMs = Get-AzureVM\r\n\r\n #Print out up to10 of those VMs\r\n if(!$VMs){\r\n Write-Output\"No VMs were found in your subscription.\"\r\n } else{\r\n Write-Output $VMs[0..9\r\n ]\r\n }\r\n }" | ||
| } | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
...ion/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraft.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,20 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "creationTime": "2018-02-09T03:25:59.11+00:00", | ||
| "lastModifiedTime": "2018-02-09T04:48:56.43+00:00", | ||
| "inEdit": true, | ||
| "parameters": {}, | ||
| "outputTypes": [] | ||
| } | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...ource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraftContent.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": "subid", | ||
| "resourceGroupName": "rg", | ||
| "automationAccountName": "ContoseAutomationAccount", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": { | ||
| "Content-Type": "text/powershell" | ||
| }, | ||
| "body": "<#\r\n .DESCRIPTION\r\n An example runbook which prints out the first10 Azure VMs in your subscription (ordered alphabetically).\r\n For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http: \/\/aka.ms\/fxu3mn\r\n\r\n .NOTES\r\n AUTHOR: Azure Automation Team\r\n LASTEDIT: Mar27,\r\n 2015\r\n#>\r\nworkflow Get-AzureVMTutorial{\r\n #The name of the Automation Credential Asset this runbook will use to authenticate to Azure.\r\n $CredentialAssetName = 'DefaultAzureCredential'\r\n\r\n #Get the credential with the above name from the Automation Asset store\r\n $Cred = Get-AutomationPSCredential -Name $CredentialAssetName\r\n if(!$Cred){\r\n Throw\"Could not find an Automation Credential Asset named '${CredentialAssetName}'. Make sure you have created one in this Automation Account.\"\r\n }\r\n\r\n #Connect to your Azure Account\r\n $Account = Add-AzureAccount -Credential $Cred\r\n if(!$Account){\r\n Throw\"Could not authenticate to Azure using the credential asset '${CredentialAssetName}'. Make sure the user name and password are correct.\"\r\n }\r\n\r\n #TODO (optional): pick the right subscription to use. Without this line, the default subscription for your Azure Account will be used.\r\n #Select-AzureSubscription -SubscriptionName\"TODO: your Azure subscription name here\"\r\n \r\n #Get all the VMs you have in your Azure subscription\r\n $VMs = Get-AzureVM\r\n\r\n #Print out up to10 of those VMs\r\n if(!$VMs){\r\n Write-Output\"No VMs were found in your subscription.\"\r\n } else{\r\n Write-Output $VMs[0..9\r\n ]\r\n }\r\n }" | ||
| } | ||
| } | ||
| } |
27 changes: 27 additions & 0 deletions
27
...tomation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getTestJob.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", | ||
| "runbookName": "Get-AzureVMTutorial", | ||
| "api-version": "2015-10-31" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": {}, | ||
| "body": { | ||
| "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 | ||
| } | ||
| } | ||
| } | ||
| } |
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.
Heads up, I believe that will make this a breaking change inside of an API Version marked stable.
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.
Hi @marstr - The SDK hasn't been released and we are correcting this parameter as this should be a method level parameter for the
NodeCountInformationcall.