From 2895d6433fd35f520d32f1a1a8f12de240fe4c6b Mon Sep 17 00:00:00 2001 From: Varad Meru Date: Thu, 19 Jul 2018 19:35:40 -0700 Subject: [PATCH] New SDK update for Automation --- .../Helpers/RunbookDefinition.cs | 6 + .../ScenarioTests/AutomationTests.cs | 15 +- .../CanCreateUpdateDeleteRunbook.json | 879 +++++++++++++----- .../TestSupport/AutomationTestBase.cs | 21 +- .../Generated/AutomationClient.cs | 18 +- .../Generated/IAutomationClient.cs | 15 +- .../Generated/IJobOperations.cs | 7 +- .../INodeCountInformationOperations.cs | 53 ++ .../Generated/IRunbookDraftOperations.cs | 11 +- .../Generated/IRunbookOperations.cs | 3 +- .../Generated/JobOperations.cs | 54 +- .../Generated/JobOperationsExtensions.cs | 23 +- .../Generated/Models/ActivityParameter.cs | 22 +- .../Models/ActivityParameterValidationSet.cs | 55 ++ .../Generated/Models/CountType.cs | 22 + .../Generated/Models/Module.cs | 11 +- .../Generated/Models/NodeCount.cs | 57 ++ .../Generated/Models/NodeCountProperties.cs | 48 + .../Generated/Models/NodeCounts.cs | 62 ++ .../NodeCountInformationOperations.cs | 264 ++++++ ...odeCountInformationOperationsExtensions.cs | 67 ++ .../Generated/RunbookDraftOperations.cs | 60 +- .../RunbookDraftOperationsExtensions.cs | 42 +- .../Generated/RunbookOperations.cs | 22 +- .../Generated/RunbookOperationsExtensions.cs | 12 +- .../Generated/ScheduleOperations.cs | 20 +- .../Generated/SdkInfo_AutomationClient.cs | 1 + ...crosoft.Azure.Management.Automation.csproj | 9 +- .../Properties/AssemblyInfo.cs | 2 +- .../Management.Automation/generate.ps1 | 2 +- .../_metadata/automation_resource-manager.txt | 23 +- 31 files changed, 1463 insertions(+), 443 deletions(-) create mode 100644 src/SDKs/Automation/Management.Automation/Generated/INodeCountInformationOperations.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameterValidationSet.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/Models/CountType.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/Models/NodeCount.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/Models/NodeCountProperties.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/Models/NodeCounts.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperations.cs create mode 100644 src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperationsExtensions.cs diff --git a/src/SDKs/Automation/Automation.Tests/Helpers/RunbookDefinition.cs b/src/SDKs/Automation/Automation.Tests/Helpers/RunbookDefinition.cs index 2c556f6cd16d9..af2e7be5b1e47 100644 --- a/src/SDKs/Automation/Automation.Tests/Helpers/RunbookDefinition.cs +++ b/src/SDKs/Automation/Automation.Tests/Helpers/RunbookDefinition.cs @@ -38,5 +38,11 @@ public RunbookDefinition(string runbookName, string psScript) get-date start-sleep -s 10 }"); + + public static RunbookDefinition TestPSScript = new RunbookDefinition( + "TestPSScript", @"get-date"); + + public static RunbookDefinition TestPSScriptV2 = new RunbookDefinition( + "TestPSScript", @"get-date; start-sleep -seconds 10"); } } \ No newline at end of file diff --git a/src/SDKs/Automation/Automation.Tests/ScenarioTests/AutomationTests.cs b/src/SDKs/Automation/Automation.Tests/ScenarioTests/AutomationTests.cs index 14816b686c06e..00c3e98a5b966 100644 --- a/src/SDKs/Automation/Automation.Tests/ScenarioTests/AutomationTests.cs +++ b/src/SDKs/Automation/Automation.Tests/ScenarioTests/AutomationTests.cs @@ -16,17 +16,17 @@ namespace Automation.Tests.ScenarioTests public class AutomationTest { - [Fact(Skip = "Waiting on webservice deployment")] + [Fact] public void CanCreateUpdateDeleteRunbook() { using (var context = MockContext.Start(GetType().FullName)) { using (var testFixture = new AutomationTestBase(context)) { - var runbookName = RunbookDefinition.TestFasterWorkflow.RunbookName; - var runbookContent = RunbookDefinition.TestFasterWorkflow.PsScript; + var runbookName = RunbookDefinition.TestPSScript.RunbookName; + var runbookContent = RunbookDefinition.TestPSScript.PsScript; - testFixture.CreateRunbook(runbookName, runbookContent); + testFixture.CreatePSScriptRunbook(runbookName, runbookContent); var runbook = testFixture.GetRunbook(runbookName); Assert.NotNull(runbook); @@ -44,10 +44,11 @@ public void CanCreateUpdateDeleteRunbook() Assert.False(runbook.LogVerbose); Assert.Equal(runbook.Description, updatedRunbook.Description); - var runbookContentV2 = RunbookDefinition.TestFasterWorkflowV2.PsScript; + var runbookContentV2 = RunbookDefinition.TestPSScriptV2.PsScript; testFixture.UpdateRunbookContent(runbookName, runbookContentV2); - string updatedContent = testFixture.GetRunbookContent(runbookName); - Assert.Equal(runbookContentV2, updatedContent); + var updatedContent = testFixture.GetRunbookContent(runbookName); + var reader = new StreamReader(updatedContent); + Assert.Equal(runbookContentV2, reader.ReadToEnd()); testFixture.DeleteRunbook(runbookName); diff --git a/src/SDKs/Automation/Automation.Tests/SessionRecords/Automation.Tests.ScenarioTests.AutomationTest/CanCreateUpdateDeleteRunbook.json b/src/SDKs/Automation/Automation.Tests/SessionRecords/Automation.Tests.ScenarioTests.AutomationTest/CanCreateUpdateDeleteRunbook.json index a5077947e8811..2e7b0a57ffb0c 100644 --- a/src/SDKs/Automation/Automation.Tests/SessionRecords/Automation.Tests.ScenarioTests.AutomationTest/CanCreateUpdateDeleteRunbook.json +++ b/src/SDKs/Automation/Automation.Tests/SessionRecords/Automation.Tests.ScenarioTests.AutomationTest/CanCreateUpdateDeleteRunbook.json @@ -13,7 +13,7 @@ "31" ], "x-ms-client-request-id": [ - "4a51a9e7-d1bb-410f-884c-4d2ae9061595" + "4d340402-b98e-40b3-9595-b51d36ac85cb" ], "accept-language": [ "en-US" @@ -25,9 +25,6 @@ }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test\",\r\n \"name\": \"automation-sdk-test\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { - "Content-Length": [ - "192" - ], "Content-Type": [ "application/json; charset=utf-8" ], @@ -38,28 +35,37 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:18 GMT" + "Fri, 20 Jul 2018 02:26:22 GMT" ], "Pragma": [ "no-cache" ], + "Transfer-Encoding": [ + "chunked" + ], + "Vary": [ + "Accept-Encoding" + ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-request-id": [ - "7d52f2d9-c0fe-45dc-b586-e5c8ca262741" + "53820b28-bbcb-4e9c-8c4a-2144350f9271" ], "x-ms-correlation-request-id": [ - "7d52f2d9-c0fe-45dc-b586-e5c8ca262741" + "53820b28-bbcb-4e9c-8c4a-2144350f9271" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072418Z:7d52f2d9-c0fe-45dc-b586-e5c8ca262741" + "CENTRALUS:20180720T022623Z:53820b28-bbcb-4e9c-8c4a-2144350f9271" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, - "StatusCode": 201 + "StatusCode": 200 }, { "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account?api-version=2015-10-31", @@ -74,21 +80,18 @@ "188" ], "x-ms-client-request-id": [ - "f7681712-9358-4f8c-a4bf-7a821beb3875" + "c9498f28-5bfe-49c2-99f2-b6ced39e6933" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"automation-sdk-test-account\",\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/f3c79a24-c485-4b85-af03-4a1a1addcd12\",\r\n \"creationTime\": \"2017-11-19T23:24:22.07-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:22.07-08:00\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"automation-sdk-test-account\",\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/9fe9d5e0-8938-45da-b446-0cb88a27d89e\",\r\n \"creationTime\": \"2018-07-13T15:03:56.71-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-07-19T19:26:23.96-07:00\"\r\n }\r\n}", "ResponseHeaders": { - "Content-Length": [ - "621" - ], "Content-Type": [ "application/json; charset=utf-8" ], @@ -99,25 +102,22 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:20 GMT" + "Fri, 20 Jul 2018 02:26:23 GMT" ], "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account?api-version=2015-10-31" + "Transfer-Encoding": [ + "chunked" ], "Server": [ "Microsoft-IIS/8.5" ], - "x-ms-request-id": [ - "f7681712-9358-4f8c-a4bf-7a821beb3875" - ], - "x-ms-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account?api-version=2015-10-31" + "Vary": [ + "Accept-Encoding" ], - "ocp-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account?api-version=2015-10-31" + "x-ms-request-id": [ + "c9498f28-5bfe-49c2-99f2-b6ced39e6933" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -132,13 +132,16 @@ "1198" ], "x-ms-correlation-request-id": [ - "019e9b60-3b2a-48a6-8c26-0eda1afd0d30" + "12c2e4e5-9de8-4383-9078-188acd2ed4e5" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072420Z:019e9b60-3b2a-48a6-8c26-0eda1afd0d30" + "CENTRALUS:20180720T022623Z:12c2e4e5-9de8-4383-9078-188acd2ed4e5" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, - "StatusCode": 201 + "StatusCode": 200 }, { "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/credentials?api-version=2015-10-31", @@ -147,14 +150,14 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "2733ca49-0270-49f2-aba2-890cfaae49bf" + "56c5fa86-6dd1-4424-a982-e550c70a12c1" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -169,7 +172,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:20 GMT" + "Fri, 20 Jul 2018 02:26:23 GMT" ], "Pragma": [ "no-cache" @@ -184,7 +187,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "2733ca49-0270-49f2-aba2-890cfaae49bf" + "56c5fa86-6dd1-4424-a982-e550c70a12c1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -196,13 +199,16 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14951" + "14999" ], "x-ms-correlation-request-id": [ - "fa686cf9-eee4-40c6-a0c8-2c7163fdc9b6" + "e70b6584-2e46-4507-98ad-48e9d03a1294" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072421Z:fa686cf9-eee4-40c6-a0c8-2c7163fdc9b6" + "CENTRALUS:20180720T022624Z:e70b6584-2e46-4507-98ad-48e9d03a1294" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 @@ -214,17 +220,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "4ec5d67f-9a99-40b3-ae5a-50c73ee37b53" + "8ab54cca-f01f-4080-a752-8eb06408ebdf" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"location\": \"East US 2\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"runbookType\": \"PowerShell\",\r\n \"state\": \"Edit\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true,\r\n \"logActivityTrace\": 0,\r\n \"creationTime\": \"2018-07-13T15:04:01.46-07:00\",\r\n \"lastModifiedTime\": \"2018-07-13T15:09:56.44-07:00\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -236,7 +242,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:20 GMT" + "Fri, 20 Jul 2018 02:26:23 GMT" ], "Pragma": [ "no-cache" @@ -251,7 +257,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "4ec5d67f-9a99-40b3-ae5a-50c73ee37b53" + "8ab54cca-f01f-4080-a752-8eb06408ebdf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -263,13 +269,144 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14950" + "14998" + ], + "x-ms-correlation-request-id": [ + "47c2e7ce-4eff-449f-a269-02c8ea019ac1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180720T022624Z:47c2e7ce-4eff-449f-a269-02c8ea019ac1" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "317cbcd8-bfd6-4a25-9030-ded50f1e2eb3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 20 Jul 2018 02:26:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "x-ms-request-id": [ + "317cbcd8-bfd6-4a25-9030-ded50f1e2eb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "04c0489f-007a-4e5c-b4e8-17977a8bbcb5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180720T022625Z:04c0489f-007a-4e5c-b4e8-17977a8bbcb5" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5c9579d9-64ca-466a-8556-4c9e4c3cf236" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 20 Jul 2018 02:27:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "x-ms-request-id": [ + "5c9579d9-64ca-466a-8556-4c9e4c3cf236" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" ], "x-ms-correlation-request-id": [ - "a2ce5053-eeea-4e1c-834b-904a259d333e" + "410f6638-eb8a-4c81-9615-83a5c1a5da2e" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072421Z:a2ce5053-eeea-4e1c-834b-904a259d333e" + "CENTRALUS:20180720T022730Z:410f6638-eb8a-4c81-9615-83a5c1a5da2e" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 @@ -281,14 +418,14 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "63de65cd-1527-426e-a023-61469c090262" + "c773f6c8-8b0c-4417-9903-d7a373d30ea1" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -303,7 +440,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:21 GMT" + "Fri, 20 Jul 2018 02:26:25 GMT" ], "Pragma": [ "no-cache" @@ -318,7 +455,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "63de65cd-1527-426e-a023-61469c090262" + "c773f6c8-8b0c-4417-9903-d7a373d30ea1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -330,13 +467,16 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14949" + "14997" ], "x-ms-correlation-request-id": [ - "54b0f490-9b98-48b4-920b-d345a59e44ae" + "f8b50c10-730e-4ef8-b132-bd1dd1eb153f" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072421Z:54b0f490-9b98-48b4-920b-d345a59e44ae" + "CENTRALUS:20180720T022625Z:f8b50c10-730e-4ef8-b132-bd1dd1eb153f" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 @@ -348,14 +488,14 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "38259353-12c2-41b3-aa05-eb1e255b743b" + "af835408-93ad-4bfd-8bd1-07c8f5cdeb09" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -370,7 +510,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:21 GMT" + "Fri, 20 Jul 2018 02:26:25 GMT" ], "Pragma": [ "no-cache" @@ -385,7 +525,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "38259353-12c2-41b3-aa05-eb1e255b743b" + "af835408-93ad-4bfd-8bd1-07c8f5cdeb09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -397,13 +537,16 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14948" + "14996" ], "x-ms-correlation-request-id": [ - "57d26437-32df-43f8-9874-053845177765" + "c2c2c0b1-9e39-4d57-8c2a-7b01b742e970" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072422Z:57d26437-32df-43f8-9874-053845177765" + "CENTRALUS:20180720T022625Z:c2c2c0b1-9e39-4d57-8c2a-7b01b742e970" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 @@ -415,14 +558,14 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "387426f2-484e-4f6d-a081-7f95a230968a" + "cee792bd-2484-4eaa-9c3b-583c712944d8" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -437,7 +580,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:22 GMT" + "Fri, 20 Jul 2018 02:26:26 GMT" ], "Pragma": [ "no-cache" @@ -452,53 +595,56 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "387426f2-484e-4f6d-a081-7f95a230968a" + "cee792bd-2484-4eaa-9c3b-583c712944d8" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14947" + "14995" ], "x-ms-correlation-request-id": [ - "71b18806-4905-48d1-93b4-ff49473c8c12" + "9e904442-796b-4a6e-bd8d-ad49153e4aa2" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072422Z:71b18806-4905-48d1-93b4-ff49473c8c12" + "CENTRALUS:20180720T022626Z:9e904442-796b-4a6e-bd8d-ad49153e4aa2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"draft\": {}\r\n },\r\n \"name\": \"TestFasterWorkflow\",\r\n \"location\": \"East US 2\"\r\n}", + "RequestBody": "{\r\n \"properties\": {\r\n \"runbookType\": \"PowerShell\",\r\n \"draft\": {\r\n \"creationTime\": \"0001-01-01T00:00:00-08:00\",\r\n \"lastModifiedTime\": \"0001-01-01T00:00:00-08:00\"\r\n }\r\n },\r\n \"name\": \"TestPSScript\",\r\n \"location\": \"East US 2\"\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "148" + "247" ], "x-ms-client-request-id": [ - "175ec748-e107-4652-9000-35b6dc555f44" + "84f2d7cd-f1b1-4598-9d2f-48de7fecafa9" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow\",\r\n \"name\": \"TestFasterWorkflow\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636467594652900000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"parameters\": {},\r\n \"state\": \"New\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2017-11-19T23:24:25.29-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:25.29-08:00\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636676503866470000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShell\",\r\n \"parameters\": {},\r\n \"state\": \"New\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2018-07-19T19:26:26.647-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-07-19T19:26:26.647-07:00\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "718" + "702" ], "Content-Type": [ "application/json; charset=utf-8" @@ -510,28 +656,28 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:23 GMT" + "Fri, 20 Jul 2018 02:26:26 GMT" ], "Pragma": [ "no-cache" ], "ETag": [ - "\"636467594652900000\"" + "\"636676503866470000\"" ], "Location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31" ], "Server": [ "Microsoft-IIS/8.5" ], "x-ms-request-id": [ - "175ec748-e107-4652-9000-35b6dc555f44" + "84f2d7cd-f1b1-4598-9d2f-48de7fecafa9" ], "x-ms-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31" ], "ocp-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -546,35 +692,38 @@ "1197" ], "x-ms-correlation-request-id": [ - "b4511a7f-90b9-451e-ae88-f71029090576" + "a3042df8-849e-41e2-bf2e-bb12f9c1538b" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072424Z:b4511a7f-90b9-451e-ae88-f71029090576" + "CENTRALUS:20180720T022626Z:a3042df8-849e-41e2-bf2e-bb12f9c1538b" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", "RequestMethod": "PUT", - "RequestBody": "Workflow TestFasterWorkflow {\r\n get-date\r\n }", + "RequestBody": "get-date", "RequestHeaders": { "Content-Type": [ - "application/json; charset=utf-8" + "text/powershell" ], "Content-Length": [ - "70" + "8" ], "x-ms-client-request-id": [ - "ab131ca9-4866-4316-9000-d3d86927b176" + "fab2887f-6607-4cf8-affb-d20c924a6a64" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "", @@ -589,13 +738,13 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:24 GMT" + "Fri, 20 Jul 2018 02:26:27 GMT" ], "Pragma": [ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/b801df97-e4ae-4e6e-9fbb-0e226644c1e3?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991?api-version=2015-10-31" ], "Retry-After": [ "30" @@ -604,17 +753,17 @@ "Microsoft-IIS/8.5" ], "ocp-automation-operationresultid": [ - "b801df97-e4ae-4e6e-9fbb-0e226644c1e3", - "b801df97-e4ae-4e6e-9fbb-0e226644c1e3" + "a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991", + "a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991" ], "x-ms-request-id": [ - "ab131ca9-4866-4316-9000-d3d86927b176" + "fab2887f-6607-4cf8-affb-d20c924a6a64" ], "x-ms-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/b801df97-e4ae-4e6e-9fbb-0e226644c1e3?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991?api-version=2015-10-31" ], "ocp-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/b801df97-e4ae-4e6e-9fbb-0e226644c1e3?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991?api-version=2015-10-31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -629,35 +778,38 @@ "1196" ], "x-ms-correlation-request-id": [ - "98ea8b07-ec79-4683-bf97-febd0b966091" + "67f89119-c9e0-431b-a71f-2c4e80cd426b" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072424Z:98ea8b07-ec79-4683-bf97-febd0b966091" + "CENTRALUS:20180720T022627Z:67f89119-c9e0-431b-a71f-2c4e80cd426b" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", "RequestMethod": "PUT", - "RequestBody": "Workflow TestFasterWorkflow {\r\n get-date\r\n start-sleep -s 10\r\n }", + "RequestBody": "get-date; start-sleep -seconds 10", "RequestHeaders": { "Content-Type": [ - "application/json; charset=utf-8" + "text/powershell" ], "Content-Length": [ - "105" + "33" ], "x-ms-client-request-id": [ - "6ede357a-7d2a-4fc2-b74e-82537ff45359" + "8a46dcab-f710-4207-8343-a48edefb4647" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "", @@ -672,13 +824,13 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:25 GMT" + "Fri, 20 Jul 2018 02:26:58 GMT" ], "Pragma": [ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/4b18d86d-470e-43db-a251-b3b3ccc1e761?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/6104cb1e-8b1e-49cb-942a-469ec82bc5d0?api-version=2015-10-31" ], "Retry-After": [ "30" @@ -687,17 +839,17 @@ "Microsoft-IIS/8.5" ], "ocp-automation-operationresultid": [ - "4b18d86d-470e-43db-a251-b3b3ccc1e761", - "4b18d86d-470e-43db-a251-b3b3ccc1e761" + "6104cb1e-8b1e-49cb-942a-469ec82bc5d0", + "6104cb1e-8b1e-49cb-942a-469ec82bc5d0" ], "x-ms-request-id": [ - "6ede357a-7d2a-4fc2-b74e-82537ff45359" + "8a46dcab-f710-4207-8343-a48edefb4647" ], "x-ms-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/4b18d86d-470e-43db-a251-b3b3ccc1e761?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/6104cb1e-8b1e-49cb-942a-469ec82bc5d0?api-version=2015-10-31" ], "ocp-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content/operationResults/4b18d86d-470e-43db-a251-b3b3ccc1e761?api-version=2015-10-31" + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/6104cb1e-8b1e-49cb-942a-469ec82bc5d0?api-version=2015-10-31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -712,35 +864,93 @@ "1193" ], "x-ms-correlation-request-id": [ - "dae3524e-eb2f-4e04-8c8f-c71230ac25a2" + "475b100a-74f0-4da4-abac-ed0e837fef3a" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072425Z:dae3524e-eb2f-4e04-8c8f-c71230ac25a2" + "CENTRALUS:20180720T022659Z:475b100a-74f0-4da4-abac-ed0e837fef3a" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/a7d9a26c-97e1-4012-ba6e-f4ce0cdb0991?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQvb3BlcmF0aW9uUmVzdWx0cy9hN2Q5YTI2Yy05N2UxLTQwMTItYmE2ZS1mNGNlMGNkYjA5OTE/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-client-request-id": [ - "bffffd2d-5fa9-40a6-ab95-d602fcf34e07" + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" ], - "accept-language": [ - "en-US" + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 20 Jul 2018 02:26:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "x-ms-request-id": [ + "bf15da19-e70c-4842-b4c5-434cae037433" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" ], + "x-ms-correlation-request-id": [ + "d79ff208-dab3-4617-b72d-6a4043c404bd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180720T022657Z:d79ff208-dab3-4617-b72d-6a4043c404bd" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow\",\r\n \"name\": \"TestFasterWorkflow\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636467594652900000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"parameters\": {},\r\n \"state\": \"New\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2017-11-19T23:24:25.29-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:25.29-08:00\"\r\n }\r\n}", + "ResponseBody": "get-date", "ResponseHeaders": { "Content-Type": [ - "application/json; charset=utf-8" + "text/powershell" ], "Expires": [ "-1" @@ -749,7 +959,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:24 GMT" + "Fri, 20 Jul 2018 02:26:57 GMT" ], "Pragma": [ "no-cache" @@ -758,16 +968,20 @@ "chunked" ], "ETag": [ - "\"636467594652900000\"" + "\"636676503872730000\"" ], "Server": [ "Microsoft-IIS/8.5" ], "Vary": [ + "Accept-Encoding", "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], "x-ms-request-id": [ - "bffffd2d-5fa9-40a6-ab95-d602fcf34e07" + "44aad873-3944-4563-92b1-fce5cb12c3a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -778,39 +992,107 @@ "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ + "dcac8109-150b-4689-b964-dfba927d2425" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180720T022657Z:dcac8109-150b-4689-b964-dfba927d2425" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" + ] + }, + "ResponseBody": "get-date; start-sleep -seconds 10", + "ResponseHeaders": { + "Content-Type": [ + "text/powershell" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 20 Jul 2018 02:27:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"636676504190270000\"" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14946" + "14988" + ], + "x-ms-request-id": [ + "b34e5707-6d6c-40d2-83be-f4db60d45710" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" ], "x-ms-correlation-request-id": [ - "e712c5de-3255-41c1-af7b-9f6f1ad6d58d" + "dc6a485d-8b35-4762-b678-ccffda796f05" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072424Z:e712c5de-3255-41c1-af7b-9f6f1ad6d58d" + "CENTRALUS:20180720T022729Z:dc6a485d-8b35-4762-b678-ccffda796f05" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "c0c0b094-8356-4e33-acc8-03916eafc3fa" + "ad9408f7-3eb0-416f-b4f0-0c4877efd47e" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow\",\r\n \"name\": \"TestFasterWorkflow\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636467594665870000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2017-11-19T23:24:25.29-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:26.587-08:00\"\r\n }\r\n}", + "ResponseBody": "get-date; start-sleep -seconds 10", "ResponseHeaders": { "Content-Type": [ - "application/json; charset=utf-8" + "text/powershell" ], "Expires": [ "-1" @@ -819,7 +1101,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:24 GMT" + "Fri, 20 Jul 2018 02:27:28 GMT" ], "Pragma": [ "no-cache" @@ -828,16 +1110,20 @@ "chunked" ], "ETag": [ - "\"636467594665870000\"" + "\"636676504190270000\"" ], "Server": [ "Microsoft-IIS/8.5" ], "Vary": [ + "Accept-Encoding", "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], "x-ms-request-id": [ - "c0c0b094-8356-4e33-acc8-03916eafc3fa" + "ad9408f7-3eb0-416f-b4f0-0c4877efd47e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -848,36 +1134,36 @@ "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14945" - ], "x-ms-correlation-request-id": [ - "a438f9e3-200c-4bec-9c71-b5f19614da12" + "ee892b8a-2024-47a3-b2e0-02a43ed1b0d2" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072425Z:a438f9e3-200c-4bec-9c71-b5f19614da12" + "CENTRALUS:20180720T022729Z:ee892b8a-2024-47a3-b2e0-02a43ed1b0d2" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "2d2f1c99-2fde-4d39-9f04-96006bb962f6" + "b98cda6c-7e88-4331-ae22-7def7ec263df" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow\",\r\n \"name\": \"TestFasterWorkflow\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636467594671200000\\\"\",\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2017-11-19T23:24:25.29-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:27.12-08:00\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636676503866470000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShell\",\r\n \"parameters\": {},\r\n \"state\": \"New\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2018-07-19T19:26:26.647-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-07-19T19:26:26.647-07:00\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -889,7 +1175,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:25 GMT" + "Fri, 20 Jul 2018 02:26:57 GMT" ], "Pragma": [ "no-cache" @@ -898,7 +1184,7 @@ "chunked" ], "ETag": [ - "\"636467594671200000\"" + "\"636676503866470000\"" ], "Server": [ "Microsoft-IIS/8.5" @@ -907,7 +1193,7 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "2d2f1c99-2fde-4d39-9f04-96006bb962f6" + "b98cda6c-7e88-4331-ae22-7def7ec263df" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -919,39 +1205,39 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14944" + "14992" ], "x-ms-correlation-request-id": [ - "e6352c94-1966-44b5-8556-86dea2071fd3" + "ef5a37ec-daa0-4fae-9a2a-cde64da70de3" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072425Z:e6352c94-1966-44b5-8556-86dea2071fd3" + "CENTRALUS:20180720T022658Z:ef5a37ec-daa0-4fae-9a2a-cde64da70de3" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "6f2b24da-11b4-4b1e-9cb3-7e22267e1cc8" + "9525439e-ae25-4e28-ab21-f53dd3c350ca" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow' under resource group 'automation-sdk-test' was not found.\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636676504181500000\\\"\",\r\n \"properties\": {\r\n \"description\": null,\r\n \"logVerbose\": false,\r\n \"logProgress\": false,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShell\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2018-07-19T19:26:26.647-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-07-19T19:26:58.15-07:00\"\r\n }\r\n}", "ResponseHeaders": { - "Content-Length": [ - "218" - ], "Content-Type": [ "application/json; charset=utf-8" ], @@ -962,50 +1248,71 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:26 GMT" + "Fri, 20 Jul 2018 02:26:57 GMT" ], "Pragma": [ "no-cache" ], - "x-ms-failure-cause": [ - "gateway" + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"636676504181500000\"" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" ], "x-ms-request-id": [ - "121bd2ad-d802-436b-8215-518322113b42" + "9525439e-ae25-4e28-ab21-f53dd3c350ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" ], "x-ms-correlation-request-id": [ - "121bd2ad-d802-436b-8215-518322113b42" + "b06f04f4-3baa-4591-a93d-b462ab3176ff" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072427Z:121bd2ad-d802-436b-8215-518322113b42" + "CENTRALUS:20180720T022658Z:b06f04f4-3baa-4591-a93d-b462ab3176ff" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" + "X-Content-Type-Options": [ + "nosniff" ] }, - "StatusCode": 404 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/publish?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93L2RyYWZ0L3B1Ymxpc2g/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "POST", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "46be3997-afc9-4eef-ba5b-4176a4d54ef4" + "94b8e7fb-d6e7-4a7f-bca9-fe9b1a08a0da" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636676504187300000\\\"\",\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShell\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2018-07-19T19:26:26.647-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-07-19T19:26:58.73-07:00\"\r\n }\r\n}", "ResponseHeaders": { - "Content-Length": [ - "0" + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1014,32 +1321,25 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:24 GMT" + "Fri, 20 Jul 2018 02:26:58 GMT" ], "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/publish/operationResults/2b43236c-70b1-446f-9d6c-ac361dc3f599?api-version=2015-10-31" + "Transfer-Encoding": [ + "chunked" ], - "Retry-After": [ - "30" + "ETag": [ + "\"636676504187300000\"" ], "Server": [ "Microsoft-IIS/8.5" ], - "ocp-automation-operationresultid": [ - "2b43236c-70b1-446f-9d6c-ac361dc3f599", - "2b43236c-70b1-446f-9d6c-ac361dc3f599" + "Vary": [ + "Accept-Encoding" ], "x-ms-request-id": [ - "46be3997-afc9-4eef-ba5b-4176a4d54ef4" - ], - "x-ms-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/publish/operationResults/2b43236c-70b1-446f-9d6c-ac361dc3f599?api-version=2015-10-31" - ], - "ocp-location": [ - "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/publish/operationResults/2b43236c-70b1-446f-9d6c-ac361dc3f599?api-version=2015-10-31" + "94b8e7fb-d6e7-4a7f-bca9-fe9b1a08a0da" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1050,45 +1350,100 @@ "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" ], "x-ms-correlation-request-id": [ - "85644d4b-86c5-4e05-9bd8-c0cbbfe99fe1" + "58b67028-1065-4ff4-b59a-bd0ca46cc428" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072425Z:85644d4b-86c5-4e05-9bd8-c0cbbfe99fe1" + "CENTRALUS:20180720T022658Z:58b67028-1065-4ff4-b59a-bd0ca46cc428" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true\r\n },\r\n \"name\": \"TestFasterWorkflow\"\r\n}", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "7d5ebd6f-90f0-4564-b135-91b699a442ad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript' under resource group 'automation-sdk-test' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "212" + ], "Content-Type": [ "application/json; charset=utf-8" ], - "Content-Length": [ - "158" + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 20 Jul 2018 02:27:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "726f124b-7515-4c57-b5bf-dd1cb74973ae" + ], + "x-ms-correlation-request-id": [ + "726f124b-7515-4c57-b5bf-dd1cb74973ae" ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180720T022730Z:726f124b-7515-4c57-b5bf-dd1cb74973ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/publish?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L3B1Ymxpc2g/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { "x-ms-client-request-id": [ - "2d9f1c97-1a5e-437e-a33c-425af96c7995" + "ecf485de-89e9-404a-bfe0-47b57c55641c" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow\",\r\n \"name\": \"TestFasterWorkflow\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636467594671200000\\\"\",\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShellWorkflow\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2017-11-19T23:24:25.29-08:00\",\r\n \"lastModifiedBy\": \"\",\r\n \"lastModifiedTime\": \"2017-11-19T23:24:27.12-08:00\"\r\n }\r\n}", + "ResponseBody": "", "ResponseHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" + "Content-Length": [ + "0" ], "Expires": [ "-1" @@ -1097,25 +1452,32 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:25 GMT" + "Fri, 20 Jul 2018 02:26:57 GMT" ], "Pragma": [ "no-cache" ], - "Transfer-Encoding": [ - "chunked" + "Location": [ + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/publish/operationResults/15440eb0-3b9a-41d9-8e51-c20ea3ca9849?api-version=2015-10-31" ], - "ETag": [ - "\"636467594671200000\"" + "Retry-After": [ + "30" ], "Server": [ "Microsoft-IIS/8.5" ], - "Vary": [ - "Accept-Encoding" + "ocp-automation-operationresultid": [ + "15440eb0-3b9a-41d9-8e51-c20ea3ca9849", + "15440eb0-3b9a-41d9-8e51-c20ea3ca9849" ], "x-ms-request-id": [ - "2d9f1c97-1a5e-437e-a33c-425af96c7995" + "ecf485de-89e9-404a-bfe0-47b57c55641c" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/publish/operationResults/15440eb0-3b9a-41d9-8e51-c20ea3ca9849?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/publish/operationResults/15440eb0-3b9a-41d9-8e51-c20ea3ca9849?api-version=2015-10-31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1127,38 +1489,47 @@ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" + "1195" ], "x-ms-correlation-request-id": [ - "7fda79ea-bb77-4bb2-b75b-96b3e1446d7d" + "91e4c6d3-65f1-418e-80d3-28f9b292269f" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072425Z:7fda79ea-bb77-4bb2-b75b-96b3e1446d7d" + "CENTRALUS:20180720T022658Z:91e4c6d3-65f1-418e-80d3-28f9b292269f" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, - "StatusCode": 200 + "StatusCode": 202 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow/draft/content?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93L2RyYWZ0L2NvbnRlbnQ/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true\r\n },\r\n \"name\": \"TestPSScript\"\r\n}", "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "152" + ], "x-ms-client-request-id": [ - "506a28f2-461e-4c6d-bfe3-1f3b48ab998c" + "10c460d0-95cf-42f4-8e1d-e6fd1e8ce8ba" ], "accept-language": [ "en-US" ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, - "ResponseBody": "Workflow TestFasterWorkflow {\r\n get-date\r\n start-sleep -s 10\r\n }", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript\",\r\n \"name\": \"TestPSScript\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Runbooks\",\r\n \"location\": \"East US 2\",\r\n \"tags\": {},\r\n \"etag\": \"\\\"636676504187300000\\\"\",\r\n \"properties\": {\r\n \"description\": \"description of runbook\",\r\n \"logVerbose\": false,\r\n \"logProgress\": true,\r\n \"logActivityTrace\": 0,\r\n \"runbookType\": \"PowerShell\",\r\n \"parameters\": {},\r\n \"state\": \"Published\",\r\n \"jobCount\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceManagementTags\": null,\r\n \"outputTypes\": [],\r\n \"creationTime\": \"2018-07-19T19:26:26.647-07:00\",\r\n \"lastModifiedBy\": \"{scrubbed}\",\r\n \"lastModifiedTime\": \"2018-07-19T19:26:58.73-07:00\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ - "text/powershell" + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1167,7 +1538,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:25 GMT" + "Fri, 20 Jul 2018 02:26:57 GMT" ], "Pragma": [ "no-cache" @@ -1176,20 +1547,16 @@ "chunked" ], "ETag": [ - "\"636467594674300000\"" + "\"636676504187300000\"" ], "Server": [ "Microsoft-IIS/8.5" ], "Vary": [ - "Accept-Encoding", "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14943" - ], "x-ms-request-id": [ - "506a28f2-461e-4c6d-bfe3-1f3b48ab998c" + "10c460d0-95cf-42f4-8e1d-e6fd1e8ce8ba" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1200,30 +1567,30 @@ "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], "x-ms-correlation-request-id": [ - "d8450d89-d8b8-46cb-98e2-3acbf6bbc488" + "b64b2532-a72c-42cd-89b5-0b02a8369081" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072426Z:d8450d89-d8b8-46cb-98e2-3acbf6bbc488" + "CENTRALUS:20180720T022658Z:b64b2532-a72c-42cd-89b5-0b02a8369081" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestFasterWorkflow?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdEZhc3RlcldvcmtmbG93P2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", - "RequestMethod": "DELETE", + "RequestUri": "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/automation-sdk-test/providers/Microsoft.Automation/automationAccounts/automation-sdk-test-account/runbooks/TestPSScript/draft/content/operationResults/6104cb1e-8b1e-49cb-942a-469ec82bc5d0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjVlNDc0OGMtZjY5YS00NjdjLTg3NDktZTJmOWM4Y2QzZGIwL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24tc2RrLXRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWF0aW9uL2F1dG9tYXRpb25BY2NvdW50cy9hdXRvbWF0aW9uLXNkay10ZXN0LWFjY291bnQvcnVuYm9va3MvVGVzdFBTU2NyaXB0L2RyYWZ0L2NvbnRlbnQvb3BlcmF0aW9uUmVzdWx0cy82MTA0Y2IxZS04YjFlLTQ5Y2ItOTQyYS00NjllYzgyYmM1ZDA/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-client-request-id": [ - "80bbee3d-3d40-4c4c-8476-689d4eacec9f" - ], - "accept-language": [ - "en-US" - ], "User-Agent": [ "FxVersion/4.6.25211.01", - "Microsoft.Azure.Management.Automation.AutomationClient/3.0.0.0" + "Microsoft.Azure.Management.Automation.AutomationClient/3.1.0.0" ] }, "ResponseBody": "", @@ -1231,6 +1598,9 @@ "Content-Length": [ "0" ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], "Expires": [ "-1" ], @@ -1238,7 +1608,7 @@ "no-cache" ], "Date": [ - "Mon, 20 Nov 2017 07:24:26 GMT" + "Fri, 20 Jul 2018 02:27:28 GMT" ], "Pragma": [ "no-cache" @@ -1247,7 +1617,7 @@ "Microsoft-IIS/8.5" ], "x-ms-request-id": [ - "80bbee3d-3d40-4c4c-8476-689d4eacec9f" + "ecac8dbb-e30c-440f-98ee-4e2ee36beb8f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1258,14 +1628,17 @@ "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" ], "x-ms-correlation-request-id": [ - "a57fc981-8ef8-4875-b66b-779b6def73e0" + "37378042-e028-40da-a77b-a136a6474bd8" ], "x-ms-routing-request-id": [ - "WESTUS2:20171120T072427Z:a57fc981-8ef8-4875-b66b-779b6def73e0" + "CENTRALUS:20180720T022729Z:37378042-e028-40da-a77b-a136a6474bd8" + ], + "X-Content-Type-Options": [ + "nosniff" ] }, "StatusCode": 200 diff --git a/src/SDKs/Automation/Automation.Tests/TestSupport/AutomationTestBase.cs b/src/SDKs/Automation/Automation.Tests/TestSupport/AutomationTestBase.cs index c44cbef71c41a..fa37f1ad399c8 100644 --- a/src/SDKs/Automation/Automation.Tests/TestSupport/AutomationTestBase.cs +++ b/src/SDKs/Automation/Automation.Tests/TestSupport/AutomationTestBase.cs @@ -147,6 +147,21 @@ public void CreateRunbook(string runbookName, string runbookContent, string desc UpdateRunbookContent(runbookName, runbookContent); } + public void CreatePSScriptRunbook(string runbookName, string runbookContent, string description = null) + { + AutomationClient.Runbook.CreateOrUpdate(ResourceGroup, AutomationAccount, runbookName, + new RunbookCreateOrUpdateParameters + { + Name = runbookName, + Description = description, + Location = Location, + RunbookType = RunbookTypeEnum.PowerShell, + Draft = new RunbookDraft() + }); + + UpdateRunbookContent(runbookName, runbookContent); + } + public Schedule CreateHourlySchedule(string scheduleName, DateTimeOffset startTime, DateTimeOffset expiryTime, string description = null, byte hourInterval = 1) { @@ -228,12 +243,12 @@ public void UpdateRunbook(Runbook runbook) LogProgress = runbook.LogProgress, LogVerbose = runbook.LogVerbose }); - } + } public void UpdateRunbookContent(string runbookName, string runbookContent) { var byteArray = Encoding.ASCII.GetBytes(runbookContent); - AutomationClient.RunbookDraft.ReplaceContent(ResourceGroup, AutomationAccount, runbookName, byteArray.ToString()); + AutomationClient.RunbookDraft.ReplaceContent(ResourceGroup, AutomationAccount, runbookName, new MemoryStream(byteArray)); } public void PublishRunbook(string runbookName) @@ -264,7 +279,7 @@ public Runbook GetRunbook(string runbookName) return runbook; } - public string GetRunbookContent(string runbookName) + public Stream GetRunbookContent(string runbookName) { var runbookContentStream = AutomationClient.RunbookDraft.GetContent(ResourceGroup, AutomationAccount, runbookName); diff --git a/src/SDKs/Automation/Management.Automation/Generated/AutomationClient.cs b/src/SDKs/Automation/Management.Automation/Generated/AutomationClient.cs index 46bba4ac89f25..02a4e90a3d85e 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/AutomationClient.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/AutomationClient.cs @@ -53,6 +53,12 @@ public partial class AutomationClient : ServiceClient, IAutoma /// public string SubscriptionId { get; set; } + /// + /// The type of counts to retrieve. Possible values include: 'status', + /// 'nodeconfiguration' + /// + public string CountType1 { get; set; } + /// /// Gets or sets the preferred language for the response. /// @@ -190,6 +196,11 @@ public partial class AutomationClient : ServiceClient, IAutoma /// public virtual IWebhookOperations Webhook { get; private set; } + /// + /// Gets the IWatcherOperations. + /// + public virtual IWatcherOperations Watcher { get; private set; } + /// /// Gets the ISoftwareUpdateConfigurationsOperations. /// @@ -261,9 +272,9 @@ public partial class AutomationClient : ServiceClient, IAutoma public virtual IDscNodeConfigurationOperations DscNodeConfiguration { get; private set; } /// - /// Gets the IWatcherOperations. + /// Gets the INodeCountInformationOperations. /// - public virtual IWatcherOperations Watcher { get; private set; } + public virtual INodeCountInformationOperations NodeCountInformation { get; private set; } /// /// Initializes a new instance of the AutomationClient class. @@ -490,6 +501,7 @@ private void Initialize() Schedule = new ScheduleOperations(this); Variable = new VariableOperations(this); Webhook = new WebhookOperations(this); + Watcher = new WatcherOperations(this); SoftwareUpdateConfigurations = new SoftwareUpdateConfigurationsOperations(this); SoftwareUpdateConfigurationRuns = new SoftwareUpdateConfigurationRunsOperations(this); SoftwareUpdateConfigurationMachineRuns = new SoftwareUpdateConfigurationMachineRunsOperations(this); @@ -504,7 +516,7 @@ private void Initialize() DscCompilationJob = new DscCompilationJobOperations(this); DscCompilationJobStream = new DscCompilationJobStreamOperations(this); DscNodeConfiguration = new DscNodeConfigurationOperations(this); - Watcher = new WatcherOperations(this); + NodeCountInformation = new NodeCountInformationOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; diff --git a/src/SDKs/Automation/Management.Automation/Generated/IAutomationClient.cs b/src/SDKs/Automation/Management.Automation/Generated/IAutomationClient.cs index 7b364cc4ce183..6a41f39f74080 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/IAutomationClient.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/IAutomationClient.cs @@ -47,6 +47,12 @@ public partial interface IAutomationClient : System.IDisposable /// string SubscriptionId { get; set; } + /// + /// The type of counts to retrieve. Possible values include: 'status', + /// 'nodeconfiguration' + /// + string CountType1 { get; set; } + /// /// Gets or sets the preferred language for the response. /// @@ -185,6 +191,11 @@ public partial interface IAutomationClient : System.IDisposable /// IWebhookOperations Webhook { get; } + /// + /// Gets the IWatcherOperations. + /// + IWatcherOperations Watcher { get; } + /// /// Gets the ISoftwareUpdateConfigurationsOperations. /// @@ -256,9 +267,9 @@ public partial interface IAutomationClient : System.IDisposable IDscNodeConfigurationOperations DscNodeConfiguration { get; } /// - /// Gets the IWatcherOperations. + /// Gets the INodeCountInformationOperations. /// - IWatcherOperations Watcher { get; } + INodeCountInformationOperations NodeCountInformation { get; } } } diff --git a/src/SDKs/Automation/Management.Automation/Generated/IJobOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/IJobOperations.cs index 8fb8f2f8e80d0..fa6879ea92503 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/IJobOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/IJobOperations.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -55,7 +56,7 @@ public partial interface IJobOperations /// /// Thrown when a required parameter is null /// - Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook content of the job identified by job name. /// @@ -78,7 +79,7 @@ public partial interface IJobOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -87,7 +88,7 @@ public partial interface IJobOperations /// /// Thrown when a required parameter is null /// - Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Suspend the job identified by job name. /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/INodeCountInformationOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/INodeCountInformationOperations.cs new file mode 100644 index 0000000000000..96c0c5a3a5d6f --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/INodeCountInformationOperations.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NodeCountInformationOperations operations. + /// + public partial interface INodeCountInformationOperations + { + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/IRunbookDraftOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/IRunbookDraftOperations.cs index 68c6d25a53b9d..f73883861aa9c 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/IRunbookDraftOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/IRunbookDraftOperations.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -51,7 +52,7 @@ public partial interface IRunbookDraftOperations /// /// Thrown when a required parameter is null /// - Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Replaces the runbook draft content. /// @@ -66,7 +67,7 @@ public partial interface IRunbookDraftOperations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -83,7 +84,7 @@ public partial interface IRunbookDraftOperations /// /// Thrown when a required parameter is null /// - Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook draft identified by runbook name. /// @@ -183,7 +184,7 @@ public partial interface IRunbookDraftOperations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -200,7 +201,7 @@ public partial interface IRunbookDraftOperations /// /// Thrown when a required parameter is null /// - Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Publish runbook draft. /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/IRunbookOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/IRunbookOperations.cs index 0bc339a20f8a0..e54d662b825ff 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/IRunbookOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/IRunbookOperations.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -51,7 +52,7 @@ public partial interface IRunbookOperations /// /// Thrown when a required parameter is null /// - Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook identified by runbook name. /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/JobOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/JobOperations.cs index a404209ee3edf..4acac7a7fee91 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/JobOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/JobOperations.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -88,7 +89,7 @@ internal JobOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -207,7 +208,7 @@ internal JobOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -250,7 +251,7 @@ internal JobOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -260,20 +261,7 @@ internal JobOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -304,7 +292,7 @@ internal JobOperations(AutomationClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -319,7 +307,7 @@ internal JobOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -438,7 +426,7 @@ internal JobOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -448,14 +436,13 @@ internal JobOperations(AutomationClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -465,10 +452,6 @@ internal JobOperations(AutomationClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -481,7 +464,7 @@ internal JobOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -491,20 +474,7 @@ internal JobOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { diff --git a/src/SDKs/Automation/Management.Automation/Generated/JobOperationsExtensions.cs b/src/SDKs/Automation/Management.Automation/Generated/JobOperationsExtensions.cs index b334975effa6c..2c0f037b16e47 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/JobOperationsExtensions.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/JobOperationsExtensions.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest.Azure; using Microsoft.Rest.Azure.OData; using Models; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -41,7 +42,7 @@ public static partial class JobOperationsExtensions /// /// Identifies this specific client request. /// - public static string GetOutput(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) + public static Stream GetOutput(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) { return operations.GetOutputAsync(resourceGroupName, automationAccountName, jobName, clientRequestId).GetAwaiter().GetResult(); } @@ -68,12 +69,11 @@ public static partial class JobOperationsExtensions /// /// The cancellation token. /// - public static async Task GetOutputAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetOutputAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetOutputWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.GetOutputWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// @@ -95,7 +95,7 @@ public static partial class JobOperationsExtensions /// /// Identifies this specific client request. /// - public static string GetRunbookContent(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) + public static Stream GetRunbookContent(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) { return operations.GetRunbookContentAsync(resourceGroupName, automationAccountName, jobName, clientRequestId).GetAwaiter().GetResult(); } @@ -122,12 +122,11 @@ public static partial class JobOperationsExtensions /// /// The cancellation token. /// - public static async Task GetRunbookContentAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetRunbookContentAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetRunbookContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.GetRunbookContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameter.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameter.cs index 9c72c8737644e..d523ed46486f1 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameter.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameter.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.Automation.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -56,7 +58,11 @@ public ActivityParameter() /// remaining command-line arguments that are associated with this /// parameter in the form of an array. false if the cmdlet parameter /// does not accept all the remaining argument values. - public ActivityParameter(string name = default(string), string type = default(string), bool? isMandatory = default(bool?), bool? isDynamic = default(bool?), long? position = default(long?), bool? valueFromPipeline = default(bool?), bool? valueFromPipelineByPropertyName = default(bool?), bool? valueFromRemainingArguments = default(bool?)) + /// Gets or sets the description of the + /// activity parameter. + /// Gets or sets the validation set of + /// activity parameter. + public ActivityParameter(string name = default(string), string type = default(string), bool? isMandatory = default(bool?), bool? isDynamic = default(bool?), long? position = default(long?), bool? valueFromPipeline = default(bool?), bool? valueFromPipelineByPropertyName = default(bool?), bool? valueFromRemainingArguments = default(bool?), string description = default(string), IList validationSet = default(IList)) { Name = name; Type = type; @@ -66,6 +72,8 @@ public ActivityParameter() ValueFromPipeline = valueFromPipeline; ValueFromPipelineByPropertyName = valueFromPipelineByPropertyName; ValueFromRemainingArguments = valueFromRemainingArguments; + Description = description; + ValidationSet = validationSet; CustomInit(); } @@ -136,5 +144,17 @@ public ActivityParameter() [JsonProperty(PropertyName = "valueFromRemainingArguments")] public bool? ValueFromRemainingArguments { get; set; } + /// + /// Gets or sets the description of the activity parameter. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets the validation set of activity parameter. + /// + [JsonProperty(PropertyName = "validationSet")] + public IList ValidationSet { get; set; } + } } diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameterValidationSet.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameterValidationSet.cs new file mode 100644 index 0000000000000..c654c3b121f34 --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/ActivityParameterValidationSet.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definition of the activity parameter validation set. + /// + public partial class ActivityParameterValidationSet + { + /// + /// Initializes a new instance of the ActivityParameterValidationSet + /// class. + /// + public ActivityParameterValidationSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityParameterValidationSet + /// class. + /// + /// Gets or sets the name of the activity + /// parameter validation set member. + public ActivityParameterValidationSet(string memberValue = default(string)) + { + MemberValue = memberValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the activity parameter validation set + /// member. + /// + [JsonProperty(PropertyName = "memberValue")] + public string MemberValue { get; set; } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/CountType.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/CountType.cs new file mode 100644 index 0000000000000..618a695b2d4ec --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/CountType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + + /// + /// Defines values for CountType. + /// + public static class CountType + { + public const string Status = "status"; + public const string Nodeconfiguration = "nodeconfiguration"; + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/Module.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/Module.cs index 820b7e665d7aa..f098003da3fc7 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/Models/Module.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/Module.cs @@ -64,8 +64,10 @@ public Module() /// Gets or sets the last modified /// time. /// Gets or sets the description. + /// Gets or sets type of module, if its + /// composite or not. /// Gets or sets the etag of the resource. - public Module(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), bool? isGlobal = default(bool?), string version = default(string), long? sizeInBytes = default(long?), int? activityCount = default(int?), ModuleProvisioningState? provisioningState = default(ModuleProvisioningState?), ContentLink contentLink = default(ContentLink), ModuleErrorInfo error = default(ModuleErrorInfo), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string), string etag = default(string)) + public Module(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), bool? isGlobal = default(bool?), string version = default(string), long? sizeInBytes = default(long?), int? activityCount = default(int?), ModuleProvisioningState? provisioningState = default(ModuleProvisioningState?), ContentLink contentLink = default(ContentLink), ModuleErrorInfo error = default(ModuleErrorInfo), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string), bool? isComposite = default(bool?), string etag = default(string)) : base(id, name, type, tags, location) { IsGlobal = isGlobal; @@ -78,6 +80,7 @@ public Module() CreationTime = creationTime; LastModifiedTime = lastModifiedTime; Description = description; + IsComposite = isComposite; Etag = etag; CustomInit(); } @@ -153,6 +156,12 @@ public Module() [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } + /// + /// Gets or sets type of module, if its composite or not. + /// + [JsonProperty(PropertyName = "properties.isComposite")] + public bool? IsComposite { get; set; } + /// /// Gets or sets the etag of the resource. /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCount.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCount.cs new file mode 100644 index 0000000000000..71158b587d408 --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCount.cs @@ -0,0 +1,57 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Number of nodes based on the Filter + /// + public partial class NodeCount + { + /// + /// Initializes a new instance of the NodeCount class. + /// + public NodeCount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeCount class. + /// + /// Gets the name of a count type + public NodeCount(string name = default(string), NodeCountProperties properties = default(NodeCountProperties)) + { + Name = name; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of a count type + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties")] + public NodeCountProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCountProperties.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCountProperties.cs new file mode 100644 index 0000000000000..00044b0bd0aae --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCountProperties.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class NodeCountProperties + { + /// + /// Initializes a new instance of the NodeCountProperties class. + /// + public NodeCountProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeCountProperties class. + /// + /// Gets the count for the name + public NodeCountProperties(int? count = default(int?)) + { + Count = count; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the count for the name + /// + [JsonProperty(PropertyName = "count")] + public int? Count { get; set; } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCounts.cs b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCounts.cs new file mode 100644 index 0000000000000..2c5693f56b98e --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/Models/NodeCounts.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Gets the count of nodes by count type + /// + public partial class NodeCounts + { + /// + /// Initializes a new instance of the NodeCounts class. + /// + public NodeCounts() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeCounts class. + /// + /// Gets an array of counts + /// Gets the total number of records matching + /// countType criteria. + public NodeCounts(IList value = default(IList), int? totalCount = default(int?)) + { + Value = value; + TotalCount = totalCount; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets an array of counts + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets the total number of records matching countType criteria. + /// + [JsonProperty(PropertyName = "totalCount")] + public int? TotalCount { get; set; } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperations.cs new file mode 100644 index 0000000000000..9564158341510 --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperations.cs @@ -0,0 +1,264 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NodeCountInformationOperations operations. + /// + internal partial class NodeCountInformationOperations : IServiceOperations, INodeCountInformationOperations + { + /// + /// Initializes a new instance of the NodeCountInformationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal NodeCountInformationOperations(AutomationClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomationClient + /// + public AutomationClient Client { get; private set; } + + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (automationAccountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); + } + if (Client.CountType1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.CountType1"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2018-01-15"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("automationAccountName", automationAccountName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); + _url = _url.Replace("{countType}", System.Uri.EscapeDataString(Client.CountType1)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperationsExtensions.cs b/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperationsExtensions.cs new file mode 100644 index 0000000000000..5adccde459487 --- /dev/null +++ b/src/SDKs/Automation/Management.Automation/Generated/NodeCountInformationOperationsExtensions.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for NodeCountInformationOperations. + /// + public static partial class NodeCountInformationOperationsExtensions + { + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + public static NodeCounts Get(this INodeCountInformationOperations operations, string resourceGroupName, string automationAccountName) + { + return operations.GetAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult(); + } + + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this INodeCountInformationOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperations.cs index cfb2669db78e7..897cda2b95cbb 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperations.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -84,7 +85,7 @@ internal RunbookDraftOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -194,7 +195,7 @@ internal RunbookDraftOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -237,7 +238,7 @@ internal RunbookDraftOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -247,20 +248,7 @@ internal RunbookDraftOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { @@ -283,7 +271,7 @@ internal RunbookDraftOperations(AutomationClient client) /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -291,10 +279,10 @@ internal RunbookDraftOperations(AutomationClient client) /// /// The cancellation token. /// - public async Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -766,7 +754,7 @@ internal RunbookDraftOperations(AutomationClient client) /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// Headers that will be added to request. @@ -789,7 +777,7 @@ internal RunbookDraftOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -892,10 +880,13 @@ internal RunbookDraftOperations(AutomationClient client) // Serialize Request string _requestContent = null; - if(runbookContent != null) + if(runbookContent == null) + { + throw new System.ArgumentNullException("runbookContent"); + } + if (runbookContent != null && runbookContent != Stream.Null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(runbookContent, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content = new StreamContent(runbookContent); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("text/powershell"); } // Set Credentials @@ -910,7 +901,7 @@ internal RunbookDraftOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -948,7 +939,7 @@ internal RunbookDraftOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -958,20 +949,7 @@ internal RunbookDraftOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } try { diff --git a/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperationsExtensions.cs b/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperationsExtensions.cs index 70cc8a2d0b1b5..8fa037b18b4a1 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperationsExtensions.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/RunbookDraftOperationsExtensions.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -37,7 +38,7 @@ public static partial class RunbookDraftOperationsExtensions /// /// The runbook name. /// - public static string GetContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) + public static Stream GetContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { return operations.GetContentAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); } @@ -61,12 +62,11 @@ public static string GetContent(this IRunbookDraftOperations operations, string /// /// The cancellation token. /// - public static async Task GetContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// @@ -86,9 +86,9 @@ public static string GetContent(this IRunbookDraftOperations operations, string /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// - public static string ReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, string runbookContent) + public static Stream ReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) { return operations.ReplaceContentAsync(resourceGroupName, automationAccountName, runbookName, runbookContent).GetAwaiter().GetResult(); } @@ -110,17 +110,16 @@ public static string ReplaceContent(this IRunbookDraftOperations operations, str /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The cancellation token. /// - public static async Task ReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.ReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// @@ -284,9 +283,9 @@ public static RunbookDraftUndoEditResult UndoEdit(this IRunbookDraftOperations o /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// - public static string BeginReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, string runbookContent) + public static Stream BeginReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) { return operations.BeginReplaceContentAsync(resourceGroupName, automationAccountName, runbookName, runbookContent).GetAwaiter().GetResult(); } @@ -308,17 +307,16 @@ public static string BeginReplaceContent(this IRunbookDraftOperations operations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The cancellation token. /// - public static async Task BeginReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, string runbookContent, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/RunbookOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/RunbookOperations.cs index 25c1d171d240f..7f95d35a4c5f7 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/RunbookOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/RunbookOperations.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; + using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -84,7 +85,7 @@ internal RunbookOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -194,7 +195,7 @@ internal RunbookOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -237,7 +238,7 @@ internal RunbookOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -247,20 +248,7 @@ internal RunbookOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); } if (_shouldTrace) { diff --git a/src/SDKs/Automation/Management.Automation/Generated/RunbookOperationsExtensions.cs b/src/SDKs/Automation/Management.Automation/Generated/RunbookOperationsExtensions.cs index c04b08e6d1a4c..c9b08ba34700c 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/RunbookOperationsExtensions.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/RunbookOperationsExtensions.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.IO; using System.Threading; using System.Threading.Tasks; @@ -37,7 +38,7 @@ public static partial class RunbookOperationsExtensions /// /// The runbook name. /// - public static string GetContent(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName) + public static Stream GetContent(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { return operations.GetContentAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); } @@ -61,12 +62,11 @@ public static string GetContent(this IRunbookOperations operations, string resou /// /// The cancellation token. /// - public static async Task GetContentAsync(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetContentAsync(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false); + _result.Request.Dispose(); + return _result.Body; } /// diff --git a/src/SDKs/Automation/Management.Automation/Generated/ScheduleOperations.cs b/src/SDKs/Automation/Management.Automation/Generated/ScheduleOperations.cs index a997813e4ab9f..31761cf1744c8 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/ScheduleOperations.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/ScheduleOperations.cs @@ -220,7 +220,7 @@ internal ScheduleOperations(AutomationClient client) System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 409) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 409) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -275,6 +275,24 @@ internal ScheduleOperations(AutomationClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); diff --git a/src/SDKs/Automation/Management.Automation/Generated/SdkInfo_AutomationClient.cs b/src/SDKs/Automation/Management.Automation/Generated/SdkInfo_AutomationClient.cs index 90cd46ecb36bd..4aad1f6404bc6 100644 --- a/src/SDKs/Automation/Management.Automation/Generated/SdkInfo_AutomationClient.cs +++ b/src/SDKs/Automation/Management.Automation/Generated/SdkInfo_AutomationClient.cs @@ -39,6 +39,7 @@ public static IEnumerable> ApiInfo_AutomationClien new Tuple("Automation", "Keys", "2015-10-31"), new Tuple("Automation", "LinkedWorkspace", "2015-10-31"), new Tuple("Automation", "Module", "2015-10-31"), + new Tuple("Automation", "NodeCountInformation", "2018-01-15"), new Tuple("Automation", "NodeReports", "2018-01-15"), new Tuple("Automation", "ObjectDataTypes", "2015-10-31"), new Tuple("Automation", "Operations", "2015-10-31"), diff --git a/src/SDKs/Automation/Management.Automation/Microsoft.Azure.Management.Automation.csproj b/src/SDKs/Automation/Management.Automation/Microsoft.Azure.Management.Automation.csproj index 8b807c089225b..0a88b10c2da61 100644 --- a/src/SDKs/Automation/Management.Automation/Microsoft.Azure.Management.Automation.csproj +++ b/src/SDKs/Automation/Management.Automation/Microsoft.Azure.Management.Automation.csproj @@ -6,12 +6,17 @@ Microsoft.Azure.Management.Automation Provides Microsoft Azure Automation management operations including the ability to create, update and delete runbooks and schedules. - 3.1.0-preview + 3.2.0-preview Microsoft Azure Automation Management Library Microsoft.Azure.Management.Automation Automation;Runbook; - Minor Bug Fixes and adding new resource: Watchers + + diff --git a/src/SDKs/Automation/Management.Automation/Properties/AssemblyInfo.cs b/src/SDKs/Automation/Management.Automation/Properties/AssemblyInfo.cs index 4af2346580ab0..4389f3e3f2163 100644 --- a/src/SDKs/Automation/Management.Automation/Properties/AssemblyInfo.cs +++ b/src/SDKs/Automation/Management.Automation/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyDescription("Provides Microsoft Azure Automation management operations including the ability to create, update and delete runbooks and schedules.")] [assembly: AssemblyVersion("3.0.1.0")] -[assembly: AssemblyFileVersion("3.1.0.0")] +[assembly: AssemblyFileVersion("3.2.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] diff --git a/src/SDKs/Automation/Management.Automation/generate.ps1 b/src/SDKs/Automation/Management.Automation/generate.ps1 index cfbc784bc6cc4..29d6ccb8156ff 100644 --- a/src/SDKs/Automation/Management.Automation/generate.ps1 +++ b/src/SDKs/Automation/Management.Automation/generate.ps1 @@ -1 +1 @@ -Start-AutoRestCodeGeneration -ResourceProvider "automation/resource-manager" -AutoRestVersion "latest" -SdkRootDirectory "$PSScriptRoot" \ No newline at end of file +Start-AutoRestCodeGeneration -ResourceProvider "automation/resource-manager" -AutoRestVersion "latest" \ No newline at end of file diff --git a/src/SDKs/_metadata/automation_resource-manager.txt b/src/SDKs/_metadata/automation_resource-manager.txt index 4c08a9b5df620..49c2938e5b80b 100644 --- a/src/SDKs/_metadata/automation_resource-manager.txt +++ b/src/SDKs/_metadata/automation_resource-manager.txt @@ -1,33 +1,18 @@ Installing AutoRest version: latest - -> autorest@2.0.4280 preinstall C:\Program Files\nodejs\node_modules\autorest -> node ./preinstall-check - -C:\Program Files\nodejs\autorest -> C:\Program Files\nodejs\node_modules\autorest\dist\app.js -+ autorest@2.0.4280 -updated 1 package in 4.571s - AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\azure\sdk\src\SDKs\Automation\Management.Automation -AutoRest code generation utility [version: 2.0.4280; node: v8.9.1] -(C) 2018 Microsoft Corporation. -https://aka.ms/autorest - Loading AutoRest core 'C:\Users\vameru\.autorest\@microsoft.azure_autorest-core@2.0.4280\node_modules\@microsoft.azure\autorest-core\dist' (2.0.4280) - Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.2.51->2.2.51) - Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.43->2.3.43) - -2018-06-26 00:10:27 UTC +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\azure\sdk\src\SDKs +2018-07-20 02:32:04 UTC 1) azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 5a702f17ac0989db40df4b42186cfbe4a0996bbd +Commit: ad8ff141e1b55aa5578567ed625d3a2a70bff1ae 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Program Files\nodejs `-- autorest@2.0.4280 +Bootstrapper version: autorest@2.0.4280 Latest installed version: