Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

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
khughes66 committed Jun 28, 2018
commit 8346c06b8341210cf0a3101b16f4739e059f5ba3
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
"x-ms-enum": {
"name": "CountType",
"modelAsString": true
}
},
"x-ms-parameter-location": "method"
Copy link
Member

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.

Copy link
Member

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 NodeCountInformation call.

}
}
}
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.\"}"
}
}
}
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.\"}"
}
}
}
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
}
}
}
}
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": {}
}
}
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"
}
}
}
}
}
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 }"
}
}
}
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": []
}
}
}
}
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 }"
}
}
}
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
}
}
}
}
Loading