From 53e65d3011db6b1fcf372323b6ccb6a437f27033 Mon Sep 17 00:00:00 2001 From: Uros Lazarevic Date: Mon, 2 Nov 2020 22:01:36 +0100 Subject: [PATCH] initial commit with added maintenanceConfigurationId parameter to New-AzSqlInstance and Set-AzSqlInstance, tests included --- .../ManagedInstanceCrudScenarioTests.cs | 7 + .../ManagedInstanceCrudScenarioTests.ps1 | 43 + ...nstanceWithMaintenanceConfigurationId.json | 902 ++++++++++++++++++ src/Sql/Sql/ChangeLog.md | 1 + .../Cmdlet/NewAzureSqlManagedInstance.cs | 10 +- .../Cmdlet/SetAzureSqlManagedInstance.cs | 10 +- .../Model/AzureSqlManagedInstanceModel.cs | 5 + .../AzureSqlManagedInstanceAdapter.cs | 4 +- src/Sql/Sql/help/New-AzSqlInstance.md | 32 +- src/Sql/Sql/help/Set-AzSqlInstance.md | 29 +- 10 files changed, 1027 insertions(+), 16 deletions(-) create mode 100644 src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ManagedInstanceCrudScenarioTests/TestCreateManagedInstanceWithMaintenanceConfigurationId.json diff --git a/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.cs b/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.cs index 9157a67e5920..d2f7485b1f82 100644 --- a/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.cs +++ b/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.cs @@ -77,5 +77,12 @@ public void TestCreateUpdateManagedInstanceWithMinimalTlsVersion() { RunPowerShellTest("Test-CreateUpdateManagedInstanceWithMinimalTlsVersion"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateManagedInstanceWithMaintenanceConfigurationId() + { + RunPowerShellTest("Test-CreateManagedInstanceWithMaintenanceConfigurationId"); + } } } diff --git a/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.ps1 b/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.ps1 index b4a78434e949..eb6232fa6455 100644 --- a/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.ps1 +++ b/src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.ps1 @@ -389,4 +389,47 @@ function Test-CreateUpdateManagedInstanceWithMinimalTlsVersion { Remove-AzSqlInstance -ResourceGroupName $rgName -Name $managedInstanceName -Force } +} + +<# + .SYNOPSIS + Tests creating a managed instance with MaintenanceConfigurationId + .DESCRIPTION + SmokeTest +#> +function Test-CreateManagedInstanceWithMaintenanceConfigurationId +{ + # Setup + $rg = Create-ResourceGroupForTest "westeurope" + $vnetName = "cl_maintenance_configuration" + $subnetName = "ManagedInstance" + + # Setup VNET + $virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location + $subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq $subnetName })[0].Id + + $managedInstanceName = Get-ManagedInstanceName + $version = "12.0" + $credentials = Get-ServerCredential + $licenseType = "BasePrice" + $storageSizeInGB = 32 + $vCore = 8 + $skuName = "GP_Gen5" + $maintenanceConfigurationId = "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/MI_Sat_12AM_6AM" + + + try + { + $managedInstance1 = New-AzSqlInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName ` + -Location $rg.Location -AdministratorCredential $credentials -SubnetId $subnetId ` + -LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName -AssignIdentity ` + -MaintenanceConfigurationId $maintenanceConfigurationId + + Assert-AreEqual $managedInstance1.ManagedInstanceName $managedInstanceName + Assert-AreEqual $managedInstance1.MaintenanceConfigurationId "MI_Sat_12AM_6AM" + } + finally + { + Remove-ResourceGroupForTest $rg + } } \ No newline at end of file diff --git a/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ManagedInstanceCrudScenarioTests/TestCreateManagedInstanceWithMaintenanceConfigurationId.json b/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ManagedInstanceCrudScenarioTests/TestCreateManagedInstanceWithMaintenanceConfigurationId.json new file mode 100644 index 000000000000..905ede725818 --- /dev/null +++ b/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ManagedInstanceCrudScenarioTests/TestCreateManagedInstanceWithMaintenanceConfigurationId.json @@ -0,0 +1,902 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourcegroups/ps206?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlZ3JvdXBzL3BzMjA2P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westeurope\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "10c76dfb-096d-474b-9af2-4feab38196ae" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "ebd2436c-b191-40db-bd33-07069a6767ca" + ], + "x-ms-correlation-request-id": [ + "ebd2436c-b191-40db-bd33-07069a6767ca" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153449Z:ebd2436c-b191-40db-bd33-07069a6767ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:34:49 GMT" + ], + "Content-Length": [ + "167" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206\",\r\n \"name\": \"ps206\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration?api-version=2020-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlR3JvdXBzL2NsX29uZS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL2NsX21haW50ZW5hbmNlX2NvbmZpZ3VyYXRpb24/YXBpLXZlcnNpb249MjAyMC0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33a5c630-7f13-45ad-839d-dfbbfaf7aac4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.1.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"d50f9748-d0c8-4cd7-a843-93e7c8393eb3\"" + ], + "x-ms-request-id": [ + "c8619fc7-4ded-4685-a004-d954237c6f47" + ], + "x-ms-correlation-request-id": [ + "a9fbdf2d-b92d-423c-b6f0-393471e2012d" + ], + "x-ms-arm-service-request-id": [ + "0b1382ff-a757-4868-8b9b-b236907fd9f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153449Z:a9fbdf2d-b92d-423c-b6f0-393471e2012d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:34:49 GMT" + ], + "Content-Length": [ + "4121" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cl_maintenance_configuration\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration\",\r\n \"etag\": \"W/\\\"d50f9748-d0c8-4cd7-a843-93e7c8393eb3\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"06ae9549-24c4-4e27-a0ab-9c0dca7616d5\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"ManagedInstance\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance\",\r\n \"etag\": \"W/\\\"d50f9748-d0c8-4cd7-a843-93e7c8393eb3\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\": {\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/networkSecurityGroups/cl_maintenance_configuration-ManagedInstance-nsg-allow-all\"\r\n },\r\n \"routeTable\": {\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/routeTables/myRouteTableMiManagementService\"\r\n },\r\n \"networkIntentPolicies\": [\r\n {\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/networkIntentPolicies/mi_default_06ae9549-24c4-4e27-a0ab-9c0dca7616d5_10-0-0-0-24\"\r\n }\r\n ],\r\n \"resourceNavigationLinks\": [\r\n {\r\n \"name\": \"VirtualCluster8eb13475-1788-46ba-a3a0-e3685b34c7c4\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance/resourceNavigationLinks/VirtualCluster8eb13475-1788-46ba-a3a0-e3685b34c7c4\",\r\n \"etag\": \"W/\\\"d50f9748-d0c8-4cd7-a843-93e7c8393eb3\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/resourceNavigationLinks\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"linkedResourceType\": \"Microsoft.Sql/virtualClusters\",\r\n \"link\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Sql/virtualClusters/VirtualCluster8eb13475-1788-46ba-a3a0-e3685b34c7c4?api-version=2015-05-01-preview\"\r\n }\r\n }\r\n ],\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [\r\n {\r\n \"name\": \"test-delegation-sqlmi\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance/delegations/test-delegation-sqlmi\",\r\n \"etag\": \"W/\\\"d50f9748-d0c8-4cd7-a843-93e7c8393eb3\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceName\": \"Microsoft.Sql/managedInstances\",\r\n \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/subnets/join/action\",\r\n \"Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action\",\r\n \"Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\r\n }\r\n ],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"subnetID\": 0\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlR3JvdXBzL3BzMjA2L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMvcHMyODc2P2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2dec1ac7-44b3-485b-888d-73acdb1540a2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "5bede244-3124-458b-b3d6-a8a7b497edfe" + ], + "x-ms-correlation-request-id": [ + "5bede244-3124-458b-b3d6-a8a7b497edfe" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153451Z:5bede244-3124-458b-b3d6-a8a7b497edfe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:34:51 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "214" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Sql/managedInstances/ps2876' under resource group 'ps206' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlR3JvdXBzL3BzMjA2L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMvcHMyODc2P2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b809597d-5f44-4af6-981c-f4e24d102c0d" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "1b9a9c83-8e11-4997-bc7f-9fc1225029dd" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153604Z:1b9a9c83-8e11-4997-bc7f-9fc1225029dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:36:04 GMT" + ], + "Content-Length": [ + "1089" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"03eebcd4-fb14-4b49-9e78-31c97e972436\",\r\n \"type\": \"SystemAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"fullyQualifiedDomainName\": \"ps2876.95feb93e3c31.database.windows.net\",\r\n \"administratorLogin\": \"testusername\",\r\n \"subnetId\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance\",\r\n \"state\": \"Creating\",\r\n \"licenseType\": \"BasePrice\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 32,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"95feb93e3c31\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876\",\r\n \"name\": \"ps2876\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlR3JvdXBzL3BzMjA2L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMvcHMyODc2P2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "bbd6968a-6131-4784-ba60-448e55182078" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "867d5a80-6fab-426a-9057-b9e8fed447f1" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153705Z:867d5a80-6fab-426a-9057-b9e8fed447f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:37:04 GMT" + ], + "Content-Length": [ + "1087" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"03eebcd4-fb14-4b49-9e78-31c97e972436\",\r\n \"type\": \"SystemAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"ps2876.95feb93e3c31.database.windows.net\",\r\n \"administratorLogin\": \"testusername\",\r\n \"subnetId\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"BasePrice\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 32,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"95feb93e3c31\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876\",\r\n \"name\": \"ps2876\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlR3JvdXBzL3BzMjA2L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMvcHMyODc2P2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\"\r\n },\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"administratorLoginPassword\": \"t357ingP@s5w0rd!\",\r\n \"subnetId\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_maintenance_configuration/subnets/ManagedInstance\",\r\n \"licenseType\": \"BasePrice\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 32,\r\n \"publicDataEndpointEnabled\": false,\r\n \"maintenanceConfigurationId\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/MI_Sat_12AM_6AM\"\r\n },\r\n \"location\": \"westeurope\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "07629cf9-25c9-449f-9716-f353b2bdccc7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "729" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "60" + ], + "x-ms-request-id": [ + "20aff139-c6f0-4d1f-9084-23b435ba4fdb" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "3b50b4b0-d858-4a00-8c70-e9c1002c90b6" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153504Z:3b50b4b0-d858-4a00-8c70-e9c1002c90b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:35:04 GMT" + ], + "Content-Length": [ + "759" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"administratorLogin\": \"testusername\",\r\n \"licenseType\": \"BasePrice\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 32,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourceGroups/ps206/providers/Microsoft.Sql/managedInstances/ps2876\",\r\n \"name\": \"ps2876\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/resourcegroups/ps206?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L3Jlc291cmNlZ3JvdXBzL3BzMjA2P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "512a7e9a-269d-4fe8-9709-f53940ff859f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "9d945eb4-d1d9-4dbe-b15e-f0aeccf272fa" + ], + "x-ms-correlation-request-id": [ + "9d945eb4-d1d9-4dbe-b15e-f0aeccf272fa" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153705Z:9d945eb4-d1d9-4dbe-b15e-f0aeccf272fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:37:05 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "14ba9afa-ee85-408b-987b-2cf33e2ea3c4" + ], + "x-ms-correlation-request-id": [ + "14ba9afa-ee85-408b-987b-2cf33e2ea3c4" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153721Z:14ba9afa-ee85-408b-987b-2cf33e2ea3c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:37:20 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "f16720c6-9725-45ec-8644-3876e6e9a9e7" + ], + "x-ms-correlation-request-id": [ + "f16720c6-9725-45ec-8644-3876e6e9a9e7" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153736Z:f16720c6-9725-45ec-8644-3876e6e9a9e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:37:35 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "df530c32-ef4b-4564-bdc4-b1c59979dc16" + ], + "x-ms-correlation-request-id": [ + "df530c32-ef4b-4564-bdc4-b1c59979dc16" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153751Z:df530c32-ef4b-4564-bdc4-b1c59979dc16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:37:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "eb745f17-1570-41f8-ab98-7e14d41d7ced" + ], + "x-ms-correlation-request-id": [ + "eb745f17-1570-41f8-ab98-7e14d41d7ced" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153806Z:eb745f17-1570-41f8-ab98-7e14d41d7ced" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:38:06 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "4fe5f2dd-2c8f-4f9c-bb10-d6afac85dd42" + ], + "x-ms-correlation-request-id": [ + "4fe5f2dd-2c8f-4f9c-bb10-d6afac85dd42" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153821Z:4fe5f2dd-2c8f-4f9c-bb10-d6afac85dd42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:38:20 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "629dd8a1-e1ab-465e-ba49-178e915d34ea" + ], + "x-ms-correlation-request-id": [ + "629dd8a1-e1ab-465e-ba49-178e915d34ea" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153836Z:629dd8a1-e1ab-465e-ba49-178e915d34ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:38:36 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "95e80913-9ea4-429e-8b20-c0bc2bc2d954" + ], + "x-ms-correlation-request-id": [ + "95e80913-9ea4-429e-8b20-c0bc2bc2d954" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153851Z:95e80913-9ea4-429e-8b20-c0bc2bc2d954" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:38:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/a295933f-f7f5-4994-a109-8fa51241a5d6/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNi1XRVNURVVST1BFIiwiam9iTG9jYXRpb24iOiJ3ZXN0ZXVyb3BlIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTI5NTkzM2YtZjdmNS00OTk0LWExMDktOGZhNTEyNDFhNWQ2L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05pMVhSVk5VUlZWU1QxQkZJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wWlhWeWIzQmxJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.28" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-request-id": [ + "32b6f334-3ab3-48e9-8a95-8a479ae96c03" + ], + "x-ms-correlation-request-id": [ + "32b6f334-3ab3-48e9-8a95-8a479ae96c03" + ], + "x-ms-routing-request-id": [ + "UKWEST:20201031T153851Z:32b6f334-3ab3-48e9-8a95-8a479ae96c03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 31 Oct 2020 15:38:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateManagedInstanceWithMaintenanceConfigurationId": [ + "ps206", + "ps2876" + ] + }, + "Variables": { + "SubscriptionId": "a295933f-f7f5-4994-a109-8fa51241a5d6" + } +} \ No newline at end of file diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index 578fcd98792d..d7eb21931bc5 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release * Fixed issues where Set-AzSqlDatabaseAudit were not support Hyperscale database and database edition cannot be determined +* Added MaintenanceConfigurationId to 'New-AzSqlInstance' and 'Set-AzSqlInstance' ## Version 2.11.1 * Added DiffBackupIntervalInHours to `Set-AzSqlDatabaseBackupShortTermRetentionPolicy` diff --git a/src/Sql/Sql/ManagedInstance/Cmdlet/NewAzureSqlManagedInstance.cs b/src/Sql/Sql/ManagedInstance/Cmdlet/NewAzureSqlManagedInstance.cs index 71c8dac30182..dbc7eb42c470 100644 --- a/src/Sql/Sql/ManagedInstance/Cmdlet/NewAzureSqlManagedInstance.cs +++ b/src/Sql/Sql/ManagedInstance/Cmdlet/NewAzureSqlManagedInstance.cs @@ -316,6 +316,13 @@ public class NewAzureSqlManagedInstance : ManagedInstanceCmdletBase [ValidateSet("Local", "Zone", "Geo")] public string BackupStorageRedundancy { get; set; } + /// + /// Gets or sets the managed instance maintenance configuration id + /// + [Parameter(Mandatory = false, + HelpMessage = "The Maintenance configuration id for the Sql Azure Managed Instance.")] + public string MaintenanceConfigurationId { get; set; } + /// /// Gets or sets whether or not to run this cmdlet in the background as a job /// @@ -475,7 +482,8 @@ public override void ExecuteCmdlet() DnsZonePartner = this.DnsZonePartner, InstancePoolName = this.InstancePoolName, MinimalTlsVersion = this.MinimalTlsVersion, - BackupStorageRedundancy = this.BackupStorageRedundancy + BackupStorageRedundancy = this.BackupStorageRedundancy, + MaintenanceConfigurationId = this.MaintenanceConfigurationId }); return newEntity; } diff --git a/src/Sql/Sql/ManagedInstance/Cmdlet/SetAzureSqlManagedInstance.cs b/src/Sql/Sql/ManagedInstance/Cmdlet/SetAzureSqlManagedInstance.cs index bef0bafe7255..e9c5424974ae 100644 --- a/src/Sql/Sql/ManagedInstance/Cmdlet/SetAzureSqlManagedInstance.cs +++ b/src/Sql/Sql/ManagedInstance/Cmdlet/SetAzureSqlManagedInstance.cs @@ -197,6 +197,13 @@ public class SetAzureSqlManagedInstance : ManagedInstanceCmdletBase [PSArgumentCompleter(Constants.ComputeGenerationGen5)] public string ComputeGeneration { get; set; } + /// + /// Gets or sets the managed instance maintenance configuration id + /// + [Parameter(Mandatory = false, + HelpMessage = "The Maintenance configuration id for the Sql Azure Managed Instance.")] + public string MaintenanceConfigurationId { get; set; } + /// /// Gets or sets whether or not to run this cmdlet in the background as a job /// @@ -282,7 +289,8 @@ protected override IEnumerable ApplyUserInputToMod Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true), Identity = model.FirstOrDefault().Identity ?? ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent), InstancePoolName = this.InstancePoolName, - MinimalTlsVersion = this.MinimalTlsVersion + MinimalTlsVersion = this.MinimalTlsVersion, + MaintenanceConfigurationId = this.MaintenanceConfigurationId }); return updateData; } diff --git a/src/Sql/Sql/ManagedInstance/Model/AzureSqlManagedInstanceModel.cs b/src/Sql/Sql/ManagedInstance/Model/AzureSqlManagedInstanceModel.cs index fd492aa25cd9..b031a7d9d702 100644 --- a/src/Sql/Sql/ManagedInstance/Model/AzureSqlManagedInstanceModel.cs +++ b/src/Sql/Sql/ManagedInstance/Model/AzureSqlManagedInstanceModel.cs @@ -139,5 +139,10 @@ public class AzureSqlManagedInstanceModel /// Gets or sets the managed instance backup storage redundancy /// public string BackupStorageRedundancy { get; set; } + + /// + /// Gets or sets the managed instance maintenance configuration id + /// + public string MaintenanceConfigurationId { get; set; } } } diff --git a/src/Sql/Sql/ManagedInstance/Services/AzureSqlManagedInstanceAdapter.cs b/src/Sql/Sql/ManagedInstance/Services/AzureSqlManagedInstanceAdapter.cs index 24df26783c77..053b79a87c66 100644 --- a/src/Sql/Sql/ManagedInstance/Services/AzureSqlManagedInstanceAdapter.cs +++ b/src/Sql/Sql/ManagedInstance/Services/AzureSqlManagedInstanceAdapter.cs @@ -139,7 +139,8 @@ public AzureSqlManagedInstanceModel UpsertManagedInstance(AzureSqlManagedInstanc string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Sql/instancePools/{2}", Context.Subscription.Id, model.ResourceGroupName, model.InstancePoolName): null, MinimalTlsVersion = model.MinimalTlsVersion, - StorageAccountType = MapExternalBackupStorageRedundancyToInternal(model.BackupStorageRedundancy) + StorageAccountType = MapExternalBackupStorageRedundancyToInternal(model.BackupStorageRedundancy), + MaintenanceConfigurationId = model.MaintenanceConfigurationId }); return CreateManagedInstanceModelFromResponse(resp); @@ -216,6 +217,7 @@ private static AzureSqlManagedInstanceModel CreateManagedInstanceModelFromRespon new ResourceIdentifier(resp.InstancePoolId).ResourceName : null; managedInstance.MinimalTlsVersion = resp.MinimalTlsVersion; managedInstance.BackupStorageRedundancy = MapInternalBackupStorageRedundancyToExternal(resp.StorageAccountType); + managedInstance.MaintenanceConfigurationId = resp.MaintenanceConfigurationId; Management.Internal.Resources.Models.Sku sku = new Management.Internal.Resources.Models.Sku(); sku.Name = resp.Sku.Name; diff --git a/src/Sql/Sql/help/New-AzSqlInstance.md b/src/Sql/Sql/help/New-AzSqlInstance.md index 74fe5109fa3e..22a3107d7366 100644 --- a/src/Sql/Sql/help/New-AzSqlInstance.md +++ b/src/Sql/Sql/help/New-AzSqlInstance.md @@ -19,8 +19,8 @@ New-AzSqlInstance [-Name] [-ResourceGroupName] -AdministratorC -Edition -ComputeGeneration [-Collation ] [-PublicDataEndpointEnabled] [-ProxyOverride ] [-TimezoneId ] [-Tag ] [-AssignIdentity] [-DnsZonePartner ] [-InstancePoolName ] [-MinimalTlsVersion ] - [-BackupStorageRedundancy ] [-AsJob] [-Force] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-BackupStorageRedundancy ] [-MaintenanceConfigurationId ] [-AsJob] [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### NewByInstancePoolParentObjectParameterSet @@ -29,7 +29,8 @@ New-AzSqlInstance [-InstancePool] [-Name] -AdministratorCredential [-StorageSizeInGB ] -VCore [-Collation ] [-PublicDataEndpointEnabled] [-ProxyOverride ] [-TimezoneId ] [-Tag ] [-AssignIdentity] [-DnsZonePartner ] [-MinimalTlsVersion ] [-BackupStorageRedundancy ] - [-AsJob] [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-MaintenanceConfigurationId ] [-AsJob] [-Force] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### NewByInstancePoolResourceIdParameterSet @@ -37,8 +38,9 @@ New-AzSqlInstance [-InstancePool] [-Name] New-AzSqlInstance [-InstancePoolResourceId] [-Name] -AdministratorCredential [-StorageSizeInGB ] -VCore [-Collation ] [-PublicDataEndpointEnabled] [-ProxyOverride ] [-TimezoneId ] [-Tag ] [-AssignIdentity] - [-DnsZonePartner ] [-MinimalTlsVersion ] [-BackupStorageRedundancy ] [-AsJob] [-Force] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DnsZonePartner ] [-MinimalTlsVersion ] [-BackupStorageRedundancy ] + [-MaintenanceConfigurationId ] [-AsJob] [-Force] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### NewBySkuNameParameterSetParameter @@ -47,8 +49,9 @@ New-AzSqlInstance [-Name] [-ResourceGroupName] -AdministratorC -Location -SubnetId [-LicenseType ] [-StorageSizeInGB ] -VCore -SkuName [-Collation ] [-PublicDataEndpointEnabled] [-ProxyOverride ] [-TimezoneId ] [-Tag ] [-AssignIdentity] [-DnsZonePartner ] - [-InstancePoolName ] [-MinimalTlsVersion ] [-BackupStorageRedundancy ] [-AsJob] - [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-InstancePoolName ] [-MinimalTlsVersion ] [-BackupStorageRedundancy ] + [-MaintenanceConfigurationId ] [-AsJob] [-Force] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -402,6 +405,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MaintenanceConfigurationId +The Maintenance configuration id for the Sql Azure Managed Instance. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -MinimalTlsVersion The minimal TLS version to enforce for Managed instance diff --git a/src/Sql/Sql/help/Set-AzSqlInstance.md b/src/Sql/Sql/help/Set-AzSqlInstance.md index 451d0c7cc4d4..d5d479dbff66 100644 --- a/src/Sql/Sql/help/Set-AzSqlInstance.md +++ b/src/Sql/Sql/help/Set-AzSqlInstance.md @@ -17,8 +17,9 @@ Sets properties for an Azure SQL Database Managed Instance. Set-AzSqlInstance [-Name] [-ResourceGroupName] [-AdministratorPassword ] [-Edition ] [-LicenseType ] [-StorageSizeInGB ] [-VCore ] [-PublicDataEndpointEnabled ] [-ProxyOverride ] [-Tag ] [-AssignIdentity] - [-InstancePoolName ] [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-InstancePoolName ] [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] + [-MaintenanceConfigurationId ] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### SetInstanceFromAzureSqlManagedInstanceModelInstanceDefinition @@ -26,8 +27,9 @@ Set-AzSqlInstance [-Name] [-ResourceGroupName] [-Administrator Set-AzSqlInstance [-InputObject] [-AdministratorPassword ] [-Edition ] [-LicenseType ] [-StorageSizeInGB ] [-VCore ] [-PublicDataEndpointEnabled ] [-ProxyOverride ] [-Tag ] [-AssignIdentity] - [-InstancePoolName ] [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-InstancePoolName ] [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] + [-MaintenanceConfigurationId ] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ### SetInstanceFromAzureResourceId @@ -35,8 +37,8 @@ Set-AzSqlInstance [-InputObject] [-AdministratorP Set-AzSqlInstance [-ResourceId] [-AdministratorPassword ] [-Edition ] [-LicenseType ] [-StorageSizeInGB ] [-VCore ] [-PublicDataEndpointEnabled ] [-ProxyOverride ] [-Tag ] [-AssignIdentity] [-InstancePoolName ] - [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-MinimalTlsVersion ] [-Force] [-ComputeGeneration ] [-MaintenanceConfigurationId ] + [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -266,6 +268,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MaintenanceConfigurationId +The Maintenance configuration id for the Sql Azure Managed Instance. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -MinimalTlsVersion The minimal TLS version to enforce for Managed instance