diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj index d75d01e7ab62..f8ede125ed8c 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj @@ -155,6 +155,9 @@ + + PreserveNewest + PreserveNewest @@ -167,6 +170,7 @@ Always + @@ -181,6 +185,7 @@ + @@ -377,25 +382,25 @@ Always - + Always - + Always - + Always - + Always - + Always - + Always - + Always diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.cs index dbb178819adb..4d36ad820cec 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.cs @@ -20,39 +20,11 @@ namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests { public class RecommendedElasticPoolTests : SqlTestsBase { - [Fact(Skip="Test needs to be regenerated. Will be done by recommendations team.")] - [Trait(Category.Sql, Category.CheckIn)] - public void TestRecommendedElasticPoolList() - { - RunPowerShellTest("Test-ListRecommendedElasticPools"); - } - - [Fact] - [Trait(Category.Sql, Category.CheckIn)] - public void TestRecommendedElasticPoolGet() - { - RunPowerShellTest("Test-GetRecommendedElasticPool"); - } - - [Fact] - [Trait(Category.Sql, Category.CheckIn)] - public void TestRecommendedElasticPoolListDatabase() - { - RunPowerShellTest("Test-ListRecommendedElasticPoolDatabases"); - } - - [Fact] - [Trait(Category.Sql, Category.CheckIn)] - public void TestRecommendedElasticPoolGetDatabase() - { - RunPowerShellTest("Test-GetRecommendedElasticPoolDatabase"); - } - [Fact] [Trait(Category.Sql, Category.CheckIn)] - public void TestRecommendedElasticPoolGetMetrics() + public void ListRecommendedElasticPools() { - RunPowerShellTest("Test-GetRecommendedElasticPoolMetrics"); + RunPowerShellTest("Test-ElasticPoolRecommendation"); } } } diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.ps1 b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.ps1 index 617ef9b13978..a66b22f8c345 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.ps1 +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/RecommendedElasticPoolTests.ps1 @@ -16,140 +16,18 @@ .SYNOPSIS Tests listing all recommended elastic pools for server #> -function Test-ListRecommendedElasticPools +function Test-ElasticPoolRecommendation { - # Setup - $rg = Create-ResourceGroupForTest - $server = Create-ServerForTest $rg "Japan East" - - try - { - $response = Get-AzureSqlElasticPoolRecommendation -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName - Assert-NotNull $response - Assert-AreEqual 2 $response.Count - - Assert-AreEqual "ElasticPool1" $response[0].RecommendedElasticPoolName - Assert-AreEqual "Standard" $response[0].DatabaseEdition - Assert-AreEqual 1000 $response[0].Dtu - Assert-AreEqual 100.6 $response[0].DatabaseDtuMin - Assert-AreEqual 200.5 $response[0].DatabaseDtuMax - Assert-AreEqual 1000.3 $response[0].StorageMB - Assert-AreEqual '11/01/2014 00:00:00' $response[0].ObservationPeriodStart - Assert-AreEqual '11/15/2014 00:00:00' $response[0].ObservationPeriodEnd - Assert-AreEqual 900.2 $response[0].MaxObservedDtu - Assert-AreEqual 350 $response[0].MaxObservedStorageMB - } - finally - { - Remove-ResourceGroupForTest $rg - } -} - -<# - .SYNOPSIS - Tests getting recommended elastic pool by name -#> -function Test-GetRecommendedElasticPool -{ - # Setup - $rg = Create-ResourceGroupForTest - $server = Create-ServerForTest $rg "Japan East" - - try - { - $response = Get-AzureSqlElasticPoolRecommendation -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ElasticPoolRecommendation "ElasticPool1" - Assert-NotNull $response - - Assert-AreEqual "ElasticPool1" $response.RecommendedElasticPoolName - Assert-AreEqual "Standard" $response.DatabaseEdition - Assert-AreEqual 1000 $response.Dtu - Assert-AreEqual 100.6 $response.DatabaseDtuMin - Assert-AreEqual 200.5 $response.DatabaseDtuMax - Assert-AreEqual 1000.3 $response.StorageMB - Assert-AreEqual '11/01/2014 00:00:00' $response.ObservationPeriodStart - Assert-AreEqual '11/15/2014 00:00:00' $response.ObservationPeriodEnd - Assert-AreEqual 900.2 $response.MaxObservedDtu - Assert-AreEqual 350 $response.MaxObservedStorageMB - } - finally - { - Remove-ResourceGroupForTest $rg - } -} - -<# - .SYNOPSIS - Tests listing all databases in recommended elastic pool -#> -function Test-ListRecommendedElasticPoolDatabases -{ - # Setup - $rg = Create-ResourceGroupForTest - $server = Create-ServerForTest $rg "Japan East" - - try - { - $response = Get-AzureSqlElasticPoolRecommendationDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ElasticPoolRecommendation "ElasticPool1" - Assert-NotNull $response - Assert-AreEqual 1 $response.Count - - Assert-AreEqual 'TestDb1' $response[0].DatabaseName - Assert-AreEqual '28acaef5-d228-4660-bb67-546ec8482496' $response[0].DatabaseId - Assert-AreEqual 'Online' $response[0].Status - } - finally - { - Remove-ResourceGroupForTest $rg - } -} - -<# - .SYNOPSIS - Tests getting database by name for specific recommended elastic pool -#> -function Test-GetRecommendedElasticPoolDatabase -{ - # Setup - $rg = Create-ResourceGroupForTest - $server = Create-ServerForTest $rg "Japan East" - - try - { - $response = Get-AzureSqlElasticPoolRecommendationDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ElasticPoolRecommendation "ElasticPool1" -DatabaseName "TestDb1" - Assert-NotNull $response - - Assert-AreEqual 'TestDb1' $response.DatabaseName - Assert-AreEqual '28acaef5-d228-4660-bb67-546ec8482496' $response.DatabaseId - Assert-AreEqual 'Online' $response.Status - } - finally - { - Remove-ResourceGroupForTest $rg - } -} - -<# - .SYNOPSIS - Tests listing metrics for specific recommended elastic pool -#> -function Test-GetRecommendedElasticPoolMetrics -{ - # Setup - $rg = Create-ResourceGroupForTest - $server = Create-ServerForTest $rg "Japan East" - - try - { - $response = Get-AzureSqlElasticPoolRecommendationMetrics -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -ElasticPoolRecommendation "ElasticPool1" - Assert-NotNull $response - Assert-AreEqual 3 $response.Count - - Assert-AreEqual '04/01/2015 00:00:00' $response[0].DateTime - Assert-AreEqual 100.5 $response[0].Dtu - Assert-AreEqual 15.4 $response[0].SizeGB - } - finally - { - Remove-ResourceGroupForTest $rg - } + $response = Get-AzureSqlElasticPoolRecommendation -ResourceGroupName TestRg -ServerName test-srv-v1 + Assert-NotNull $response + Assert-AreEqual 2 $response.Count + + Assert-AreEqual "ElasticPool2" $response[1].Name + Assert-AreEqual "Standard" $response[1].Edition + Assert-AreEqual 1000 $response[1].Dtu + Assert-AreEqual 100 $response[1].DatabaseDtuMin + Assert-AreEqual 200 $response[1].DatabaseDtuMax + Assert-AreEqual 0 $response[1].IncludeAllDatabases + Assert-AreEqual 1 $response[1].DatabaseCollection.Count + Assert-AreEqual master $response[1].DatabaseCollection[0] } \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.cs new file mode 100644 index 000000000000..23a8b965ff57 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ScenarioTest.SqlTests; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests +{ + public class ServiceTierAdvisorTests : SqlTestsBase + { + [Fact] + [Trait(Category.Sql, Category.CheckIn)] + public void GetUpgradeDatabaseHint() + { + RunPowerShellTest("Test-GetUpgradeDatabaseHint"); + } + + [Fact] + [Trait(Category.Sql, Category.CheckIn)] + public void GetUpgradeServerHint() + { + RunPowerShellTest("Test-GetUpgradeServerHint"); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.ps1 b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.ps1 new file mode 100644 index 000000000000..9d6b038d6df0 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServiceTierAdvisorTests.ps1 @@ -0,0 +1,69 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# + .SYNOPSIS + Tests getting database upgrade hints +#> +function Test-GetUpgradeDatabaseHint +{ + $response = Get-AzureSqlDatabaseUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Count + Assert-AreEqual test-db-v1 $response[0].Name + Assert-AreEqual Premium $response[0].TargetEdition + Assert-AreEqual P2 $response[0].TargetServiceLevelObjective + + $response = Get-AzureSqlDatabaseUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 -DatabaseName test-db-v1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Count + Assert-AreEqual test-db-v1 $response[0].Name + Assert-AreEqual Standard $response[0].TargetEdition + Assert-AreEqual S0 $response[0].TargetServiceLevelObjective + + $response = Get-AzureSqlDatabaseUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 -ExcludeElasticPoolCandidates 1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Count + Assert-AreEqual test-db-v1 $response[0].Name + Assert-AreEqual Premium $response[0].TargetEdition + Assert-AreEqual P2 $response[0].TargetServiceLevelObjective + + $response = Get-AzureSqlDatabaseUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 -DatabaseName test-db-v1 -ExcludeElasticPoolCandidates 1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Count + Assert-AreEqual test-db-v1 $response[0].Name + Assert-AreEqual Standard $response[0].TargetEdition + Assert-AreEqual S0 $response[0].TargetServiceLevelObjective +} + +<# + .SYNOPSIS + Tests getting server upgrade hint +#> +function Test-GetUpgradeServerHint +{ + $response = Get-AzureSqlServerUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Databases.Count + Assert-AreEqual test-db-v1 $response.Databases[0].Name + Assert-AreEqual Standard $response.Databases[0].TargetEdition + Assert-AreEqual S0 $response.Databases[0].TargetServiceLevelObjective + + $response = Get-AzureSqlServerUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 -ExcludeElasticPools 1 + Assert-NotNull $response + Assert-AreEqual 1 $response.Databases.Count + Assert-AreEqual test-db-v1 $response.Databases[0].Name + Assert-AreEqual Standard $response.Databases[0].TargetEdition + Assert-AreEqual S0 $response.Databases[0].TargetServiceLevelObjective +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/ListRecommendedElasticPools.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/ListRecommendedElasticPools.json new file mode 100644 index 000000000000..e26b755e4cf9 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/ListRecommendedElasticPools.json @@ -0,0 +1,62 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "9d751181-ac4e-4427-a1cc-a97a98a48e01" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/csm-sql-rg-1741\/providers\/Microsoft.Sql\/servers\/csm-sql-server-2182\/recommendedElasticPools\/ElasticPool1\",\r\n \"name\": \"ElasticPool1\",\r\n \"type\": \"Microsoft.Sql\/servers\/recommendedElasticPools\",\r\n \"properties\": {\r\n \"databaseEdition\": \"Standard\",\r\n \"dtu\": 1000.0,\r\n \"databaseDtuMin\": 100.6,\r\n \"databaseDtuMax\": 200.5,\r\n \"storageMB\": 1000.3,\r\n \"observationPeriodStart\": \"2014-11-01T00:00:00Z\",\r\n \"observationPeriodEnd\": \"2014-11-15T00:00:00Z\",\r\n \"maxObservedDtu\": 900.2,\r\n \"maxObservedStorageMB\": 350.0,\r\n \"databases\": [],\r\n \"metrics\": [\r\n {\r\n \"dateTime\": \"2015-04-01T00:00:00Z\",\r\n \"dtu\": 100.5,\r\n \"sizeGB\": 15.4\r\n },\r\n {\r\n \"dateTime\": \"2015-04-02T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n },\r\n {\r\n \"dateTime\": \"2015-04-03T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/csm-sql-rg-1741\/providers\/Microsoft.Sql\/servers\/csm-sql-server-2182\/recommendedElasticPools\/ElasticPool2\",\r\n \"name\": \"ElasticPool2\",\r\n \"type\": \"Microsoft.Sql\/servers\/recommendedElasticPools\",\r\n \"properties\": {\r\n \"databaseEdition\": \"Standard\",\r\n \"dtu\": 1000.0,\r\n \"databaseDtuMin\": 100.0,\r\n \"databaseDtuMax\": 200.0,\r\n \"storageMB\": 1000.0,\r\n \"observationPeriodStart\": \"2014-11-01T00:00:00Z\",\r\n \"observationPeriodEnd\": \"2014-11-15T00:00:00Z\",\r\n \"maxObservedDtu\": 450.0,\r\n \"maxObservedStorageMB\": 900.0,\r\n \"databases\": [\r\n {\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/csm-sql-rg-1741\/providers\/Microsoft.Sql\/servers\/csm-sql-server-2182\/databases\/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql\/servers\/databases\",\r\n \"location\": \"Southeast Asia\",\r\n \"properties\": {\r\n \"databaseId\": \"28acaef5-d228-4660-bb67-546ec8482496\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System2\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-04-17T08:36:48.237Z\",\r\n \"currentServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"createMode\": null,\r\n \"sourceDatabaseId\": null,\r\n \"defaultSecondaryLocation\": \"Japan East\",\r\n \"earliestRestoreDate\": null,\r\n \"restorePointInTime\": null,\r\n \"sourceDatabaseDeletionDate\": null,\r\n \"blobUriAndSasKey\": null,\r\n \"resourcePoolName\": null,\r\n \"kind\": \"v12.0,system\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9ed6ecd5-5716-4472-9b2a-f1f0c3d60010" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "f1483aeb-91f7-4c21-9660-3d6d25637839" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T104641Z:f1483aeb-91f7-4c21-9660-3d6d25637839" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:46:41 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "69d3b60e-9ed0-414d-abc2-02a54d09b7a8" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGet.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGet.json deleted file mode 100644 index ce7b10ad697a..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGet.json +++ /dev/null @@ -1,904 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk8390?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazgzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "102" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31998" - ], - "x-ms-request-id": [ - "b88b3fb1-4f9c-4511-9309-80acec47c0a2" - ], - "x-ms-correlation-request-id": [ - "b88b3fb1-4f9c-4511-9309-80acec47c0a2" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092545Z:b88b3fb1-4f9c-4511-9309-80acec47c0a2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:25:45 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk8390?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazgzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31994" - ], - "x-ms-request-id": [ - "fe5cd2ca-bfb5-4ddc-8afd-fa7fb7f6cbf4" - ], - "x-ms-correlation-request-id": [ - "fe5cd2ca-bfb5-4ddc-8afd-fa7fb7f6cbf4" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092624Z:fe5cd2ca-bfb5-4ddc-8afd-fa7fb7f6cbf4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:24 GMT" - ] - }, - "StatusCode": 204 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk8390?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazgzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "32" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390\",\r\n \"name\": \"onesdk8390\",\r\n \"location\": \"japaneast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "176" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "9208b6ad-e14e-46a0-9fe9-e0781adc8c6d" - ], - "x-ms-correlation-request-id": [ - "9208b6ad-e14e-46a0-9fe9-e0781adc8c6d" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092546Z:9208b6ad-e14e-46a0-9fe9-e0781adc8c6d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:25:45 GMT" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazgzOTAvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31997" - ], - "x-ms-request-id": [ - "c5692e4d-3749-44bb-989e-e177caab9913" - ], - "x-ms-correlation-request-id": [ - "c5692e4d-3749-44bb-989e-e177caab9913" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092546Z:c5692e4d-3749-44bb-989e-e177caab9913" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:25:46 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk8390/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazgzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "centralus:fb5e5cfd-be59-44ed-b2d2-39259732d3ea" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31979" - ], - "x-ms-correlation-request-id": [ - "c9c2a0f0-e8e7-451d-b978-1421e6fc8a5e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092613Z:c9c2a0f0-e8e7-451d-b978-1421e6fc8a5e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:12 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390/providers/Microsoft.Sql/servers/onesdk5373?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazgzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs1MzczP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "8fbcd860-44e4-4abb-99f8-62f99350b467" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "69" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "6a083288-af5b-45bf-973e-d03167a1dd20" - ], - "x-ms-correlation-request-id": [ - "6a083288-af5b-45bf-973e-d03167a1dd20" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092548Z:6a083288-af5b-45bf-973e-d03167a1dd20" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:25:47 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390/providers/Microsoft.Sql/servers/onesdk5373?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazgzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs1MzczP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\"\r\n },\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "178" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "36bf01d0-aa9c-425b-96ef-b99376c1f70a" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390/providers/Microsoft.Sql/servers/onesdk5373\",\r\n \"name\": \"onesdk5373\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk5373.sqltest-eg1.mscds.com\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "479" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "dac07bca-aaa7-493d-a602-1d8347cfa4a7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Preference-Applied": [ - "return-content" - ], - "DataServiceVersion": [ - "3.0;" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "df753940-cd0f-4725-b3a2-844cc2722245" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092623Z:df753940-cd0f-4725-b3a2-844cc2722245" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:23 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk8390/providers/Microsoft.Sql/servers/onesdk5373/recommendedElasticPools/ElasticPool1?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazgzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs1MzczL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzL0VsYXN0aWNQb29sMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "82b7891f-dd08-42e5-9e2b-b471aec14740" - ] - }, - "ResponseBody": "{\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/onesdk8390\/providers\/Microsoft.Sql\/servers\/onesdk5373\/recommendedElasticPools\/ElasticPool1\",\r\n \"name\": \"ElasticPool1\",\r\n \"type\": \"Microsoft.Sql\/servers\/recommendedElasticPools\",\r\n \"properties\": {\r\n \"databaseEdition\": \"Standard\",\r\n \"dtu\": 1000.0,\r\n \"databaseDtuMin\": 100.6,\r\n \"databaseDtuMax\": 200.5,\r\n \"storageMB\": 1000.3,\r\n \"observationPeriodStart\": \"2014-11-01T00:00:00Z\",\r\n \"observationPeriodEnd\": \"2014-11-15T00:00:00Z\",\r\n \"maxObservedDtu\": 900.2,\r\n \"maxObservedStorageMB\": 350.0,\r\n \"databases\": [],\r\n \"metrics\": [\r\n {\r\n \"dateTime\": \"2015-04-01T00:00:00Z\",\r\n \"dtu\": 100.5,\r\n \"sizeGB\": 15.4\r\n },\r\n {\r\n \"dateTime\": \"2015-04-02T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n },\r\n {\r\n \"dateTime\": \"2015-04-03T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n }\r\n ]\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "1300" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "b09567b3-f6ad-4a96-ba95-53ee1b8fd3e1" - ], - "x-ms-correlation-request-id": [ - "b09567b3-f6ad-4a96-ba95-53ee1b8fd3e1" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092624Z:b09567b3-f6ad-4a96-ba95-53ee1b8fd3e1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:24 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk8390?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazgzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "0938611b-0ef0-4c74-aeb6-69a012919876" - ], - "x-ms-correlation-request-id": [ - "0938611b-0ef0-4c74-aeb6-69a012919876" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092624Z:0938611b-0ef0-4c74-aeb6-69a012919876" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:24 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31993" - ], - "x-ms-request-id": [ - "307b4bed-c79d-4832-974e-09d131049bae" - ], - "x-ms-correlation-request-id": [ - "307b4bed-c79d-4832-974e-09d131049bae" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092624Z:307b4bed-c79d-4832-974e-09d131049bae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:24 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31992" - ], - "x-ms-request-id": [ - "5fd10759-3c87-45ec-955e-ef336275610a" - ], - "x-ms-correlation-request-id": [ - "5fd10759-3c87-45ec-955e-ef336275610a" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092639Z:5fd10759-3c87-45ec-955e-ef336275610a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:39 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31991" - ], - "x-ms-request-id": [ - "02282977-fa1f-493e-93c0-55601229376b" - ], - "x-ms-correlation-request-id": [ - "02282977-fa1f-493e-93c0-55601229376b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092655Z:02282977-fa1f-493e-93c0-55601229376b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:26:54 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31990" - ], - "x-ms-request-id": [ - "ed15f0f7-f70d-4ad1-a48d-dceb1b8e61d2" - ], - "x-ms-correlation-request-id": [ - "ed15f0f7-f70d-4ad1-a48d-dceb1b8e61d2" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092710Z:ed15f0f7-f70d-4ad1-a48d-dceb1b8e61d2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:27:09 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31989" - ], - "x-ms-request-id": [ - "786eb3a0-8f45-4216-ade8-2ce471cbd6ad" - ], - "x-ms-correlation-request-id": [ - "786eb3a0-8f45-4216-ade8-2ce471cbd6ad" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092725Z:786eb3a0-8f45-4216-ade8-2ce471cbd6ad" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:27:24 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31988" - ], - "x-ms-request-id": [ - "29108226-8ccc-4e0e-a9ba-c46960538293" - ], - "x-ms-correlation-request-id": [ - "29108226-8ccc-4e0e-a9ba-c46960538293" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092740Z:29108226-8ccc-4e0e-a9ba-c46960538293" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:27:39 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31987" - ], - "x-ms-request-id": [ - "6e2ac6b4-db5b-49d1-9bc7-7cc783c7bac1" - ], - "x-ms-correlation-request-id": [ - "6e2ac6b4-db5b-49d1-9bc7-7cc783c7bac1" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092755Z:6e2ac6b4-db5b-49d1-9bc7-7cc783c7bac1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:27:55 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs4MzkwLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczRNemt3TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31986" - ], - "x-ms-request-id": [ - "41647ba6-d837-4e78-bccc-f40426338245" - ], - "x-ms-correlation-request-id": [ - "41647ba6-d837-4e78-bccc-f40426338245" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092811Z:41647ba6-d837-4e78-bccc-f40426338245" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:28:10 GMT" - ] - }, - "StatusCode": 200 - } - ], - "Names": { - "Test-GetRecommendedElasticPool": [ - "onesdk8390", - "onesdk5373" - ] - }, - "Variables": { - "SubscriptionId": "d3bbdcc6-c566-461d-adb1-f8963b79b30e" - } -} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetDatabase.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetDatabase.json deleted file mode 100644 index e4af668b39ad..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetDatabase.json +++ /dev/null @@ -1,958 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk5346?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazUzNDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "102" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31976" - ], - "x-ms-request-id": [ - "ffc3efd9-6067-4728-a281-57289f200877" - ], - "x-ms-correlation-request-id": [ - "ffc3efd9-6067-4728-a281-57289f200877" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093457Z:ffc3efd9-6067-4728-a281-57289f200877" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:34:57 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk5346?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazUzNDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31972" - ], - "x-ms-request-id": [ - "62590874-ddb7-476f-a2e9-1853b5c59301" - ], - "x-ms-correlation-request-id": [ - "62590874-ddb7-476f-a2e9-1853b5c59301" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093536Z:62590874-ddb7-476f-a2e9-1853b5c59301" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:35 GMT" - ] - }, - "StatusCode": 204 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk5346?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazUzNDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "32" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346\",\r\n \"name\": \"onesdk5346\",\r\n \"location\": \"japaneast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "176" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" - ], - "x-ms-request-id": [ - "21f8cd2d-20f8-4807-900a-10bbc9667833" - ], - "x-ms-correlation-request-id": [ - "21f8cd2d-20f8-4807-900a-10bbc9667833" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093458Z:21f8cd2d-20f8-4807-900a-10bbc9667833" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:34:58 GMT" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazUzNDYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31975" - ], - "x-ms-request-id": [ - "0cbf2485-faa7-4e58-8fe7-9efd9bb846ab" - ], - "x-ms-correlation-request-id": [ - "0cbf2485-faa7-4e58-8fe7-9efd9bb846ab" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093458Z:0cbf2485-faa7-4e58-8fe7-9efd9bb846ab" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:34:58 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk5346/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazUzNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "centralus:a935214f-1fb3-48fd-bd45-2b65a25779be" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31959" - ], - "x-ms-correlation-request-id": [ - "4e0e04b3-a574-44fb-bfca-a3f306910ba5" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093433Z:4e0e04b3-a574-44fb-bfca-a3f306910ba5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:34:33 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346/providers/Microsoft.Sql/servers/onesdk6906?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazUzNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs2OTA2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "6d968d93-d92e-4c59-a270-56e7733fff4e" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "69" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "87295c61-1b9a-4122-b403-56e13d620aee" - ], - "x-ms-correlation-request-id": [ - "87295c61-1b9a-4122-b403-56e13d620aee" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093459Z:87295c61-1b9a-4122-b403-56e13d620aee" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:34:59 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346/providers/Microsoft.Sql/servers/onesdk6906?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazUzNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs2OTA2P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\"\r\n },\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "178" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "3fe0ca83-dfe9-49ef-9fbe-92ac6f27e2f0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346/providers/Microsoft.Sql/servers/onesdk6906\",\r\n \"name\": \"onesdk6906\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk6906.sqltest-eg1.mscds.com\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "479" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "62dece42-1f72-471a-919c-058e06847553" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Preference-Applied": [ - "return-content" - ], - "DataServiceVersion": [ - "3.0;" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" - ], - "x-ms-correlation-request-id": [ - "056fd459-2079-425b-b6c1-cd51d86c319c" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093536Z:056fd459-2079-425b-b6c1-cd51d86c319c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:35 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk5346/providers/Microsoft.Sql/servers/onesdk6906/recommendedElasticPools/ElasticPool1/databases/TestDb1?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazUzNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs2OTA2L3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzL0VsYXN0aWNQb29sMS9kYXRhYmFzZXMvVGVzdERiMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "ef7950e3-1c80-48d1-9b0a-926ca2d20879" - ] - }, - "ResponseBody": "{\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/csm-sql-rg-1741\/providers\/Microsoft.Sql\/servers\/csm-sql-server-2182\/databases\/TestDb1\",\r\n \"name\": \"TestDb1\",\r\n \"type\": \"Microsoft.Sql\/servers\/databases\",\r\n \"location\": \"Southeast Asia\",\r\n \"properties\": {\r\n \"databaseId\": \"28acaef5-d228-4660-bb67-546ec8482496\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System2\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-04-17T08:36:48.237Z\",\r\n \"currentServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"createMode\": null,\r\n \"sourceDatabaseId\": null,\r\n \"defaultSecondaryLocation\": \"Japan East\",\r\n \"earliestRestoreDate\": null,\r\n \"restorePointInTime\": null,\r\n \"sourceDatabaseDeletionDate\": null,\r\n \"blobUriAndSasKey\": null,\r\n \"resourcePoolName\": null,\r\n \"kind\": \"v12.0,system\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "164" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "9c0df7f6-8bbb-4695-9897-711794ff1db5" - ], - "x-ms-correlation-request-id": [ - "9c0df7f6-8bbb-4695-9897-711794ff1db5" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093536Z:9c0df7f6-8bbb-4695-9897-711794ff1db5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:35 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk5346?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazUzNDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" - ], - "x-ms-request-id": [ - "d3df9607-762d-4ddd-a134-ad21f469f44b" - ], - "x-ms-correlation-request-id": [ - "d3df9607-762d-4ddd-a134-ad21f469f44b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093537Z:d3df9607-762d-4ddd-a134-ad21f469f44b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:37 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31971" - ], - "x-ms-request-id": [ - "30e970dc-f4ac-4fd6-8edf-76709f2c9c31" - ], - "x-ms-correlation-request-id": [ - "30e970dc-f4ac-4fd6-8edf-76709f2c9c31" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093537Z:30e970dc-f4ac-4fd6-8edf-76709f2c9c31" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:37 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31970" - ], - "x-ms-request-id": [ - "604816d1-01f1-4849-9572-128ff0355653" - ], - "x-ms-correlation-request-id": [ - "604816d1-01f1-4849-9572-128ff0355653" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093552Z:604816d1-01f1-4849-9572-128ff0355653" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:35:51 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31969" - ], - "x-ms-request-id": [ - "c3e11138-2514-4656-b300-1ccee4b408ae" - ], - "x-ms-correlation-request-id": [ - "c3e11138-2514-4656-b300-1ccee4b408ae" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093607Z:c3e11138-2514-4656-b300-1ccee4b408ae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:36:06 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31968" - ], - "x-ms-request-id": [ - "d9ea6344-2b18-467c-88c1-3c36dbf3dbe2" - ], - "x-ms-correlation-request-id": [ - "d9ea6344-2b18-467c-88c1-3c36dbf3dbe2" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093622Z:d9ea6344-2b18-467c-88c1-3c36dbf3dbe2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:36:22 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31967" - ], - "x-ms-request-id": [ - "b01d0804-5a83-4e12-abd6-5f7e0c964eeb" - ], - "x-ms-correlation-request-id": [ - "b01d0804-5a83-4e12-abd6-5f7e0c964eeb" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093638Z:b01d0804-5a83-4e12-abd6-5f7e0c964eeb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:36:38 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31966" - ], - "x-ms-request-id": [ - "a386dfb8-1dec-4eca-9380-6674b729303a" - ], - "x-ms-correlation-request-id": [ - "a386dfb8-1dec-4eca-9380-6674b729303a" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093653Z:a386dfb8-1dec-4eca-9380-6674b729303a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:36:52 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31965" - ], - "x-ms-request-id": [ - "ca5e7fbb-6fd0-41e1-a93a-e75b8a36216a" - ], - "x-ms-correlation-request-id": [ - "ca5e7fbb-6fd0-41e1-a93a-e75b8a36216a" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093708Z:ca5e7fbb-6fd0-41e1-a93a-e75b8a36216a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:37:07 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31964" - ], - "x-ms-request-id": [ - "0b74c852-02af-48c9-9517-80f26e6b697b" - ], - "x-ms-correlation-request-id": [ - "0b74c852-02af-48c9-9517-80f26e6b697b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093723Z:0b74c852-02af-48c9-9517-80f26e6b697b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:37:23 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MzQ2LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNelEyTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31963" - ], - "x-ms-request-id": [ - "38410813-6a7b-4320-bccd-fa905bcaee3e" - ], - "x-ms-correlation-request-id": [ - "38410813-6a7b-4320-bccd-fa905bcaee3e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093738Z:38410813-6a7b-4320-bccd-fa905bcaee3e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:37:38 GMT" - ] - }, - "StatusCode": 200 - } - ], - "Names": { - "Test-GetRecommendedElasticPoolDatabase": [ - "onesdk5346", - "onesdk6906" - ] - }, - "Variables": { - "SubscriptionId": "d3bbdcc6-c566-461d-adb1-f8963b79b30e" - } -} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetMetrics.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetMetrics.json deleted file mode 100644 index 1a5be6f3f26c..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolGetMetrics.json +++ /dev/null @@ -1,904 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk3114?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxMTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "102" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31958" - ], - "x-ms-request-id": [ - "31983daf-d2c8-4110-92fc-7ede2a339e7f" - ], - "x-ms-correlation-request-id": [ - "31983daf-d2c8-4110-92fc-7ede2a339e7f" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093827Z:31983daf-d2c8-4110-92fc-7ede2a339e7f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:38:27 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk3114?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxMTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31954" - ], - "x-ms-request-id": [ - "45b93896-4119-46d3-b165-badf61b6a446" - ], - "x-ms-correlation-request-id": [ - "45b93896-4119-46d3-b165-badf61b6a446" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093913Z:45b93896-4119-46d3-b165-badf61b6a446" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:12 GMT" - ] - }, - "StatusCode": 204 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk3114?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxMTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "32" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114\",\r\n \"name\": \"onesdk3114\",\r\n \"location\": \"japaneast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "176" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1186" - ], - "x-ms-request-id": [ - "2c900813-e18e-4dda-94a3-d70ce678f340" - ], - "x-ms-correlation-request-id": [ - "2c900813-e18e-4dda-94a3-d70ce678f340" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093828Z:2c900813-e18e-4dda-94a3-d70ce678f340" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:38:27 GMT" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazMxMTQvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31957" - ], - "x-ms-request-id": [ - "47ade7f7-bd15-4099-8a06-28072889b2f0" - ], - "x-ms-correlation-request-id": [ - "47ade7f7-bd15-4099-8a06-28072889b2f0" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093828Z:47ade7f7-bd15-4099-8a06-28072889b2f0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:38:27 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk3114/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxMTQvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "centralus:2b34de48-a62d-4b99-8a57-71d9b4dd25c7" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31962" - ], - "x-ms-correlation-request-id": [ - "407561e9-cdbc-4259-927f-3221046f3182" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093855Z:407561e9-cdbc-4259-927f-3221046f3182" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:38:55 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114/providers/Microsoft.Sql/servers/onesdk9805?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazMxMTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5ODA1P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "c6484ad8-1027-491c-8905-43a5a1d56f49" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "69" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "ef238819-8778-42f1-b4f9-18d07c494fae" - ], - "x-ms-correlation-request-id": [ - "ef238819-8778-42f1-b4f9-18d07c494fae" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093829Z:ef238819-8778-42f1-b4f9-18d07c494fae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:38:29 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114/providers/Microsoft.Sql/servers/onesdk9805?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazMxMTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5ODA1P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\"\r\n },\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "178" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "61663f5b-2683-401a-8f75-b301d95494a6" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114/providers/Microsoft.Sql/servers/onesdk9805\",\r\n \"name\": \"onesdk9805\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk9805.sqltest-eg1.mscds.com\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "479" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "ed5cfc0e-cd7c-4e28-9b58-9587f1987df9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Preference-Applied": [ - "return-content" - ], - "DataServiceVersion": [ - "3.0;" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1185" - ], - "x-ms-correlation-request-id": [ - "b92f0e24-019a-4b52-8551-5a86227bdde6" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093912Z:b92f0e24-019a-4b52-8551-5a86227bdde6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:12 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk3114/providers/Microsoft.Sql/servers/onesdk9805/recommendedElasticPools/ElasticPool1/metrics?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazMxMTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5ODA1L3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzL0VsYXN0aWNQb29sMS9tZXRyaWNzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "bbf3e058-7849-490a-8f27-c99d412ee65d" - ] - }, - "ResponseBody": "{\r\n\"value\": [\r\n {\r\n \"dateTime\": \"2015-04-01T00:00:00Z\",\r\n \"dtu\": 100.5,\r\n \"sizeGB\": 15.4\r\n },\r\n {\r\n \"dateTime\": \"2015-04-02T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n },\r\n {\r\n \"dateTime\": \"2015-04-03T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "164" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "572d9658-c2c4-4886-890d-2b203f21ce7e" - ], - "x-ms-correlation-request-id": [ - "572d9658-c2c4-4886-890d-2b203f21ce7e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093912Z:572d9658-c2c4-4886-890d-2b203f21ce7e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:12 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk3114?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxMTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1184" - ], - "x-ms-request-id": [ - "17e69415-bbf5-4aeb-b292-817c8c204eea" - ], - "x-ms-correlation-request-id": [ - "17e69415-bbf5-4aeb-b292-817c8c204eea" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093913Z:17e69415-bbf5-4aeb-b292-817c8c204eea" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:13 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31953" - ], - "x-ms-request-id": [ - "fe6ae9c0-a0b3-4fef-bc26-b947a6fbf9f2" - ], - "x-ms-correlation-request-id": [ - "fe6ae9c0-a0b3-4fef-bc26-b947a6fbf9f2" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093913Z:fe6ae9c0-a0b3-4fef-bc26-b947a6fbf9f2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:13 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31952" - ], - "x-ms-request-id": [ - "80c74be3-e70f-4ee5-a9ae-2d2d5db3196a" - ], - "x-ms-correlation-request-id": [ - "80c74be3-e70f-4ee5-a9ae-2d2d5db3196a" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093928Z:80c74be3-e70f-4ee5-a9ae-2d2d5db3196a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:28 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31951" - ], - "x-ms-request-id": [ - "84e73ccf-2828-41ea-830d-9eb870979096" - ], - "x-ms-correlation-request-id": [ - "84e73ccf-2828-41ea-830d-9eb870979096" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093943Z:84e73ccf-2828-41ea-830d-9eb870979096" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:43 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31950" - ], - "x-ms-request-id": [ - "0c426a87-b36b-440e-a4e3-9bab45b808ae" - ], - "x-ms-correlation-request-id": [ - "0c426a87-b36b-440e-a4e3-9bab45b808ae" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093959Z:0c426a87-b36b-440e-a4e3-9bab45b808ae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:39:58 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31949" - ], - "x-ms-request-id": [ - "c5bb1d50-f3fd-4a2b-83e2-b1a289f48600" - ], - "x-ms-correlation-request-id": [ - "c5bb1d50-f3fd-4a2b-83e2-b1a289f48600" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T094014Z:c5bb1d50-f3fd-4a2b-83e2-b1a289f48600" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:40:13 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31948" - ], - "x-ms-request-id": [ - "82edd201-e3fa-4d83-920a-860a3a159965" - ], - "x-ms-correlation-request-id": [ - "82edd201-e3fa-4d83-920a-860a3a159965" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T094029Z:82edd201-e3fa-4d83-920a-860a3a159965" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:40:29 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31947" - ], - "x-ms-request-id": [ - "c395c16e-9929-4c20-b362-5bd8bf29b344" - ], - "x-ms-correlation-request-id": [ - "c395c16e-9929-4c20-b362-5bd8bf29b344" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T094044Z:c395c16e-9929-4c20-b362-5bd8bf29b344" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:40:44 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszMTE0LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pNVEUwTFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31946" - ], - "x-ms-request-id": [ - "ef698a09-295e-4c07-9d96-c596151b6ba0" - ], - "x-ms-correlation-request-id": [ - "ef698a09-295e-4c07-9d96-c596151b6ba0" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T094059Z:ef698a09-295e-4c07-9d96-c596151b6ba0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:40:59 GMT" - ] - }, - "StatusCode": 200 - } - ], - "Names": { - "Test-GetRecommendedElasticPoolMetrics": [ - "onesdk3114", - "onesdk9805" - ] - }, - "Variables": { - "SubscriptionId": "d3bbdcc6-c566-461d-adb1-f8963b79b30e" - } -} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolList.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolList.json deleted file mode 100644 index 5d3ebc943aa8..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolList.json +++ /dev/null @@ -1,853 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk6499?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0OTk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "102" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31985" - ], - "x-ms-request-id": [ - "459f4604-1ad9-443c-b8dc-56df06781535" - ], - "x-ms-correlation-request-id": [ - "459f4604-1ad9-443c-b8dc-56df06781535" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095409Z:459f4604-1ad9-443c-b8dc-56df06781535" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:08 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk6499?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0OTk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31981" - ], - "x-ms-request-id": [ - "b390fb90-aeb2-4288-a98d-4885cb1d6e35" - ], - "x-ms-correlation-request-id": [ - "b390fb90-aeb2-4288-a98d-4885cb1d6e35" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095451Z:b390fb90-aeb2-4288-a98d-4885cb1d6e35" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:50 GMT" - ] - }, - "StatusCode": 204 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk6499?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0OTk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "32" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499\",\r\n \"name\": \"onesdk6499\",\r\n \"location\": \"japaneast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "176" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" - ], - "x-ms-request-id": [ - "f6431507-b1d9-4cc5-8ceb-07751cfd2833" - ], - "x-ms-correlation-request-id": [ - "f6431507-b1d9-4cc5-8ceb-07751cfd2833" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095409Z:f6431507-b1d9-4cc5-8ceb-07751cfd2833" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:09 GMT" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazY0OTkvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31984" - ], - "x-ms-request-id": [ - "f9ae91c9-5a10-4eff-bc5f-67e752f7c620" - ], - "x-ms-correlation-request-id": [ - "f9ae91c9-5a10-4eff-bc5f-67e752f7c620" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095410Z:f9ae91c9-5a10-4eff-bc5f-67e752f7c620" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:09 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk6499/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0OTkvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "centralus:2abad871-13c1-4344-bcb1-8adde1470033" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31988" - ], - "x-ms-correlation-request-id": [ - "6ede1074-fec4-4568-97c0-7b628744d925" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095411Z:6ede1074-fec4-4568-97c0-7b628744d925" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:10 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499/providers/Microsoft.Sql/servers/onesdk8838?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazY0OTkvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODM4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "cf9f674e-e635-4387-9300-a3eb12c90276" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "69" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "aa256d1d-b5dc-401f-aedb-d8f278c1ac21" - ], - "x-ms-correlation-request-id": [ - "aa256d1d-b5dc-401f-aedb-d8f278c1ac21" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095411Z:aa256d1d-b5dc-401f-aedb-d8f278c1ac21" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:11 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499/providers/Microsoft.Sql/servers/onesdk8838?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazY0OTkvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODM4P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\"\r\n },\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "178" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "fc61364e-1b08-4736-84b5-aaffbed98784" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499/providers/Microsoft.Sql/servers/onesdk8838\",\r\n \"name\": \"onesdk8838\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8838.sqltest-eg1.mscds.com\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "479" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "badba61e-403c-459c-a962-958081d085f1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Preference-Applied": [ - "return-content" - ], - "DataServiceVersion": [ - "3.0;" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" - ], - "x-ms-correlation-request-id": [ - "265cab3d-f537-409f-bdfa-e949f4370581" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095448Z:265cab3d-f537-409f-bdfa-e949f4370581" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:48 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk6499/providers/Microsoft.Sql/servers/onesdk8838/recommendedElasticPools?api-version=2014-04-01&$expand=databases,metrics", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazY0OTkvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODM4L3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXMsbWV0cmljcw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "6966606c-b023-4e42-9898-15823c0540bb" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/csm-sql-rg-1741/providers/Microsoft.Sql/servers/csm-sql-server-2182/recommendedElasticPools/ElasticPool1\",\r\n \"name\": \"ElasticPool1\",\r\n \"type\": \"Microsoft.Sql/servers/recommendedElasticPools\",\r\n \"properties\": {\r\n \"databaseEdition\": \"Standard\",\r\n \"dtu\": 1000.0,\r\n \"databaseDtuMin\": 100.6,\r\n \"databaseDtuMax\": 200.5,\r\n \"storageMB\": 1000.3,\r\n \"observationPeriodStart\": \"2014-11-01T00:00:00Z\",\r\n \"observationPeriodEnd\": \"2014-11-15T00:00:00Z\",\r\n \"maxObservedDtu\": 900.2,\r\n \"maxObservedStorageMB\": 350.0,\r\n \"databases\": [],\r\n \"metrics\": [\r\n {\r\n \"dateTime\": \"2015-04-01T00:00:00Z\",\r\n \"dtu\": 100.5,\r\n \"sizeGB\": 15.4\r\n },\r\n {\r\n \"dateTime\": \"2015-04-02T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n },\r\n {\r\n \"dateTime\": \"2015-04-03T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/csm-sql-rg-1741/providers/Microsoft.Sql/servers/csm-sql-server-2182/recommendedElasticPools/ElasticPool2\",\r\n \"name\": \"ElasticPool2\",\r\n \"type\": \"Microsoft.Sql/servers/recommendedElasticPools\",\r\n \"properties\": {\r\n \"databaseEdition\": \"Standard\",\r\n \"dtu\": 1000.0,\r\n \"databaseDtuMin\": 100.0,\r\n \"databaseDtuMax\": 200.0,\r\n \"storageMB\": 1000.0,\r\n \"observationPeriodStart\": \"2014-11-01T00:00:00Z\",\r\n \"observationPeriodEnd\": \"2014-11-15T00:00:00Z\",\r\n \"maxObservedDtu\": 450.0,\r\n \"maxObservedStorageMB\": 900.0,\r\n \"databases\": [\r\n {\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/csm-sql-rg-1741/providers/Microsoft.Sql/servers/csm-sql-server-2182/databases/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Southeast Asia\",\r\n \"properties\": {\r\n \"databaseId\": \"28acaef5-d228-4660-bb67-546ec8482496\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System2\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-04-17T08:36:48.237Z\",\r\n \"currentServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"createMode\": null,\r\n \"sourceDatabaseId\": null,\r\n \"defaultSecondaryLocation\": \"Japan East\",\r\n \"earliestRestoreDate\": null,\r\n \"restorePointInTime\": null,\r\n \"sourceDatabaseDeletionDate\": null,\r\n \"blobUriAndSasKey\": null,\r\n \"resourcePoolName\": null,\r\n \"kind\": \"v12.0,system\"\r\n }\r\n }\r\n ],\r\n \"metrics\": [\r\n {\r\n \"dateTime\": \"2015-04-01T00:00:00Z\",\r\n \"dtu\": 100.5,\r\n \"sizeGB\": 15.4\r\n },\r\n {\r\n \"dateTime\": \"2015-04-02T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n },\r\n {\r\n \"dateTime\": \"2015-04-03T00:00:00Z\",\r\n \"dtu\": 135.0,\r\n \"sizeGB\": 12.754\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "7e2521e0-df17-46fd-9dfc-cab566acb2e4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0;" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31982" - ], - "x-ms-correlation-request-id": [ - "1c17bae4-ef5d-437b-81f5-f1469ab89cd0" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095450Z:1c17bae4-ef5d-437b-81f5-f1469ab89cd0" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:50 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk6499?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0OTk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" - ], - "x-ms-request-id": [ - "437e8664-69c3-4f9e-b856-a5b9639446b6" - ], - "x-ms-correlation-request-id": [ - "437e8664-69c3-4f9e-b856-a5b9639446b6" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095451Z:437e8664-69c3-4f9e-b856-a5b9639446b6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:50 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31980" - ], - "x-ms-request-id": [ - "944046ec-1d63-4ca7-9f4c-88614ae683b9" - ], - "x-ms-correlation-request-id": [ - "944046ec-1d63-4ca7-9f4c-88614ae683b9" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095451Z:944046ec-1d63-4ca7-9f4c-88614ae683b9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:54:51 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31990" - ], - "x-ms-request-id": [ - "7370210d-f4cf-4c35-9f42-d349a298a2a3" - ], - "x-ms-correlation-request-id": [ - "7370210d-f4cf-4c35-9f42-d349a298a2a3" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095506Z:7370210d-f4cf-4c35-9f42-d349a298a2a3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:55:06 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31989" - ], - "x-ms-request-id": [ - "b764627f-a531-4e04-83ac-f8317d1b6a0f" - ], - "x-ms-correlation-request-id": [ - "b764627f-a531-4e04-83ac-f8317d1b6a0f" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095522Z:b764627f-a531-4e04-83ac-f8317d1b6a0f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:55:22 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31988" - ], - "x-ms-request-id": [ - "605ca81d-121f-4de5-8972-4c0f78610f8d" - ], - "x-ms-correlation-request-id": [ - "605ca81d-121f-4de5-8972-4c0f78610f8d" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095537Z:605ca81d-121f-4de5-8972-4c0f78610f8d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:55:37 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31987" - ], - "x-ms-request-id": [ - "3cea94f7-31eb-42c8-a7cc-1333473f6f54" - ], - "x-ms-correlation-request-id": [ - "3cea94f7-31eb-42c8-a7cc-1333473f6f54" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095553Z:3cea94f7-31eb-42c8-a7cc-1333473f6f54" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:55:52 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31986" - ], - "x-ms-request-id": [ - "5e9be552-486e-4f3d-8e43-d86c027acbb8" - ], - "x-ms-correlation-request-id": [ - "5e9be552-486e-4f3d-8e43-d86c027acbb8" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095608Z:5e9be552-486e-4f3d-8e43-d86c027acbb8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:56:07 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NDk5LUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJORGs1TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31985" - ], - "x-ms-request-id": [ - "efd79f05-3954-4864-8d94-2b220efffa6e" - ], - "x-ms-correlation-request-id": [ - "efd79f05-3954-4864-8d94-2b220efffa6e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150423T095623Z:efd79f05-3954-4864-8d94-2b220efffa6e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 23 Apr 2015 09:56:22 GMT" - ] - }, - "StatusCode": 200 - } - ], - "Names": { - "Test-ListRecommendedElasticPools": [ - "onesdk6499", - "onesdk8838" - ] - }, - "Variables": { - "SubscriptionId": "d3bbdcc6-c566-461d-adb1-f8963b79b30e" - } -} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolListDatabase.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolListDatabase.json deleted file mode 100644 index 73a82d9e7d9e..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.RecommendedElasticPoolTests/TestRecommendedElasticPoolListDatabase.json +++ /dev/null @@ -1,904 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk7102?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "102" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31985" - ], - "x-ms-request-id": [ - "865c29b3-b5b3-4904-b5e3-c207d3e48d2e" - ], - "x-ms-correlation-request-id": [ - "865c29b3-b5b3-4904-b5e3-c207d3e48d2e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092842Z:865c29b3-b5b3-4904-b5e3-c207d3e48d2e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:28:41 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk7102?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "HEAD", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31981" - ], - "x-ms-request-id": [ - "4181e74f-b0c3-4f50-b09b-d54ce5a3107b" - ], - "x-ms-correlation-request-id": [ - "4181e74f-b0c3-4f50-b09b-d54ce5a3107b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092920Z:4181e74f-b0c3-4f50-b09b-d54ce5a3107b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:20 GMT" - ] - }, - "StatusCode": 204 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk7102?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "32" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102\",\r\n \"name\": \"onesdk7102\",\r\n \"location\": \"japaneast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "176" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-request-id": [ - "3c6c4eb2-bc37-4050-b1e8-8e7c3bb61acf" - ], - "x-ms-correlation-request-id": [ - "3c6c4eb2-bc37-4050-b1e8-8e7c3bb61acf" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092842Z:3c6c4eb2-bc37-4050-b1e8-8e7c3bb61acf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:28:41 GMT" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDIvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31984" - ], - "x-ms-request-id": [ - "728a1d75-5669-40aa-a687-d85e3b56386e" - ], - "x-ms-correlation-request-id": [ - "728a1d75-5669-40aa-a687-d85e3b56386e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092842Z:728a1d75-5669-40aa-a687-d85e3b56386e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:28:42 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk7102/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "centralus:fca963fc-63f9-48d0-a122-aa68e0d8625a" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31978" - ], - "x-ms-correlation-request-id": [ - "76935de2-0499-4475-8128-b843f265252f" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092909Z:76935de2-0499-4475-8128-b843f265252f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:09 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102/providers/Microsoft.Sql/servers/onesdk2760?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGsyNzYwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "32856980-6f42-49c3-ab59-fc1fcc93466c" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "69" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "088fc5f9-84a1-46a5-b752-e33d71967771" - ], - "x-ms-correlation-request-id": [ - "088fc5f9-84a1-46a5-b752-e33d71967771" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092844Z:088fc5f9-84a1-46a5-b752-e33d71967771" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:28:44 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102/providers/Microsoft.Sql/servers/onesdk2760?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGsyNzYwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"version\": \"12.0\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\"\r\n },\r\n \"location\": \"Japan East\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "178" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "c5e4355e-529b-4709-9653-95c26600757e" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102/providers/Microsoft.Sql/servers/onesdk2760\",\r\n \"name\": \"onesdk2760\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Japan East\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk2760.sqltest-eg1.mscds.com\",\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"externalAdministratorLogin\": null,\r\n \"externalAdministratorSid\": null,\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "479" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" - ], - "x-ms-request-id": [ - "36e94111-4f2c-4212-af5f-e073c98bf57c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Preference-Applied": [ - "return-content" - ], - "DataServiceVersion": [ - "3.0;" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" - ], - "x-ms-correlation-request-id": [ - "38fac8ff-08a0-456b-8456-48a9f20feca7" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092920Z:38fac8ff-08a0-456b-8456-48a9f20feca7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:19 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourceGroups/onesdk7102/providers/Microsoft.Sql/servers/onesdk2760/recommendedElasticPools/ElasticPool1/databases?api-version=2014-04-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGsyNzYwL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzL0VsYXN0aWNQb29sMS9kYXRhYmFzZXM/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" - ], - "x-ms-client-request-id": [ - "19e5a9fd-6390-4a18-8097-84e830c46f8d" - ] - }, - "ResponseBody": "{\"value\": [\r\n {\r\n \"id\": \"\/subscriptions\/d3bbdcc6-c566-461d-adb1-f8963b79b30e\/resourceGroups\/csm-sql-rg-1741\/providers\/Microsoft.Sql\/servers\/csm-sql-server-2182\/databases\/TestDb1\",\r\n \"name\": \"TestDb1\",\r\n \"type\": \"Microsoft.Sql\/servers\/databases\",\r\n \"location\": \"Southeast Asia\",\r\n \"properties\": {\r\n \"databaseId\": \"28acaef5-d228-4660-bb67-546ec8482496\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System2\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-04-17T08:36:48.237Z\",\r\n \"currentServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveId\": \"620323bf-2879-4807-b30d-c2e6d7b3b3aa\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"createMode\": null,\r\n \"sourceDatabaseId\": null,\r\n \"defaultSecondaryLocation\": \"Japan East\",\r\n \"earliestRestoreDate\": null,\r\n \"restorePointInTime\": null,\r\n \"sourceDatabaseDeletionDate\": null,\r\n \"blobUriAndSasKey\": null,\r\n \"resourcePoolName\": null,\r\n \"kind\": \"v12.0,system\"\r\n }\r\n }\r\n ]}", - "ResponseHeaders": { - "Content-Length": [ - "164" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "89fc2601-57f4-431e-a667-542a964d1c70" - ], - "x-ms-correlation-request-id": [ - "89fc2601-57f4-431e-a667-542a964d1c70" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092920Z:89fc2601-57f4-431e-a667-542a964d1c70" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:20 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/resourcegroups/onesdk7102?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" - ], - "x-ms-request-id": [ - "c752cfa2-ea3b-4fdb-8749-c5cb2325a74c" - ], - "x-ms-correlation-request-id": [ - "c752cfa2-ea3b-4fdb-8749-c5cb2325a74c" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092920Z:c752cfa2-ea3b-4fdb-8749-c5cb2325a74c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:20 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31980" - ], - "x-ms-request-id": [ - "5536a883-6fc6-43f9-8840-b52144bed671" - ], - "x-ms-correlation-request-id": [ - "5536a883-6fc6-43f9-8840-b52144bed671" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092920Z:5536a883-6fc6-43f9-8840-b52144bed671" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:20 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31979" - ], - "x-ms-request-id": [ - "e1d387b9-efaa-41e1-9548-bee6a68d1a7c" - ], - "x-ms-correlation-request-id": [ - "e1d387b9-efaa-41e1-9548-bee6a68d1a7c" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092936Z:e1d387b9-efaa-41e1-9548-bee6a68d1a7c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:35 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31978" - ], - "x-ms-request-id": [ - "4be911a6-6672-4b3d-a172-f6b2c677d7f8" - ], - "x-ms-correlation-request-id": [ - "4be911a6-6672-4b3d-a172-f6b2c677d7f8" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T092951Z:4be911a6-6672-4b3d-a172-f6b2c677d7f8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:29:51 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31977" - ], - "x-ms-request-id": [ - "1e9765f6-d068-4b13-a34d-ef042ea5f685" - ], - "x-ms-correlation-request-id": [ - "1e9765f6-d068-4b13-a34d-ef042ea5f685" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093006Z:1e9765f6-d068-4b13-a34d-ef042ea5f685" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:30:06 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31976" - ], - "x-ms-request-id": [ - "97be7f52-f566-4e43-b27b-adeafb00ac3f" - ], - "x-ms-correlation-request-id": [ - "97be7f52-f566-4e43-b27b-adeafb00ac3f" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093021Z:97be7f52-f566-4e43-b27b-adeafb00ac3f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:30:21 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31975" - ], - "x-ms-request-id": [ - "773ff62f-cb0f-46ad-aef6-6b58610d4423" - ], - "x-ms-correlation-request-id": [ - "773ff62f-cb0f-46ad-aef6-6b58610d4423" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093036Z:773ff62f-cb0f-46ad-aef6-6b58610d4423" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:30:36 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31974" - ], - "x-ms-request-id": [ - "10b9c1e7-b87d-4052-a783-153d39cb490b" - ], - "x-ms-correlation-request-id": [ - "10b9c1e7-b87d-4052-a783-153d39cb490b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093052Z:10b9c1e7-b87d-4052-a783-153d39cb490b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:30:52 GMT" - ], - "Location": [ - "https://api-current.resources.windows-int.net/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/d3bbdcc6-c566-461d-adb1-f8963b79b30e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAyLUpBUEFORUFTVCIsImpvYkxvY2F0aW9uIjoiamFwYW5lYXN0In0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZDNiYmRjYzYtYzU2Ni00NjFkLWFkYjEtZjg5NjNiNzliMzBlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF5TFVwQlVFRk9SVUZUVkNJc0ltcHZZa3h2WTJGMGFXOXVJam9pYW1Gd1lXNWxZWE4wSW4wP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "31973" - ], - "x-ms-request-id": [ - "8d084497-fe45-40c7-8a44-cdde9c1b1e80" - ], - "x-ms-correlation-request-id": [ - "8d084497-fe45-40c7-8a44-cdde9c1b1e80" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20150424T093107Z:8d084497-fe45-40c7-8a44-cdde9c1b1e80" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 24 Apr 2015 09:31:07 GMT" - ] - }, - "StatusCode": 200 - } - ], - "Names": { - "Test-ListRecommendedElasticPoolDatabases": [ - "onesdk7102", - "onesdk2760" - ] - }, - "Variables": { - "SubscriptionId": "d3bbdcc6-c566-461d-adb1-f8963b79b30e" - } -} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeDatabaseHint.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeDatabaseHint.json new file mode 100644 index 000000000000..bb324330972a --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeDatabaseHint.json @@ -0,0 +1,332 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxJiRleHBhbmQ9dXBncmFkZUhpbnQ=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "6e13bdfa-e0ce-4ddc-89de-b9b7bd43b551" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"\/subscriptions\/69d3b60e-9ed0-414d-abc2-02a54d09b7a8\/resourceGroups\/TestRg\/providers\/Microsoft.Sql\/servers\/test-srv-v1\/databases\/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql\/servers\/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,system\",\r\n \"properties\": {\r\n \"databaseId\": \"09bff456-5a6b-4ca8-8b96-f8060b6ffe7c\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-05-25T16:11:14.163Z\",\r\n \"currentServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": null,\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"\/subscriptions\/69d3b60e-9ed0-414d-abc2-02a54d09b7a8\/resourceGroups\/TestRg\/providers\/Microsoft.Sql\/servers\/test-srv-v1\/databases\/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql\/servers\/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"P2\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1761" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "d7b666db-5849-4d4b-9f09-386986141a9c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "1d1a2159-1d4f-41e0-9fc7-b2ca26d56768" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105639Z:1d1a2159-1d4f-41e0-9fc7-b2ca26d56768" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:38 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxJiRleHBhbmQ9dXBncmFkZUhpbnQ=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "aae972c9-7789-43e9-b0d2-f519759fe7eb" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,system\",\r\n \"properties\": {\r\n \"databaseId\": \"09bff456-5a6b-4ca8-8b96-f8060b6ffe7c\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-05-25T16:11:14.163Z\",\r\n \"currentServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": null,\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"P2\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1761" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "70aba149-5479-4ce2-b51b-efd86b782fd1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "497db9d9-c2c5-4e0d-8ff9-eeae991b56d4" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105641Z:497db9d9-c2c5-4e0d-8ff9-eeae991b56d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:41 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcy90ZXN0LWRiLXYxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD11cGdyYWRlSGludA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "55274ee3-7310-4acc-ad4b-7d2c3bb14169" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "888" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "28c5e610-c373-4c33-8f0f-81a7bf794d75" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "4e17ff41-11eb-4471-a365-2f9c751394f0" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105640Z:4e17ff41-11eb-4471-a365-2f9c751394f0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:40 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcy90ZXN0LWRiLXYxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD11cGdyYWRlSGludA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "e4c244bd-d3d3-4b85-8c3e-04b314bd36ed" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "888" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "81b3572a-86a7-4823-ad66-eceb3736542f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "2749ca36-7e18-4471-974e-1439439a7a46" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105646Z:2749ca36-7e18-4471-974e-1439439a7a46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:45 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "ae31a0a0-5d8b-4394-b780-d4f7b8ce0da3" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "be1f495d-ffea-492a-88f6-80dee0ac8170" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "1417e311-c75f-4f32-b952-6e6b0a46e94f" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105643Z:1417e311-c75f-4f32-b952-6e6b0a46e94f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:43 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "8e291b35-f9e5-409b-8cd3-1551e1cbdb86" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2a49c5cb-bb82-4bc7-80cb-db3e00e8a94c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "71d7cea0-a5d7-41da-8842-1b3508c84648" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T105644Z:71d7cea0-a5d7-41da-8842-1b3508c84648" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 10:56:44 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "69d3b60e-9ed0-414d-abc2-02a54d09b7a8" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeServerHint.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeServerHint.json new file mode 100644 index 000000000000..01cb5a030fec --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServiceTierAdvisorTests/GetUpgradeServerHint.json @@ -0,0 +1,332 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxJiRleHBhbmQ9dXBncmFkZUhpbnQ=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "04d967ba-07ac-4edd-9da9-599a20bb6f80" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,system\",\r\n \"properties\": {\r\n \"databaseId\": \"09bff456-5a6b-4ca8-8b96-f8060b6ffe7c\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-05-25T16:11:14.163Z\",\r\n \"currentServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": null,\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1761" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "1122605a-50d3-4cc4-9ae6-a367108624d6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "bf8dea65-4327-46b9-9f74-767c571373a5" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120140Z:bf8dea65-4327-46b9-9f74-767c571373a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:39 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "af9deb06-ac3d-4761-9436-f5539b724982" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2b14639a-5a15-40be-983e-84fbce694874" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-correlation-request-id": [ + "cbd6cda6-858b-4c7f-a586-31adde6ade6f" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120142Z:cbd6cda6-858b-4c7f-a586-31adde6ade6f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:42 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "e995c041-f959-4692-a8f2-4b10f0fbf220" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "fd33c391-25c3-4a34-be1d-a95df36ffdfd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "b05ab28b-721a-4c1c-8e7a-c20afada0694" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120143Z:b05ab28b-721a-4c1c-8e7a-c20afada0694" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:43 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases?api-version=2014-04-01&$expand=upgradeHint", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL2RhdGFiYXNlcz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxJiRleHBhbmQ9dXBncmFkZUhpbnQ=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "04d967ba-07ac-4edd-9da9-599a20bb6f80" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/master\",\r\n \"name\": \"master\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,system\",\r\n \"properties\": {\r\n \"databaseId\": \"09bff456-5a6b-4ca8-8b96-f8060b6ffe7c\",\r\n \"edition\": \"System\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"System\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"5368709120\",\r\n \"creationDate\": \"2015-05-25T16:11:14.163Z\",\r\n \"currentServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveId\": \"26e021db-f1f9-4c98-84c6-92af8ef433d7\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": null,\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/databases/test-db-v1\",\r\n \"name\": \"test-db-v1\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"West US\",\r\n \"kind\": \"v2.0,user\",\r\n \"properties\": {\r\n \"databaseId\": \"ac247d16-ebd4-4fcb-a4c8-afbc5831615c\",\r\n \"edition\": \"Standard\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"S0\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"268435456000\",\r\n \"creationDate\": \"2015-05-25T16:12:15.787Z\",\r\n \"currentServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\",\r\n \"requestedServiceObjectiveName\": null,\r\n \"defaultSecondaryLocation\": \"North Central US\",\r\n \"earliestRestoreDate\": \"2015-05-25T16:13:15.787Z\",\r\n \"upgradeHint\": {\r\n \"targetServiceLevelObjective\": \"S0\",\r\n \"targetServiceLevelObjectiveId\": \"f1173c43-91bd-4aaa-973c-54e79e15235b\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1761" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "1122605a-50d3-4cc4-9ae6-a367108624d6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "bf8dea65-4327-46b9-9f74-767c571373a5" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120140Z:bf8dea65-4327-46b9-9f74-767c571373a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:39 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "af9deb06-ac3d-4761-9436-f5539b724982" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2b14639a-5a15-40be-983e-84fbce694874" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-correlation-request-id": [ + "cbd6cda6-858b-4c7f-a586-31adde6ade6f" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120142Z:cbd6cda6-858b-4c7f-a586-31adde6ade6f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:42 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/69d3b60e-9ed0-414d-abc2-02a54d09b7a8/resourceGroups/TestRg/providers/Microsoft.Sql/servers/test-srv-v1/recommendedElasticPools?api-version=2014-04-01&$expand=databases", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjlkM2I2MGUtOWVkMC00MTRkLWFiYzItMDJhNTRkMDliN2E4L3Jlc291cmNlR3JvdXBzL1Rlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3Rlc3Qtc3J2LXYxL3JlY29tbWVuZGVkRWxhc3RpY1Bvb2xzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEmJGV4cGFuZD1kYXRhYmFzZXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-request-id": [ + "e995c041-f959-4692-a8f2-4b10f0fbf220" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "fd33c391-25c3-4a34-be1d-a95df36ffdfd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "b05ab28b-721a-4c1c-8e7a-c20afada0694" + ], + "x-ms-routing-request-id": [ + "WESTEUROPE:20150526T120143Z:b05ab28b-721a-4c1c-8e7a-c20afada0694" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 26 May 2015 12:01:43 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { }, + "Variables": { + "SubscriptionId": "69d3b60e-9ed0-414d-abc2-02a54d09b7a8" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs new file mode 100644 index 000000000000..6148ec5dd6dc --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Sql.Database.Cmdlet; +using Microsoft.Azure.Commands.Sql.Server.Cmdlet; +using Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet; +using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet; +using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Sql.Test.UnitTests +{ + public class AzureSqlServiceTierAdvisorAttributeTests + { + [Fact] + [Trait(Category.Sql, Category.CheckIn)] + public void GetAzureSqlDatabaseUpgradeHintAttributes() + { + Type type = typeof(GetAzureSqlDatabaseUpgradeHint); + UnitTestHelper.CheckCmdletModifiesData(type, supportsShouldProcess: false); + UnitTestHelper.CheckConfirmImpact(type, System.Management.Automation.ConfirmImpact.None); + + UnitTestHelper.CheckCmdletParameterAttributes(type, "ServerName", isMandatory: true, valueFromPipelineByName: true); + UnitTestHelper.CheckCmdletParameterAttributes(type, "DatabaseName", isMandatory: false, valueFromPipelineByName: true); + UnitTestHelper.CheckCmdletParameterAttributes(type, "ExcludeElasticPoolCandidates", isMandatory: false, valueFromPipelineByName: true); + } + + [Fact] + [Trait(Category.Sql, Category.CheckIn)] + public void GetAzureSqlServerUpgradeHintAttributes() + { + Type type = typeof(GetAzureSqlServerUpgradeHint); + UnitTestHelper.CheckCmdletModifiesData(type, supportsShouldProcess: false); + UnitTestHelper.CheckConfirmImpact(type, System.Management.Automation.ConfirmImpact.None); + + UnitTestHelper.CheckCmdletParameterAttributes(type, "ServerName", isMandatory: true, valueFromPipelineByName: true); + UnitTestHelper.CheckCmdletParameterAttributes(type, "ExcludeElasticPools", isMandatory: false, valueFromPipelineByName: true); + } + + [Fact] + [Trait(Category.Sql, Category.CheckIn)] + public void GetAzureSqlDatabaseExpandedAttributes() + { + Type type = typeof(GetAzureSqlDatabaseExpanded); + UnitTestHelper.CheckCmdletModifiesData(type, supportsShouldProcess: false); + UnitTestHelper.CheckConfirmImpact(type, System.Management.Automation.ConfirmImpact.None); + + UnitTestHelper.CheckCmdletParameterAttributes(type, "ServerName", isMandatory: true, valueFromPipelineByName: true); + UnitTestHelper.CheckCmdletParameterAttributes(type, "DatabaseName", isMandatory: false, valueFromPipelineByName: true); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj index 3ecff0e59868..cce3e6b20020 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj +++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj @@ -56,6 +56,13 @@ + + + + + + + @@ -84,14 +91,9 @@ - - - - - - - - + + + diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs similarity index 54% rename from src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationDatabase.cs rename to src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs index 62b7430c56e6..1ba35814aa30 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs @@ -14,71 +14,65 @@ using System.Collections.Generic; using System.Management.Automation; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model; +using Microsoft.Azure.Commands.Sql.Database.Services; -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Cmdlet +namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureSqlElasticPoolRecommendationDatabase", + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseExpanded", ConfirmImpact = ConfirmImpact.None)] - public class GetAzureSqlElasticPoolRecommendationDatabase : AzureSqlElasticPoolRecommendationCmdletBase + public class GetAzureSqlDatabaseExpanded : AzureSqlCmdletBase, AzureSqlDatabaseAdapter> { /// - /// Gets or sets the name of the elastic pool recommendation to use. + /// Gets or sets the name of the database server to use. /// [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, - Position = 2, - HelpMessage = "The name of the Azure SQL elastic pool recommendation to retrieve.")] + Position = 1, + HelpMessage = "The name of the Azure SQL Database Server the database is in.")] [ValidateNotNullOrEmpty] - public string ElasticPoolRecommendation { get; set; } + public string ServerName { get; set; } /// - /// Gets or sets the name of the Database to get. + /// Gets or sets the name of the database to use. /// [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + Position = 2, HelpMessage = "The name of the Azure SQL Database to retrieve.")] [ValidateNotNullOrEmpty] public string DatabaseName { get; set; } + + /// + /// Initializes the adapter + /// + /// + /// + protected override AzureSqlDatabaseAdapter InitModelAdapter(Azure.Common.Authentication.Models.AzureSubscription subscription) + { + return new AzureSqlDatabaseAdapter(Profile, subscription); + } /// /// Get the entities from the service /// /// The list of entities - protected IEnumerable GetDatabase() + protected override IEnumerable GetEntity() { - ICollection results; + ICollection results; if(MyInvocation.BoundParameters.ContainsKey("DatabaseName")) { - results = new List(); - results.Add(ModelAdapter.GetElasticPoolRecommendationDatabase(ResourceGroupName, ServerName, ElasticPoolRecommendation, DatabaseName)); + results = new List(); + results.Add(ModelAdapter.GetDatabaseExpanded(this.ResourceGroupName, this.ServerName, this.DatabaseName)); } else { - results = ModelAdapter.ListElasticPoolRecommendationDatabases(this.ResourceGroupName, this.ServerName, this.ElasticPoolRecommendation); + results = ModelAdapter.ListDatabasesExpanded(this.ResourceGroupName, this.ServerName); } return results; } - - /// - /// Executes the cmdlet. - /// - public override void ExecuteCmdlet() - { - ModelAdapter = InitModelAdapter(Profile.Context.Subscription); - WriteObject(GetDatabase()); - } - - /// - /// Not Used. - /// - /// Not Used - protected override IEnumerable GetEntity() - { - return null; - } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModel.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModel.cs index 1459710a0d6b..ffbe48f47311 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModel.cs @@ -111,5 +111,48 @@ public class AzureSqlDatabaseModel /// Gets or sets the tags associated with the server. /// public Dictionary Tags { get; set; } + + /// + /// Construct AzureSqlDatabaseModel + /// + public AzureSqlDatabaseModel() + { + } + + /// + /// Construct AzureSqlDatabaseModel from Management.Sql.Models.Database object + /// + /// Resource group + /// Server name + /// Database object + public AzureSqlDatabaseModel(string resourceGroup, string serverName, Management.Sql.Models.Database database) + { + Guid id = Guid.Empty; + DatabaseEdition edition = DatabaseEdition.None; + + ResourceGroupName = resourceGroup; + ServerName = serverName; + CollationName = database.Properties.Collation; + CreationDate = database.Properties.CreationDate; + CurrentServiceObjectiveName = database.Properties.ServiceObjective; + MaxSizeBytes = database.Properties.MaxSizeBytes; + DatabaseName = database.Name; + Status = database.Properties.Status; + Tags = database.Tags as Dictionary; + ElasticPoolName = database.Properties.ElasticPoolName; + Location = database.Location; + + Guid.TryParse(database.Properties.CurrentServiceObjectiveId, out id); + CurrentServiceObjectiveId = id; + + Guid.TryParse(database.Properties.DatabaseId, out id); + DatabaseId = id; + + Enum.TryParse(database.Properties.Edition, true, out edition); + Edition = edition; + + Guid.TryParse(database.Properties.RequestedServiceObjectiveId, out id); + RequestedServiceObjectiveId = id; + } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs new file mode 100644 index 000000000000..a747015f1f8e --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Sql.Models; + +namespace Microsoft.Azure.Commands.Sql.Database.Model +{ + /// + /// Represents an Azure Sql Database + /// + public class AzureSqlDatabaseModelExpanded : AzureSqlDatabaseModel + { + /// + /// Service tier advisor for this database + /// + public Management.Sql.Models.ServiceTierAdvisorProperties ServiceTierAdvisor { get; set; } + + /// + /// Construct AzureSqlDatabaseModelExpanded from Management.Sql.Models.Database object + /// + /// Resource group + /// Server name + /// Database object + public AzureSqlDatabaseModelExpanded(string resourceGroup, string serverName, Management.Sql.Models.Database database) : base(resourceGroup, serverName, database) + { + if (database.Properties.ServiceTierAdvisors != null + && database.Properties.ServiceTierAdvisors.Count > 0) + { + ServiceTierAdvisor = database.Properties.ServiceTierAdvisors[0].Properties; + } + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs index c0edf672cb05..f0751dae9671 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs @@ -16,14 +16,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Services; using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Services; using Microsoft.Azure.Common.Authentication.Models; -using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; namespace Microsoft.Azure.Commands.Sql.Database.Services @@ -79,6 +77,19 @@ internal AzureSqlDatabaseModel GetDatabase(string resourceGroupName, string serv return CreateDatabaseModelFromResponse(resourceGroupName, serverName, resp); } + /// + /// Gets an Azure Sql Database by name with additional information. + /// + /// The name of the resource group + /// The name of the Azure Sql Database Server + /// The name of the Azure Sql Database + /// The Azure Sql Database object + internal AzureSqlDatabaseModelExpanded GetDatabaseExpanded(string resourceGroupName, string serverName, string databaseName) + { + var resp = Communicator.GetExpanded(resourceGroupName, serverName, databaseName, Util.GenerateTracingId()); + return CreateExpandedDatabaseModelFromResponse(resourceGroupName, serverName, resp); + } + /// /// Gets a list of Azure Sql Databases. /// @@ -95,6 +106,22 @@ internal ICollection ListDatabases(string resourceGroupNa }).ToList(); } + /// + /// Gets a list of Azure Sql Databases with additional information. + /// + /// The name of the resource group + /// The name of the Azure Sql Database Server + /// A list of database objects + internal ICollection ListDatabasesExpanded(string resourceGroupName, string serverName) + { + var resp = Communicator.ListExpanded(resourceGroupName, serverName, Util.GenerateTracingId()); + + return resp.Select((db) => + { + return CreateExpandedDatabaseModelFromResponse(resourceGroupName, serverName, db); + }).ToList(); + } + /// /// Creates or updates an Azure Sql Database. /// @@ -148,41 +175,25 @@ public string GetServerLocation(string resourceGroupName, string serverName) /// /// Converts the response from the service to a powershell database object /// - /// The resource group the server is in + /// The resource group the server is in /// The name of the Azure Sql Database Server /// The service response /// The converted model public static AzureSqlDatabaseModel CreateDatabaseModelFromResponse(string resourceGroup, string serverName, Management.Sql.Models.Database database) { - AzureSqlDatabaseModel model = new AzureSqlDatabaseModel(); - Guid id = Guid.Empty; - DatabaseEdition edition = DatabaseEdition.None; - - model.ResourceGroupName = resourceGroup; - model.ServerName = serverName; - model.CollationName = database.Properties.Collation; - model.CreationDate = database.Properties.CreationDate; - model.CurrentServiceObjectiveName = database.Properties.ServiceObjective; - model.MaxSizeBytes = database.Properties.MaxSizeBytes; - model.DatabaseName = database.Name; - model.Status = database.Properties.Status; - model.Tags = database.Tags as Dictionary; - model.ElasticPoolName = database.Properties.ElasticPoolName; - model.Location = database.Location; - - Guid.TryParse(database.Properties.CurrentServiceObjectiveId, out id); - model.CurrentServiceObjectiveId = id; - - Guid.TryParse(database.Properties.DatabaseId, out id); - model.DatabaseId = id; - - Enum.TryParse(database.Properties.Edition, true, out edition); - model.Edition = edition; - - Guid.TryParse(database.Properties.RequestedServiceObjectiveId, out id); - model.RequestedServiceObjectiveId = id; - - return model; + return new AzureSqlDatabaseModel(resourceGroup, serverName, database); + } + + /// + /// Converts the response from the service to a powershell database object + /// + /// The resource group the server is in + /// The name of the Azure Sql Database Server + /// The service response + /// The converted model + public static AzureSqlDatabaseModelExpanded CreateExpandedDatabaseModelFromResponse(string resourceGroup, string serverName, Management.Sql.Models.Database database) + { + return new AzureSqlDatabaseModelExpanded(resourceGroup, serverName, database); } internal IEnumerable ListDatabaseActivity(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Guid? operationId) diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs index cab38fded19e..db402b5287ea 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs @@ -44,6 +44,11 @@ public class AzureSqlDatabaseCommunicator /// public AzureProfile Profile { get; set; } + /// + /// Expand string used for getting additional database information + /// + public const string ExpandDatabase = "serviceTierAdvisors"; + /// /// Creates a communicator for Azure Sql Databases /// @@ -67,6 +72,14 @@ public Management.Sql.Models.Database Get(string resourceGroupName, string serve return GetCurrentSqlClient(clientRequestId).Databases.Get(resourceGroupName, serverName, databaseName).Database; } + /// + /// Gets the Azure Sql Database expanded additional details. + /// + public Management.Sql.Models.Database GetExpanded(string resourceGroupName, string serverName, string databaseName, string clientRequestId) + { + return GetCurrentSqlClient(clientRequestId).Databases.GetExpanded(resourceGroupName, serverName, databaseName, ExpandDatabase).Database; + } + /// /// Lists Azure Sql Databases /// @@ -75,6 +88,14 @@ public Management.Sql.Models.Database Get(string resourceGroupName, string serve return GetCurrentSqlClient(clientRequestId).Databases.List(resourceGroupName, serverName).Databases; } + /// + /// Lists Azure Sql Databases expanded with additional details. + /// + public IList ListExpanded(string resourceGroupName, string serverName, string clientRequestId) + { + return GetCurrentSqlClient(clientRequestId).Databases.ListExpanded(resourceGroupName, serverName, ExpandDatabase).Databases; + } + /// /// Creates or updates a database /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs b/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs deleted file mode 100644 index 2612c4c6c64e..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs +++ /dev/null @@ -1,55 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model; - -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Cmdlet -{ - [Cmdlet(VerbsCommon.Get, "AzureSqlElasticPoolRecommendation", - ConfirmImpact = ConfirmImpact.None)] - public class GetAzureSqlElasticPoolRecommendation : AzureSqlElasticPoolRecommendationCmdletBase - { - /// - /// Gets or sets the name of the RecommendedElasticPool to use. - /// - [Parameter(Mandatory = false, - ValueFromPipelineByPropertyName = true, - Position = 2, - HelpMessage = "The name of the Azure SQL Elastic Pool Recommendation to retrieve.")] - public string ElasticPoolRecommendation { get; set; } - - /// - /// Get the entities from the service - /// - /// The list of entities - protected override IEnumerable GetEntity() - { - ICollection results; - - if (MyInvocation.BoundParameters.ContainsKey("ElasticPoolRecommendation")) - { - results = new List(); - results.Add(ModelAdapter.GetElasticPoolRecommendation(this.ResourceGroupName, this.ServerName, this.ElasticPoolRecommendation)); - } - else - { - results = ModelAdapter.ListElasticPoolRecommendations(this.ResourceGroupName, this.ServerName); - } - - return results; - } - } -} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationMetrics.cs b/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationMetrics.cs deleted file mode 100644 index 5d6e55b88dfd..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/GetAzureSqlElasticPoolRecommendationMetrics.cs +++ /dev/null @@ -1,53 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model; - -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Cmdlet -{ - [Cmdlet(VerbsCommon.Get, "AzureSqlElasticPoolRecommendationMetrics", - ConfirmImpact = ConfirmImpact.None)] - public class GetAzureSqlElasticPoolRecommendationMetrics : AzureSqlElasticPoolRecommendationCmdletBase - { - /// - /// Gets or sets the name of the elastic pool recommendation to use. - /// - [Parameter(Mandatory = true, - ValueFromPipelineByPropertyName = true, - Position = 2, - HelpMessage = "The name of the Azure SQL elastic pool recommendation to retrieve.")] - [ValidateNotNullOrEmpty] - public string ElasticPoolRecommendation { get; set; } - - /// - /// Executes the cmdlet. - /// - public override void ExecuteCmdlet() - { - ModelAdapter = InitModelAdapter(Profile.Context.Subscription); - WriteObject(ModelAdapter.GetElasticPoolRecommendationMetrics(ResourceGroupName, ServerName, ElasticPoolRecommendation)); - } - - /// - /// Not Used. - /// - /// Not Used - protected override IEnumerable GetEntity() - { - return null; - } - } -} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationModel.cs b/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationModel.cs deleted file mode 100644 index ff20320ab72a..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationModel.cs +++ /dev/null @@ -1,91 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using Microsoft.Azure.Commands.Sql.Database.Model; - -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model -{ - /// - /// Represents an Azure Sql Elastic Pool Recommendation - /// - public class AzureSqlElasticPoolRecommendationModel - { - /// - /// Gets or sets the name of the resource group - /// - public string ResourceGroupName { get; set; } - - /// - /// Gets or sets the name of the server - /// - public string ServerName { get; set; } - - /// - /// Gets or sets the name of the recommended elastic pool - /// - public string RecommendedElasticPoolName { get; set; } - - /// - /// Gets or sets the database edition of the recommended elastic pool - /// - public DatabaseEdition? DatabaseEdition { get; set; } - - /// - /// Gets or sets the Dtu for the recommended elastic pool - /// - public double Dtu { get; set; } - - /// - /// Gets or sets the min Dtu per database in the recommended elastic pool - /// - public double DatabaseDtuMin { get; set; } - - /// - /// Gets or sets the max Dtu per database in the recommended elastic pool - /// - public double DatabaseDtuMax { get; set; } - - /// - /// Gets or sets the amount of storage the recommended elastic pool has - /// - public double StorageMB { get; set; } - - /// - /// Gets or sets the observation period start - /// - public DateTime ObservationPeriodStart { get; set; } - - /// - /// Gets or sets the observation period end - /// - public DateTime ObservationPeriodEnd { get; set; } - - /// - /// Gets or sets the maximum observed Dtu - /// - public double MaxObservedDtu { get; set; } - - /// - /// Gets or sets the maximum observed storage in MB - /// - public double MaxObservedStorageMB { get; set; } - - /// - /// Gets or sets the tags associated with the Recommended Elastic Pool. - /// - public Dictionary Tags { get; set; } - } -} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationAdapter.cs deleted file mode 100644 index 1edbab1f4dd1..000000000000 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationAdapter.cs +++ /dev/null @@ -1,171 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.Common.Authentication.Models; -using Microsoft.Azure.Management.Sql.Models; - -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Services -{ - /// - /// Adapter for RecommendedElasticPool operations - /// - public class AzureSqlElasticPoolRecommendationAdapter - { - /// - /// Gets or sets the AzureEndpointsCommunicator which has all the needed management clients - /// - private AzureSqlElasticPoolRecommendationCommunicator RecommendationCommunicator { get; set; } - - /// - /// Gets or sets the Azure profile - /// - public AzureProfile Profile { get; set; } - - /// - /// Gets or sets the Azure Subscription - /// - private AzureSubscription _subscription { get; set; } - - /// - /// Constructs a recommended elastic pool adapter - /// - /// The current azure profile - /// The current azure subscription - public AzureSqlElasticPoolRecommendationAdapter(AzureProfile profile, AzureSubscription subscription) - { - _subscription = subscription; - Profile = profile; - RecommendationCommunicator = new AzureSqlElasticPoolRecommendationCommunicator(profile, subscription); - } - - /// - /// Gets an Azure Sql Recommended Elastic Pool by name. - /// - /// The name of the resource group - /// The name of the Azure Sql Database Server - /// The name of the Azure Sql Database RecommendedElasticPool - /// The Azure Sql Database RecommendedElasticPool object - internal AzureSqlElasticPoolRecommendationModel GetElasticPoolRecommendation(string resourceGroupName, string serverName, string poolName) - { - var resp = RecommendationCommunicator.Get(resourceGroupName, serverName, poolName, Util.GenerateTracingId()); - return CreateRecommendedElasticPoolModelFromResponse(resourceGroupName, serverName, resp); - } - - /// - /// Gets a list of Azure Sql Recommended Elastic Pool. - /// - /// The name of the resource group - /// The name of the Azure Sql Database Server - /// A list of database objects - internal ICollection ListElasticPoolRecommendations(string resourceGroupName, string serverName) - { - var resp = RecommendationCommunicator.List(resourceGroupName, serverName, Util.GenerateTracingId()); - return resp.Select((db) => CreateRecommendedElasticPoolModelFromResponse(resourceGroupName, serverName, db)).ToList(); - } - - /// - /// Gets a database in an recommended elastic pool - /// - /// The name of the resource group - /// The name of the Azure Sql Database Server - /// The name of the Azure Sql RecommendedElasticPool - /// The name of the database - /// - public AzureSqlDatabaseModel GetElasticPoolRecommendationDatabase(string resourceGroupName, string serverName, string poolName, string databaseName) - { - var resp = RecommendationCommunicator.GetDatabase(resourceGroupName, serverName, poolName, databaseName, Util.GenerateTracingId()); - return AzureSqlDatabaseAdapter.CreateDatabaseModelFromResponse(resourceGroupName, serverName, resp); - } - - /// - /// Gets a list of Azure Sql Databases in an RecommendedElasticPool. - /// - /// The name of the resource group - /// The name of the Azure Sql Database Server - /// The name of the recommended elastic pool the database are in - /// A list of database objects - internal ICollection ListElasticPoolRecommendationDatabases(string resourceGroupName, string serverName, string poolName) - { - var resp = RecommendationCommunicator.ListDatabases(resourceGroupName, serverName, poolName, Util.GenerateTracingId()); - return resp.Select((db) => AzureSqlDatabaseAdapter.CreateDatabaseModelFromResponse(resourceGroupName, serverName, db)).ToList(); - } - - /// - /// Gets a list of Recommended Elastic Pool Metrics - /// - /// The name of the resource group - /// The name of the Azure Sql Database Server - /// The name of the recommended elastic pool - /// A list of RecommendedElastic Pool Activities - internal IList GetElasticPoolRecommendationMetrics(string resourceGroupName, string serverName, string poolName) - { - var resp = RecommendationCommunicator.ListMetrics(resourceGroupName, serverName, poolName, Util.GenerateTracingId()); - return resp.Select(CreateMetricModelFromResponse).ToList(); - } - - /// - /// Converts a RecommendedElasticPoolMetric metric to the powershell metric. - /// - /// The metric from the service - /// The converted metric - private AzureSqlElasticPoolRecommendationMetricModel CreateMetricModelFromResponse(RecommendedElasticPoolMetric metric) - { - return new AzureSqlElasticPoolRecommendationMetricModel() - { - DateTime = metric.DateTime, - Dtu = metric.Dtu, - SizeGB = metric.SizeGB - }; - } - - /// - /// Converts the response from the service to a powershell database object - /// - /// The resource group the server is in - /// The name of the Azure Sql Database Server - /// The service response - /// The converted model - private AzureSqlElasticPoolRecommendationModel CreateRecommendedElasticPoolModelFromResponse(string resourceGroup, string serverName, Management.Sql.Models.RecommendedElasticPool pool) - { - AzureSqlElasticPoolRecommendationModel recommendationModel = new AzureSqlElasticPoolRecommendationModel(); - - recommendationModel.ResourceGroupName = resourceGroup; - recommendationModel.ServerName = serverName; - recommendationModel.RecommendedElasticPoolName = pool.Name; - - DatabaseEdition edition = DatabaseEdition.None; - Enum.TryParse(pool.Properties.DatabaseEdition, out edition); - recommendationModel.DatabaseEdition = edition; - - recommendationModel.Dtu = pool.Properties.Dtu; - recommendationModel.DatabaseDtuMax = pool.Properties.DatabaseDtuMax; - recommendationModel.DatabaseDtuMin = pool.Properties.DatabaseDtuMin; - recommendationModel.StorageMB = pool.Properties.StorageMB; - recommendationModel.ObservationPeriodStart = pool.Properties.ObservationPeriodStart; - recommendationModel.ObservationPeriodEnd = pool.Properties.ObservationPeriodEnd; - recommendationModel.MaxObservedDtu = pool.Properties.MaxObservedDtu; - recommendationModel.MaxObservedStorageMB = pool.Properties.MaxObservedStorageMB; - recommendationModel.Tags = pool.Tags as Dictionary; - - return recommendationModel; - } - } -} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/AzureSqlElasticPoolRecommendationCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs similarity index 67% rename from src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/AzureSqlElasticPoolRecommendationCmdletBase.cs rename to src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs index 9d25caf1d556..aaea5d85cba8 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Cmdlet/AzureSqlElasticPoolRecommendationCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs @@ -15,13 +15,16 @@ using System.Collections.Generic; using System.Management.Automation; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model; -using Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Services; +using Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services; +using Microsoft.Azure.Management.Sql.Models; -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Cmdlet +namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Cmdlet { - public abstract class AzureSqlElasticPoolRecommendationCmdletBase : AzureSqlCmdletBase, AzureSqlElasticPoolRecommendationAdapter> + [Cmdlet(VerbsCommon.Get, "AzureSqlElasticPoolRecommendation", + ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlElasticPoolRecommendation : AzureSqlCmdletBase, AzureSqlElasticPoolRecommendationAdapter> { + /// /// Gets or sets the name of the server to use. /// @@ -41,5 +44,14 @@ protected override AzureSqlElasticPoolRecommendationAdapter InitModelAdapter(Azu { return new AzureSqlElasticPoolRecommendationAdapter(Profile, subscription); } + + /// + /// Get the entities from the service + /// + /// The list of entities + protected override IEnumerable GetEntity() + { + return ModelAdapter.ListRecommendedElasticPoolProperties(this.ResourceGroupName, this.ServerName); + } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs new file mode 100644 index 000000000000..b75b1397c823 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Common.Authentication.Models; +using Microsoft.Azure.Management.Sql.Models; + +namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services +{ + /// + /// Adapter for RecommendedElasticPool operations + /// + public class AzureSqlElasticPoolRecommendationAdapter + { + /// + /// Gets or sets the AzureEndpointsCommunicator which has all the needed management clients + /// + private AzureSqlElasticPoolRecommendationCommunicator RecommendationCommunicator { get; set; } + + /// + /// Gets or sets the Azure profile + /// + public AzureProfile Profile { get; set; } + + /// + /// Gets or sets the Azure Subscription + /// + private AzureSubscription _subscription { get; set; } + + /// + /// Constructs a recommended elastic pool adapter + /// + /// The current azure profile + /// The current azure subscription + public AzureSqlElasticPoolRecommendationAdapter(AzureProfile profile, AzureSubscription subscription) + { + _subscription = subscription; + Profile = profile; + RecommendationCommunicator = new AzureSqlElasticPoolRecommendationCommunicator(profile, subscription); + } + + /// + /// Gets a list of Azure Sql Recommended Elastic Pool. + /// + /// The name of the resource group + /// The name of the Azure Sql Database Server + /// A list of database objects + internal ICollection ListRecommendedElasticPoolProperties(string resourceGroupName, string serverName) + { + var resp = RecommendationCommunicator.ListExpanded(resourceGroupName, serverName, "databases", Util.GenerateTracingId()); + return resp.Select(CreateRecommendedElasticPoolPropertiesFromResponse).ToList(); + } + + /// + /// Converts the response from the service to a powershell database object + /// + /// The service response + /// The converted model + private UpgradeRecommendedElasticPoolProperties CreateRecommendedElasticPoolPropertiesFromResponse(RecommendedElasticPool pool) + { + var model = new UpgradeRecommendedElasticPoolProperties(); + + model.DatabaseCollection = pool.Properties.Databases.Select(database => database.Name).ToList(); + model.DatabaseDtuMax = (int)pool.Properties.DatabaseDtuMax; + model.DatabaseDtuMin = (int)pool.Properties.DatabaseDtuMin; + model.Dtu = (int)pool.Properties.Dtu; + model.Edition = pool.Properties.DatabaseEdition; + model.IncludeAllDatabases = false; + model.Name = pool.Name; + return model; + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs similarity index 61% rename from src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs rename to src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs index 1f85b56d2701..03432e400551 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Common.Authentication; -using Microsoft.Azure.Common.Authentication.Models; -using Microsoft.Azure.Management.Sql; using System; using System.Collections.Generic; using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Common.Authentication; +using Microsoft.Azure.Common.Authentication.Models; +using Microsoft.Azure.Management.Sql; -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Services +namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services { /// /// This class is responsible for all the REST communication with the audit REST endpoints @@ -55,45 +55,18 @@ public AzureSqlElasticPoolRecommendationCommunicator(AzureProfile profile, Azure SqlClient = null; } } - - /// - /// Gets the Azure Sql Recommended Elastic Pool - /// - public Management.Sql.Models.RecommendedElasticPool Get(string resourceGroupName, string serverName, string recommendedElasticPoolName, string clientRequestId) - { - return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.Get(resourceGroupName, serverName, recommendedElasticPoolName).RecommendedElasticPool; - } - - /// - /// Gets the Azure Sql Database in the Recommended Elastic Pool - /// - public Management.Sql.Models.Database GetDatabase(string resourceGroupName, string serverName, string recommendedElasticPoolName, string databaseName, string clientRequestId) - { - return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.GetDatabases(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).Database; - } /// - /// Lists Azure Sql Recommended Elastic Pool - /// - public IList List(string resourceGroupName, string serverName, string clientRequestId) - { - return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.List(resourceGroupName, serverName).RecommendedElasticPools; - } - - /// - /// Gets Recommended Elastic Pool Metrics - /// - public IList ListMetrics(string resourceGroupName, string serverName, string poolName, string clientRequestId) - { - return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.ListMetrics(resourceGroupName, serverName, poolName).RecommendedElasticPoolsMetrics; - } - - /// - /// Gets Recommended Elastic Pool Databases + /// Lists Azure Sql Recommended Elastic Pool with expanded properties /// - internal IList ListDatabases(string resourceGroupName, string serverName, string poolName, string clientRequestId) + /// Resource group name + /// Server name + /// Expanded properties + /// Request id + /// IList of RecommendedElasticPool + public IList ListExpanded(string resourceGroupName, string serverName, string expand, string clientRequestId) { - return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.ListDatabases(resourceGroupName, serverName, poolName).Databases; + return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.ListExpanded(resourceGroupName, serverName, expand).RecommendedElasticPools; } /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs new file mode 100644 index 000000000000..b54941bf3fbd --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services; +using Microsoft.Azure.Common.Authentication.Models; +using Microsoft.Azure.Management.Sql.Models; + +namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseUpgradeHint", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlDatabaseUpgradeHint : AzureSqlCmdletBase, AzureSqlServiceTierAdvisorAdapter> + { + /// + /// Gets or sets the name of the server. + /// + [Parameter(Mandatory = true, + ValueFromPipelineByPropertyName = true, + Position = 1, + HelpMessage = "The name of the Azure SQL Server.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database name. + /// + [Parameter(Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the Azure SQL Database.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the flag indicating that we want to exclude databases already in elastic pool recommendations. + /// + [Parameter(Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Exclude databases that are included in elastic pool recommendations")] + [ValidateNotNullOrEmpty] + public bool ExcludeElasticPoolCandidates { get; set; } + + + /// + /// Get the entities from the service + /// + /// The list of entities + protected override IEnumerable GetEntity() + { + ICollection results; + + if (MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + results = new List(); + results.Add(ModelAdapter.GetUpgradeDatabaseHints(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.ExcludeElasticPoolCandidates)); + } + else + { + results = ModelAdapter.ListUpgradeDatabaseHints(this.ResourceGroupName, this.ServerName, this.ExcludeElasticPoolCandidates); + } + + return results; + } + + /// + /// Initializes the adapter + /// + /// Subscription + /// Returns new AzureSqlServiceTierAdvisorAdapter + protected override AzureSqlServiceTierAdvisorAdapter InitModelAdapter(AzureSubscription subscription) + { + return new AzureSqlServiceTierAdvisorAdapter(Profile, subscription); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs new file mode 100644 index 000000000000..fce6de2d5f82 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services; +using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Model; +using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services; +using Microsoft.Azure.Common.Authentication.Models; + +namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, "AzureSqlServerUpgradeHint", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlServerUpgradeHint : AzureSqlCmdletBase + { + /// + /// Gets or sets the name of the server. + /// + [Parameter(Mandatory = true, + ValueFromPipelineByPropertyName = true, + Position = 1, + HelpMessage = "The name of the Azure SQL Server.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the flag indicating that we want to exclude elastic pool recommendations. + /// + [Parameter(Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Exclude elastic pool recommendations")] + [ValidateNotNullOrEmpty] + public bool ExcludeElasticPools { get; set; } + + /// + /// Get the entities from the service + /// + /// The list of entities + protected override UpgradeServerHint GetEntity() + { + if (ExcludeElasticPools) + { + // Return hints for all database ignoring elastic pool recommendations + return new UpgradeServerHint + { + Databases = ModelAdapter.ListUpgradeDatabaseHints(ResourceGroupName, ServerName, false), + ElasticPools = null + }; + } + else + { + // Return elastic pool hints and exclude databases contained in pools + var elasticPoolAdapter = new AzureSqlElasticPoolRecommendationAdapter(Profile, Profile.Context.Subscription); + return new UpgradeServerHint + { + Databases = ModelAdapter.ListUpgradeDatabaseHints(ResourceGroupName, ServerName, true), + ElasticPools = elasticPoolAdapter.ListRecommendedElasticPoolProperties(ResourceGroupName, ServerName) + }; + } + } + + /// + /// Initializes the adapter + /// + /// Subscription + /// Returns new AzureSqlServiceTierAdvisorAdapter + protected override AzureSqlServiceTierAdvisorAdapter InitModelAdapter(AzureSubscription subscription) + { + return new AzureSqlServiceTierAdvisorAdapter(Profile, subscription); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationMetricModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs similarity index 63% rename from src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationMetricModel.cs rename to src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs index 957f2292fdfe..d7749ffb636c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Recommended Elastic Pools/Model/AzureSqlElasticPoolRecommendationMetricModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs @@ -12,28 +12,24 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.Sql.Models; -namespace Microsoft.Azure.Commands.Sql.ElasticPoolRecommendation.Model +namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Model { /// - /// Represents a recommended elastic pool metric + /// Represents recommendations for upgrading server /// - public class AzureSqlElasticPoolRecommendationMetricModel + public class UpgradeServerHint { /// - /// Gets or sets the time of metric. + /// List of elastic pools /// - public DateTime DateTime { get; set; } - - /// - /// Gets or sets the DTU. - /// - public double Dtu { get; set; } + public IEnumerable ElasticPools { get; set; } /// - /// Gets or sets size in gigabytes. + /// List of recommended database properties /// - public double SizeGB { get; set; } + public IEnumerable Databases { get; set; } } -} +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs new file mode 100644 index 000000000000..a86414025e0c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs @@ -0,0 +1,134 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Common.Authentication.Models; +using Microsoft.Azure.Management.Sql.Models; + +namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services +{ + /// + /// Adapter for Service Tier Advisor operations + /// + public class AzureSqlServiceTierAdvisorAdapter + { + /// + /// Master database name + /// + private const string MasterDatabase = "master"; + + /// + /// Gets or sets the AzureEndpointsCommunicator which has all the needed management clients + /// + private AzureSqlServiceTierAdvisorCommunicator Communicator { get; set; } + + /// + /// Gets or sets the Azure profile + /// + public AzureProfile Profile { get; set; } + + /// + /// Gets or sets the Azure Subscription + /// + private AzureSubscription _subscription { get; set; } + + /// + /// Constructs a service tier advisor adapter + /// + /// The current azure profile + /// The current azure subscription + public AzureSqlServiceTierAdvisorAdapter(AzureProfile profile, AzureSubscription subscription) + { + _subscription = subscription; + Profile = profile; + Communicator = new AzureSqlServiceTierAdvisorCommunicator(profile, subscription); + } + + /// + /// Get upgrade database hints for database. + /// + /// The name of the resource group + /// The name of Azure Sql server + /// The name of Azure Sql database + /// Exclude databases if it is already recommended for elastic pool + /// Upgrade database hints + public RecommendedDatabaseProperties GetUpgradeDatabaseHints(string resourceGroupName, string serverName, string databaseName, bool excludeEpCandidates) + { + // if excludeEpCandidates is set and database is included in recommended elastic pools return null + if (excludeEpCandidates) + { + var pools = Communicator.GetRecommendedElasticPoolsExpanded(resourceGroupName, serverName, "databases", Util.GenerateTracingId()); + if (pools.SelectMany(pool => pool.Properties.Databases).Any(poolDatabase => databaseName == poolDatabase.Name)) + { + return null; + } + } + var database = Communicator.GetDatabaseExpanded(resourceGroupName, serverName, databaseName, "upgradeHint", Util.GenerateTracingId()); + return CreateUpgradeDatabaseHint(database); + } + + /// + /// List recommended database service tier and SLO for all databases on server. + /// + /// Resource group + /// Server name + /// Exclude databases that are already recommended for elastic pools + /// List of UpgradeDatabaseHint + public ICollection ListUpgradeDatabaseHints(string resourceGroupName, string serverName, bool excludeEpCandidates) + { + var databases = Communicator.ListDatabasesExpanded(resourceGroupName, serverName, "upgradeHint", Util.GenerateTracingId()); + + // if excludeEpCandidates flag is set filter out databases that are in recommended elastic pools + if (excludeEpCandidates && databases.Count > 0) + { + var pools = Communicator.GetRecommendedElasticPoolsExpanded(resourceGroupName, serverName, "databases", Util.GenerateTracingId()); + var pooledDatabaseNames = new HashSet(pools.SelectMany(pool => pool.Properties.Databases).Select(d => d.Name)); + databases = databases.Where(database => !pooledDatabaseNames.Contains(database.Name)).ToList(); + } + + return databases.Where(d => d.Name != MasterDatabase) + .Select(CreateUpgradeDatabaseHint).ToList(); + } + + /// + /// Creates UpgradeDatabaseHint from database object by using same edition and SLO from upgrade hint. + /// + /// Database object + /// Returns UpgradeDatabaseHint + private RecommendedDatabaseProperties CreateUpgradeDatabaseHint(Management.Sql.Models.Database database) + { + return new RecommendedDatabaseProperties() + { + Name = database.Name, + TargetEdition = SloToEdition(database.Properties.UpgradeHint.TargetServiceLevelObjective), + TargetServiceLevelObjective = database.Properties.UpgradeHint.TargetServiceLevelObjective + }; + } + + /// + /// Map SLO to Edition + /// + /// Service level objective string + /// Edition + private string SloToEdition(string ServiceLevelObjective) + { + if (ServiceLevelObjective.StartsWith("B")) return "Basic"; + if (ServiceLevelObjective.StartsWith("S")) return "Standard"; + if (ServiceLevelObjective.StartsWith("P")) return "Premium"; + return null; + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs new file mode 100644 index 000000000000..168fb45fe8d3 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Common.Authentication; +using Microsoft.Azure.Common.Authentication.Models; +using Microsoft.Azure.Management.Sql; + +namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services +{ + /// + /// This class is responsible for all the REST communication with the audit REST endpoints + /// + public class AzureSqlServiceTierAdvisorCommunicator + { + /// + /// The Sql client to be used by this end points communicator + /// + private static SqlManagementClient SqlClient { get; set; } + + /// + /// Gets or set the Azure subscription + /// + private static AzureSubscription Subscription {get ; set; } + + /// + /// Gets or sets the Azure profile + /// + public AzureProfile Profile { get; set; } + + /// + /// Creates a communicator for Azure Sql Service Tier Advisor + /// + /// + /// + public AzureSqlServiceTierAdvisorCommunicator(AzureProfile profile, AzureSubscription subscription) + { + Profile = profile; + if (subscription != Subscription) + { + Subscription = subscription; + SqlClient = null; + } + } + + /// + /// Get database with expanded properties + /// + /// The name of the resource group + /// The name of Azure Sql server + /// Database name + /// Expand string + /// Request identifier + /// + public Management.Sql.Models.Database GetDatabaseExpanded(string resourceGroupName, string serverName, string databaseName, string expand, string clientRequestId) + { + return GetCurrentSqlClient(clientRequestId).Databases.GetExpanded(resourceGroupName, serverName, databaseName, expand).Database; + } + + /// + /// List databases expanded + /// + /// The name of the resource group + /// The name of Azure Sql server + /// Expand string + /// Request identifier + /// List of databases + public IList ListDatabasesExpanded(string resourceGroupName, string serverName, string expand, string clientRequestId) + { + return GetCurrentSqlClient(clientRequestId).Databases.ListExpanded(resourceGroupName, serverName, expand).Databases; + } + + /// + /// Get recommended elastic pools + /// + /// The name of the resource group + /// The name of Azure Sql server + /// Request identifier + /// List of recommended elastic pools + public IList GetRecommendedElasticPoolsExpanded(string resourceGroupName, string serverName, string expand, string clientRequestId) + { + return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.ListExpanded(resourceGroupName, serverName, expand).RecommendedElasticPools; + } + + /// + /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request + /// id tracing headers for the current cmdlet invocation. + /// + /// The SQL Management client for the currently selected subscription. + private SqlManagementClient GetCurrentSqlClient(String clientRequestId) + { + // Get the SQL management client for the current subscription + if (SqlClient == null) + { + SqlClient = AzureSession.ClientFactory.CreateClient(Profile, Subscription, AzureEnvironment.Endpoint.ResourceManager); + } + SqlClient.HttpClient.DefaultRequestHeaders.Remove(Constants.ClientRequestIdHeaderName); + SqlClient.HttpClient.DefaultRequestHeaders.Add(Constants.ClientRequestIdHeaderName, clientRequestId); + return SqlClient; + } + } +} \ No newline at end of file